diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-24 04:07:33 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-24 04:07:33 +0200 |
| commit | d171b7d9673bce6abf537d6dc6db3ac7a9062754 (patch) | |
| tree | e6b2d9f2e9e05da3d3f69845f4e5e2d495402fa7 /app/helpers/content_helper.rb | |
| parent | 2972386dd9dcd513256c2984d1c99f4b1e240a33 (diff) | |
Reduce visual clutter: remove time from article partials
Diffstat (limited to 'app/helpers/content_helper.rb')
| -rw-r--r-- | app/helpers/content_helper.rb | 6 |
1 files changed, 5 insertions, 1 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 |
