summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-24 04:07:33 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-24 04:07:33 +0200
commitd171b7d9673bce6abf537d6dc6db3ac7a9062754 (patch)
treee6b2d9f2e9e05da3d3f69845f4e5e2d495402fa7 /app
parent2972386dd9dcd513256c2984d1c99f4b1e240a33 (diff)
Reduce visual clutter: remove time from article partials
Diffstat (limited to 'app')
-rw-r--r--app/helpers/content_helper.rb6
-rw-r--r--app/views/custom/page_templates/public/update.html.erb2
2 files changed, 6 insertions, 2 deletions
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
59 59
60 # Returns the published_at attribute of a page if it is not nil, otherwise 60 # Returns the published_at attribute of a page if it is not nil, otherwise
61 # it returns the auto-filled value of the created_at attribute 61 # it returns the auto-filled value of the created_at attribute
62 def date_for_page page 62 def date_and_time_for_page page
63 I18n.l(page.published_at, :format => :ccc) rescue I18n.l(page.created_at, :format => :ccc) 63 I18n.l(page.published_at, :format => :ccc) rescue I18n.l(page.created_at, :format => :ccc)
64 end 64 end
65 65
66 def date_for_page page
67 I18n.l(page.published_at, :format => :ccc_date) rescue I18n.l(page.created_at, :format => :ccc_date)
68 end
69
66 def author_for_page page 70 def author_for_page page
67 page.user ? page.user.login : "Unknown author" 71 page.user ? page.user.login : "Unknown author"
68 end 72 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 @@
1<div class="article" lang="<%= @page.effective_lang %>"> 1<div class="article" lang="<%= @page.effective_lang %>">
2 <h2 class="headline"><%= @page.title %></h2> 2 <h2 class="headline"><%= @page.title %></h2>
3 <div class="author_and_date"><%= date_for_page @page %>, <%= @page.user.try(:login) %></div> 3 <div class="author_and_date"><%= date_and_time_for_page @page %>, <%= @page.user.try(:login) %></div>
4 <div class="abstract"><p><%= sanitize( @page.abstract )%></p></div> 4 <div class="abstract"><p><%= sanitize( @page.abstract )%></p></div>
5 <div id="headline_image"><%= headline_image %></div> 5 <div id="headline_image"><%= headline_image %></div>
6 <div class="body"><%= aggregate?(@page.body) %></div> 6 <div class="body"><%= aggregate?(@page.body) %></div>