_invite.html.haml 791 B

12345678910111213141516171819202122232425
  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. - if invite.valid_for_use?
  8. %td
  9. = fa_icon 'user fw'
  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 'times', t('invites.delete'), invite_path(invite), method: :delete