_invite.html.haml 757 B

12345678910111213141516171819202122232425
  1. %tr{ id: dom_id(invite) }
  2. %td
  3. .input-copy
  4. .input-copy__wrapper
  5. = copyable_input value: public_invite_url(invite_code: invite.code)
  6. %button{ type: :button }= t('generic.copy')
  7. - if invite.valid_for_use?
  8. %td
  9. = material_symbol 'person'
  10. = invite.uses
  11. = " / #{invite.max_uses}" unless invite.max_uses.nil?
  12. %td
  13. - if invite.expires_at.nil?
  14. - else
  15. %time.formatted{ datetime: invite.expires_at.iso8601, title: l(invite.expires_at) }
  16. = l invite.expires_at
  17. - else
  18. %td{ colspan: 2 }
  19. = t('invites.expired')
  20. %td
  21. - if invite.valid_for_use? && policy(invite).destroy?
  22. = table_link_to 'close', t('invites.delete'), invite_path(invite), method: :delete