_relay.html.haml 919 B

12345678910111213141516171819202122232425
  1. %tr
  2. %td
  3. %samp= relay.inbox_url
  4. %td
  5. - if relay.accepted?
  6. %span.positive-hint
  7. = fa_icon('check')
  8.  
  9. = t 'admin.relays.enabled'
  10. - elsif relay.pending?
  11. = fa_icon('hourglass')
  12.  
  13. = t 'admin.relays.pending'
  14. - else
  15. %span.negative-hint
  16. = fa_icon('times')
  17.  
  18. = t 'admin.relays.disabled'
  19. %td
  20. - if relay.accepted?
  21. = table_link_to 'power-off', t('admin.relays.disable'), disable_admin_relay_path(relay), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
  22. - elsif !relay.pending?
  23. = table_link_to 'power-off', t('admin.relays.enable'), enable_admin_relay_path(relay), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
  24. = table_link_to 'times', t('admin.relays.delete'), admin_relay_path(relay), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }