From 1b671a622540fa260cb8e9c6af62a3af68be82fa Mon Sep 17 00:00:00 2001 From: drusepth Date: Tue, 10 Jan 2023 16:44:04 -0800 Subject: [PATCH] wip polish before ripping plumbing up --- app/models/serializers/content_serializer.rb | 3 ++ .../_content_context_sidenav.html.erb | 46 ++++++++++--------- .../_content_header.html.erb | 1 + 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/app/models/serializers/content_serializer.rb b/app/models/serializers/content_serializer.rb index 5b4bc564..bd9912dd 100644 --- a/app/models/serializers/content_serializer.rb +++ b/app/models/serializers/content_serializer.rb @@ -11,6 +11,7 @@ class ContentSerializer attr_accessor :class_name, :class_color, :class_text_color, :class_icon attr_accessor :cached_word_count + attr_accessor :created_at, :updated_at attr_accessor :data # name: 'blah, @@ -48,6 +49,8 @@ class ContentSerializer self.documents = content.documents || [] self.cached_word_count = content.cached_word_count + self.created_at = content.created_at + self.updated_at = content.updated_at self.data = { name: content.try(:name), diff --git a/app/views/content/tailwind_components/_content_context_sidenav.html.erb b/app/views/content/tailwind_components/_content_context_sidenav.html.erb index f5d8fc9a..bdb46e1e 100644 --- a/app/views/content/tailwind_components/_content_context_sidenav.html.erb +++ b/app/views/content/tailwind_components/_content_context_sidenav.html.erb @@ -12,20 +12,20 @@
- <%= content.class_icon %> - <%= content.name %> + <%= content.class_icon %> + <%= content.name %>
<% if content.universe %> <%= link_to content.universe, class: 'group flex items-center text-xs' do %> <%= Universe.icon %> in   - <%= content.universe.name %> + <%= content.universe.name %> <% end %> <% end %> <%= link_to content.user, class: 'group flex items-center text-xs' do %> <%= User.icon %> by   - <%= content.user.display_name %> + <%= content.user.display_name %> <% end %>
@@ -39,10 +39,15 @@ 42 + + -
+
- - - 15,323 words + spellcheck + + <%= number_with_delimiter content.cached_word_count %> + <%= 'word'.pluralize content.cached_word_count %> +
- - - 7 somethings + date_range + + Created <%= time_ago_in_words content.created_at %> ago +
- - - Another something + date_range + + Updated <%= time_ago_in_words content.updated_at %> ago +
diff --git a/app/views/content/tailwind_components/_content_header.html.erb b/app/views/content/tailwind_components/_content_header.html.erb index 48d28927..8317375a 100644 --- a/app/views/content/tailwind_components/_content_header.html.erb +++ b/app/views/content/tailwind_components/_content_header.html.erb @@ -1,5 +1,6 @@

+ <%= content.class_icon %> <%= content.name %>