about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authormayaeh <mayaeh@marimo-net.org>2019-10-01 08:20:22 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-10-01 01:20:22 +0200
commitb258583d2becfb1d1b434a2368fac627069bed0b (patch)
treee926c7262c5ef61494f3a0bf41cf3933ecdfd70d /app/views
parentf7c146a9e11389e208fe61ab8e6f5e3d3b43ddfb (diff)
Fix hashtag link to directory in AdminUI (#12005)
* Fixed not to generate link if no user used hashtag in directory

* Added missing translation for AdminUI custom emojis

* run yarn manage:translations en
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/tags/show.html.haml11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/views/admin/tags/show.html.haml b/app/views/admin/tags/show.html.haml
index 1d970d637..5799e5973 100644
--- a/app/views/admin/tags/show.html.haml
+++ b/app/views/admin/tags/show.html.haml
@@ -11,9 +11,14 @@
       .dashboard__counters__num= number_with_delimiter @accounts_week
       .dashboard__counters__label= t 'admin.tags.accounts_week'
   %div
-    = link_to explore_hashtag_path(@tag) do
-      .dashboard__counters__num= number_with_delimiter @tag.accounts_count
-      .dashboard__counters__label= t 'admin.tags.directory'
+    - if @tag.accounts_count > 0
+      = link_to explore_hashtag_path(@tag) do
+        .dashboard__counters__num= number_with_delimiter @tag.accounts_count
+        .dashboard__counters__label= t 'admin.tags.directory'
+    - else
+      %div
+        .dashboard__counters__num= number_with_delimiter @tag.accounts_count
+        .dashboard__counters__label= t 'admin.tags.directory'
 
 %hr.spacer/