]> cat aescling's git repositories - mastodon.git/commitdiff
Per-user followers count display in profile directory
authorThibaut Girka <thib@sitedethib.com>
Tue, 18 Dec 2018 11:02:54 +0000 (12:02 +0100)
committerThibG <thib@sitedethib.com>
Thu, 20 Dec 2018 13:51:12 +0000 (14:51 +0100)
app/views/directories/index.html.haml

index 7f6ad13e66abc7ed78a8abdb6da0a110cd546c30..8d136a31fb12f7b27137cb3262169d9a941da049 100644 (file)
                 %td.accounts-table__count.optional
                   = number_to_human account.statuses_count, strip_insignificant_zeros: true
                   %small= t('accounts.posts', count: account.statuses_count).downcase
-                - unless Setting.hide_followers_count
-                  %td.accounts-table__count.optional
-                    = number_to_human account.followers_count, strip_insignificant_zeros: true
-                    %small= t('accounts.followers', count: account.followers_count).downcase
+                %td.accounts-table__count.optional
+                  = Setting.hide_followers_count ? '-' : (number_to_human account.followers_count, strip_insignificant_zeros: true)
+                  %small= t('accounts.followers', count: account.followers_count).downcase
                 %td.accounts-table__count
                   - if account.last_status_at.present?
                     %time.time-ago{ datetime: account.last_status_at.iso8601, title: l(account.last_status_at) }= l account.last_status_at