Files
docuseal/app/views/users/_bottom_links.html.erb
T

29 lines
1.3 KiB
Plaintext
Raw Normal View History

2024-10-24 20:09:57 +03:00
<div class="flex items-center space-x-1">
2026-04-08 11:23:59 +03:00
<% if (is_with_download = can?(:manage, :download_users) && can?(:manage, current_account)) %>
<%= button_to(t(:download), url_for(format: :csv), class: 'link text-sm', form: { class: 'flex' }, method: :get) %>
<% end %>
2024-10-24 20:09:57 +03:00
<% if %w[archived integration].include?(params[:status]) %>
2026-04-08 11:23:59 +03:00
<% if is_with_download %>
<span class="text-neutral-700">|</span>
<% end %>
2024-10-24 20:09:57 +03:00
<%= link_to t('view_active'), settings_users_path, class: 'link text-sm' %>
<% else %>
2024-10-24 20:18:51 +03:00
<% archived_exists = current_account.users.archived.where.not(role: 'integration').exists? %>
2026-04-08 11:23:59 +03:00
<% if (integration_exists = current_account.users.active.exists?(role: 'integration')) %>
<% if is_with_download %>
<span class="text-neutral-700">|</span>
<% end %>
2024-10-24 20:18:51 +03:00
<%= link_to t('view_embedding_users'), settings_integration_users_path, class: 'link text-sm' %>
<% if archived_exists %>
<span class="text-neutral-700">|</span>
<% end %>
2024-10-24 20:09:57 +03:00
<% end %>
2024-10-24 20:18:51 +03:00
<% if archived_exists %>
2026-04-08 11:23:59 +03:00
<% if !integration_exists && is_with_download %>
<span class="text-neutral-700">|</span>
<% end %>
2024-10-24 20:18:51 +03:00
<%= link_to t('view_archived'), settings_archived_users_path, class: 'link text-sm' %>
2024-10-24 20:09:57 +03:00
<% end %>
<% end %>
</div>