From d171b7d9673bce6abf537d6dc6db3ac7a9062754 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 24 Jul 2026 04:07:33 +0200 Subject: Reduce visual clutter: remove time from article partials --- app/helpers/content_helper.rb | 6 +++++- app/views/custom/page_templates/public/update.html.erb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 6bb9c4e0..fd351ed2 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb @@ -59,10 +59,14 @@ module ContentHelper # Returns the published_at attribute of a page if it is not nil, otherwise # it returns the auto-filled value of the created_at attribute - def date_for_page page + def date_and_time_for_page page I18n.l(page.published_at, :format => :ccc) rescue I18n.l(page.created_at, :format => :ccc) end + def date_for_page page + I18n.l(page.published_at, :format => :ccc_date) rescue I18n.l(page.created_at, :format => :ccc_date) + end + def author_for_page page page.user ? page.user.login : "Unknown author" end diff --git a/app/views/custom/page_templates/public/update.html.erb b/app/views/custom/page_templates/public/update.html.erb index 0ff1bb24..f460f621 100644 --- a/app/views/custom/page_templates/public/update.html.erb +++ b/app/views/custom/page_templates/public/update.html.erb @@ -1,6 +1,6 @@

<%= @page.title %>

-
<%= date_for_page @page %>, <%= @page.user.try(:login) %>
+
<%= date_and_time_for_page @page %>, <%= @page.user.try(:login) %>

<%= sanitize( @page.abstract )%>

<%= headline_image %>
<%= aggregate?(@page.body) %>
-- cgit v1.3