about summary refs log tree commit diff
path: root/app/views/admin
diff options
context:
space:
mode:
authornullkal <nullkal@nil.nu>2017-10-27 23:11:30 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-10-27 16:11:30 +0200
commit781105293cf129c84ef0b91ec8cd27b7127cf951 (patch)
tree719dbf46e7aa62a8fc552f3c1f91d4a6b3e0e658 /app/views/admin
parent0cb329f63a292598ef9ed1af6b8f8b56658e7984 (diff)
Feature: Unlisted custom emojis (#5485)
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/custom_emojis/_custom_emoji.html.haml7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/admin/custom_emojis/_custom_emoji.html.haml b/app/views/admin/custom_emojis/_custom_emoji.html.haml
index 1fa64908c..399d13bbd 100644
--- a/app/views/admin/custom_emojis/_custom_emoji.html.haml
+++ b/app/views/admin/custom_emojis/_custom_emoji.html.haml
@@ -9,7 +9,12 @@
     - else
       = custom_emoji.domain
   %td
-    - unless custom_emoji.local?
+    - if custom_emoji.local?
+      - if custom_emoji.visible_in_picker
+        = table_link_to 'eye', t('admin.custom_emojis.listed'), admin_custom_emoji_path(custom_emoji, custom_emoji: { visible_in_picker: false }), method: :patch
+      - else
+        = table_link_to 'eye-slash', t('admin.custom_emojis.unlisted'), admin_custom_emoji_path(custom_emoji, custom_emoji: { visible_in_picker: true }), method: :patch
+    - else
       = table_link_to 'copy', t('admin.custom_emojis.copy'), copy_admin_custom_emoji_path(custom_emoji, page: params[:page]), method: :post
   %td
     - if custom_emoji.disabled?