_webhook.html.haml 817 B

12345678910111213141516171819
  1. .applications-list__item
  2. = link_to admin_webhook_path(webhook), class: 'announcements-list__item__title' do
  3. = fa_icon 'inbox'
  4. = webhook.url
  5. .announcements-list__item__action-bar
  6. .announcements-list__item__meta
  7. - if webhook.enabled?
  8. %span.positive-hint= t('admin.webhooks.enabled')
  9. - else
  10. %span.negative-hint= t('admin.webhooks.disabled')
  11. ·
  12. %abbr{ title: webhook.events.join(', ') }= t('admin.webhooks.enabled_events', count: webhook.events.size)
  13. %div
  14. = table_link_to 'pencil', t('admin.webhooks.edit'), edit_admin_webhook_path(webhook) if can?(:update, webhook)
  15. = table_link_to 'trash', t('admin.webhooks.delete'), admin_webhook_path(webhook), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:destroy, webhook)