| <%= t('name') %> | <%= t('email') %> | <%= t('role') %> | <%= t('last_session') %> | |
|---|---|---|---|---|
| <%= user.full_name %> |
<% if user.try(:pending_reconfirmation?) %>
<%= user.unconfirmed_email %>
(<%= t('unconfirmed') %>) <% else %> <%= user.email %> <% end %> |
<%= t(user.role) %> | <%= user.current_sign_in_at ? l(user.current_sign_in_at.in_time_zone(current_account.timezone), format: :short, locale: current_account.locale) : '-' %> | <% if params[:status].blank? && can?(:update, user) && user.archived_at.blank? %> <%= link_to edit_user_path(user), class: 'btn btn-outline btn-xs', title: t('edit'), data: { turbo_frame: 'modal' } do %> <%= t('edit') %> <% end %> <% end %> <% if params[:status] != 'archived' && can?(:destroy, user) && user != current_user %> <%= button_to user_path(user), method: :delete, class: 'btn btn-outline btn-error btn-xs', title: t('remove'), data: { turbo_confirm: t('are_you_sure_') } do %> <%= t('remove') %> <% end %> <% end %> <% if params[:status] == 'archived' && can?(:create, user) && user != current_user && user.archived_at? %> <%= button_to user_path(user), method: :put, params: { user: { archived_at: nil } }, class: 'btn btn-outline btn-xs', title: t('unarchive'), data: { turbo_confirm: t('are_you_sure_') } do %> <%= t('unarchive') %> <% end %> <% end %> |