diff --git a/app/helpers/content_viewer_helper.rb b/app/helpers/content_viewer_helper.rb index 0ad395f..6bfbffb 100644 --- a/app/helpers/content_viewer_helper.rb +++ b/app/helpers/content_viewer_helper.rb @@ -3,13 +3,16 @@ module ContentViewerHelper include BlogHelper include ForumHelper - def number_of_comments(article) - n = article.comments.without_spam.count + def display_number_of_comments(n) base_str = "#{n}" amount_str = n == 0 ? _('no comments yet') : (n == 1 ? _('One comment') : _('%s comments') % n) base_str + "#{amount_str}" end + def number_of_comments(article) + display_number_of_comments(article.comments.without_spam.count) + end + def article_title(article, args = {}) title = article.display_title if article.kind_of?(UploadedFile) && article.image? title = article.title if title.blank? -- libgit2 0.21.2