about summary refs log tree commit diff
path: root/app/views/admin
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-09-05 11:36:41 +0200
committerThibaut Girka <thib@sitedethib.com>2019-09-05 11:36:41 +0200
commit5088eb8388fbfcb210a518f918ae5332e6d3979e (patch)
tree20b9394200b79e7eefc234cc50b0f3650e9afc1d /app/views/admin
parent0128509605ed90ee5a29d6af2347ab32bd46aeb9 (diff)
parente265b8887dbd883bc7ca04832dc67ffe46966889 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/instances/index.html.haml19
-rw-r--r--app/views/admin/tags/show.html.haml4
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
-                &bull;
-              = t('admin.domain_blocks.rejecting_media')
-              - first_item = false
-            - if instance.domain_block.reject_reports?
-              - unless first_item
-                &bull;
-              = t('admin.domain_blocks.rejecting_reports')
+            - unless instance.domain_block.suspend?
+              - if instance.domain_block.reject_media?
+                - unless first_item
+                  &bull;
+                = t('admin.domain_blocks.rejecting_media')
+                - first_item = false
+              - if instance.domain_block.reject_reports?
+                - unless first_item
+                  &bull;
+                = 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