You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.6 KiB

  1. %tr
  2. %td
  3. = custom_emoji_tag(custom_emoji)
  4. %td
  5. %samp= ":#{custom_emoji.shortcode}:"
  6. %td
  7. - if custom_emoji.local?
  8. = t('admin.accounts.location.local')
  9. - else
  10. = custom_emoji.domain
  11. %td
  12. - if custom_emoji.local?
  13. - if custom_emoji.visible_in_picker
  14. = table_link_to 'eye', t('admin.custom_emojis.listed'), admin_custom_emoji_path(custom_emoji, custom_emoji: { visible_in_picker: false }), method: :patch
  15. - else
  16. = table_link_to 'eye-slash', t('admin.custom_emojis.unlisted'), admin_custom_emoji_path(custom_emoji, custom_emoji: { visible_in_picker: true }), method: :patch
  17. - else
  18. - if custom_emoji.local_counterpart.present?
  19. = link_to safe_join([custom_emoji_tag(custom_emoji.local_counterpart), t('admin.custom_emojis.overwrite')]), copy_admin_custom_emoji_path(custom_emoji, page: params[:page]), method: :post, class: 'table-action-link'
  20. - else
  21. = table_link_to 'copy', t('admin.custom_emojis.copy'), copy_admin_custom_emoji_path(custom_emoji, page: params[:page]), method: :post
  22. %td
  23. - if custom_emoji.disabled?
  24. = table_link_to 'power-off', t('admin.custom_emojis.enable'), enable_admin_custom_emoji_path(custom_emoji), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
  25. - else
  26. = table_link_to 'power-off', t('admin.custom_emojis.disable'), disable_admin_custom_emoji_path(custom_emoji), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
  27. %td
  28. = table_link_to 'times', t('admin.custom_emojis.delete'), admin_custom_emoji_path(custom_emoji), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }