The code powering m.abunchtell.com https://m.abunchtell.com
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.
 
 
 
 

29 lines
819 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. - 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. = invite.comment
  22. %td
  23. - if invite.valid_for_use? && policy(invite).destroy?
  24. = table_link_to 'times', t('invites.delete'), invite_path(invite), method: :delete