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.

30 lines
978 B

  1. %tr
  2. %td
  3. .input-copy
  4. .input-copy__wrapper
  5. %input{ type: :text, maxlength: '999', spellcheck: 'false', readonly: 'true', value: public_invite_url(invite_code: invite.code) }
  6. %button{ type: :button }= t('generic.copy')
  7. %td
  8. .name-tag
  9. = image_tag invite.user.account.avatar.url(:original), alt: '', width: 16, height: 16, class: 'avatar'
  10. %span.username= invite.user.account.username
  11. - if invite.valid_for_use?
  12. %td
  13. = fa_icon 'user fw'
  14. = invite.uses
  15. = " / #{invite.max_uses}" unless invite.max_uses.nil?
  16. %td
  17. - if invite.expires_at.nil?
  18. - else
  19. %time.formatted{ datetime: invite.expires_at.iso8601, title: l(invite.expires_at) }
  20. = l invite.expires_at
  21. - else
  22. %td{ colspan: 2 }
  23. = t('invites.expired')
  24. %td
  25. - if invite.valid_for_use? && policy(invite).destroy?
  26. = table_link_to 'times', t('invites.delete'), admin_invite_path(invite), method: :delete