From df19aabfba5f0fb57d9a13257c75b376de5a6b8e Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Mon, 27 May 2024 19:49:27 +0300 Subject: [PATCH] adjust users table --- app/views/users/index.html.erb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 4b72b225..52eb7907 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -5,9 +5,7 @@

<%= params[:status].to_s.titleize %> Users

<% if can?(:create, User.new(account: current_account)) %> - <% if Docuseal.multitenant? %> - <%= render 'users/extra_buttons' %> - <% end %> + <%= render 'users/extra_buttons' %> <% if content_for(:add_user_button) %> <%= content_for(:add_user_button) %> <% else %> @@ -57,7 +55,7 @@ <%= user.last_sign_in_at ? l(user.last_sign_in_at.in_time_zone(current_account.timezone), format: :short, locale: current_account.locale) : '-' %> - <% if can?(:update, user) %> + <% if can?(:update, user) && user.archived_at.blank? %> <%= link_to edit_user_path(user), class: 'btn btn-outline btn-xs', title: 'Edit', data: { turbo_frame: 'modal' } do %> Edit <% end %> @@ -68,7 +66,7 @@ <% end %> <% end %> <% if params[:status].present? && can?(:manage, user) && user != current_user %> - <%= button_to user_path(user), method: :put, params: { user: { archived_at: nil } }, class: 'btn btn-outline btn-secondary btn-xs', title: 'Unarchive', data: { turbo_confirm: 'Are you sure?' } do %> + <%= button_to user_path(user), method: :put, params: { user: { archived_at: nil } }, class: 'btn btn-outline btn-xs', title: 'Unarchive', data: { turbo_confirm: 'Are you sure?' } do %> Unarchive <% end %> <% end %>