about summary refs log tree commit diff
path: root/app/views/admin/tags/show.html.haml
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-09-06 12:06:59 +0200
committerGitHub <noreply@github.com>2019-09-06 12:06:59 +0200
commit286bf110c3e69042049968440f1eb99372a7e0e6 (patch)
treeddf1c32803022cb200087a8c4c6818612ca76d3b /app/views/admin/tags/show.html.haml
parent0128509605ed90ee5a29d6af2347ab32bd46aeb9 (diff)
parent4434e2eb7f9942b44561c2f7702af3ed3854b8db (diff)
Merge pull request #1211 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/views/admin/tags/show.html.haml')
-rw-r--r--app/views/admin/tags/show.html.haml4
1 files changed, 3 insertions, 1 deletions
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