diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-09-05 11:36:41 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-09-05 11:36:41 +0200 |
commit | 5088eb8388fbfcb210a518f918ae5332e6d3979e (patch) | |
tree | 20b9394200b79e7eefc234cc50b0f3650e9afc1d /app/views/admin | |
parent | 0128509605ed90ee5a29d6af2347ab32bd46aeb9 (diff) | |
parent | e265b8887dbd883bc7ca04832dc67ffe46966889 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/instances/index.html.haml | 19 | ||||
-rw-r--r-- | app/views/admin/tags/show.html.haml | 4 |
2 files changed, 13 insertions, 10 deletions
diff --git a/app/views/admin/instances/index.html.haml b/app/views/admin/instances/index.html.haml index 982dc5035..1d85aa75e 100644 --- a/app/views/admin/instances/index.html.haml +++ b/app/views/admin/instances/index.html.haml @@ -44,15 +44,16 @@ - if !instance.domain_block.noop? = t("admin.domain_blocks.severity.#{instance.domain_block.severity}") - first_item = false - - if instance.domain_block.reject_media? - - unless first_item - • - = t('admin.domain_blocks.rejecting_media') - - first_item = false - - if instance.domain_block.reject_reports? - - unless first_item - • - = t('admin.domain_blocks.rejecting_reports') + - unless instance.domain_block.suspend? + - if instance.domain_block.reject_media? + - unless first_item + • + = t('admin.domain_blocks.rejecting_media') + - first_item = false + - if instance.domain_block.reject_reports? + - unless first_item + • + = t('admin.domain_blocks.rejecting_reports') - elsif whitelist_mode? = t('admin.accounts.whitelisted') - else diff --git a/app/views/admin/tags/show.html.haml b/app/views/admin/tags/show.html.haml index c3779d48c..d54a43c1e 100644 --- a/app/views/admin/tags/show.html.haml +++ b/app/views/admin/tags/show.html.haml @@ -38,8 +38,10 @@ .table-wrapper %table.table %tbody + - total = @usage_by_domain.sum(&:last).to_f + - @usage_by_domain.each do |(domain, count)| %tr %th= domain || site_hostname - %td= number_to_percentage((count / @tag.history[0][:uses].to_f) * 100) + %td= number_to_percentage((count / total) * 100, precision: 1) %td= number_with_delimiter count |