Merge pull request #7483 from Flaburgan/7393-always-link-comment-mobile

Always link comment count text on mobile
This commit is contained in:
Benjamin Neff 2017-07-13 02:31:30 +02:00
commit 6c1ebea633
No known key found for this signature in database
GPG key ID: 971464C3F1A90194

View file

@ -43,15 +43,12 @@ module MobileHelper
entypo_class = "entypo-chevron-down"
end
if post.comments_count > 0
link_to "#{t('admins.stats.comments', count: post.comments_count)}<i class='#{entypo_class}'></i>".html_safe,
post_comments_path(post, format: "mobile"),
class: "show-comments #{klass}"
else
html = "<span class='show-comments'>"
html << t("admins.stats.comments", count: post.comments_count)
html << "</span>"
end
link_to safe_join([
t("admins.stats.comments", count: post.comments_count),
content_tag(:i, nil, class: entypo_class)
]),
post_comments_path(post, format: "mobile"),
class: "show-comments #{klass}"
end
def additional_photos