% content_for :title, t(".invitations") %>
<%= t(".intro") %>
| <%= t(".label") %> | <%= t(".gives") %> | <%= t(".uses") %> | <%= t(".status") %> | |
|---|---|---|---|---|
| <%= inv.label %> <%= [ inv.email, inv.created_by&.display_name, fmt_date(inv.created_at) ].compact.join(" · ") %> |
"><%= inv.grants.map { "#{_1.aircraft.tail_number} (#{_1.role.name})" }.join(", ").presence || t(".account_only") %> | "><%= inv.uses_count %> / <%= inv.max_uses || "∞" %> | "> <% if inv.revoked? %><%= t(".revoked") %> <% elsif inv.expired? %><%= t(".expired") %> <% elsif inv.used_up? %><%= t(".used") %> <% else %><%= t(".active") %><%= inv.expires_at ? t(".until", time: l(inv.expires_at, format: :app)) : t(".never_expires") %><% end %> | <% if inv.usable? %><%= delete_button t(".revoke"), admin_invitation_path(inv), confirm: t(".revoke_invitation") %><% end %> |