2021-03-11 19:13:27 +05:30
|
|
|
.top-area.scrolling-tabs-container.inner-page-scroll-tabs
|
|
|
|
.fade-left
|
|
|
|
= sprite_icon('chevron-lg-left', size: 12)
|
|
|
|
.fade-right
|
|
|
|
= sprite_icon('chevron-lg-right', size: 12)
|
|
|
|
%ul.nav-links.nav.nav-tabs.scrolling-tabs
|
|
|
|
= nav_link(html_options: { class: active_when(params[:filter].nil?) }) do
|
|
|
|
= link_to admin_users_path do
|
|
|
|
= s_('AdminUsers|Active')
|
2021-06-08 01:23:25 +05:30
|
|
|
%small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.active_without_ghosts)
|
2021-03-11 19:13:27 +05:30
|
|
|
= nav_link(html_options: { class: active_when(params[:filter] == 'admins') }) do
|
|
|
|
= link_to admin_users_path(filter: "admins") do
|
|
|
|
= s_('AdminUsers|Admins')
|
2021-06-08 01:23:25 +05:30
|
|
|
%small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.admins)
|
2021-03-11 19:13:27 +05:30
|
|
|
= nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_enabled')} filter-two-factor-enabled" }) do
|
|
|
|
= link_to admin_users_path(filter: 'two_factor_enabled') do
|
|
|
|
= s_('AdminUsers|2FA Enabled')
|
2021-06-08 01:23:25 +05:30
|
|
|
%small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.with_two_factor)
|
2021-03-11 19:13:27 +05:30
|
|
|
= nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_disabled')} filter-two-factor-disabled" }) do
|
|
|
|
= link_to admin_users_path(filter: 'two_factor_disabled') do
|
|
|
|
= s_('AdminUsers|2FA Disabled')
|
2021-06-08 01:23:25 +05:30
|
|
|
%small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.without_two_factor)
|
2021-03-11 19:13:27 +05:30
|
|
|
= nav_link(html_options: { class: active_when(params[:filter] == 'external') }) do
|
|
|
|
= link_to admin_users_path(filter: 'external') do
|
|
|
|
= s_('AdminUsers|External')
|
2021-06-08 01:23:25 +05:30
|
|
|
%small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.external)
|
2021-03-11 19:13:27 +05:30
|
|
|
= nav_link(html_options: { class: active_when(params[:filter] == 'blocked') }) do
|
|
|
|
= link_to admin_users_path(filter: "blocked") do
|
|
|
|
= s_('AdminUsers|Blocked')
|
2021-06-08 01:23:25 +05:30
|
|
|
%small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.blocked)
|
|
|
|
- if ban_feature_available?
|
|
|
|
= nav_link(html_options: { class: active_when(params[:filter] == 'banned') }) do
|
|
|
|
= link_to admin_users_path(filter: "banned") do
|
|
|
|
= s_('AdminUsers|Banned')
|
|
|
|
%small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.banned)
|
2021-03-11 19:13:27 +05:30
|
|
|
= nav_link(html_options: { class: "#{active_when(params[:filter] == 'blocked_pending_approval')} filter-blocked-pending-approval" }) do
|
|
|
|
= link_to admin_users_path(filter: "blocked_pending_approval"), data: { qa_selector: 'pending_approval_tab' } do
|
|
|
|
= s_('AdminUsers|Pending approval')
|
2021-06-08 01:23:25 +05:30
|
|
|
%small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.blocked_pending_approval)
|
2021-03-11 19:13:27 +05:30
|
|
|
= nav_link(html_options: { class: active_when(params[:filter] == 'deactivated') }) do
|
|
|
|
= link_to admin_users_path(filter: "deactivated") do
|
|
|
|
= s_('AdminUsers|Deactivated')
|
2021-06-08 01:23:25 +05:30
|
|
|
%small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.deactivated)
|
2021-03-11 19:13:27 +05:30
|
|
|
= nav_link(html_options: { class: active_when(params[:filter] == 'wop') }) do
|
|
|
|
= link_to admin_users_path(filter: "wop") do
|
|
|
|
= s_('AdminUsers|Without projects')
|
2021-06-08 01:23:25 +05:30
|
|
|
%small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.without_projects)
|
2021-03-11 19:13:27 +05:30
|
|
|
.nav-controls
|
|
|
|
= render_if_exists 'admin/users/admin_email_users'
|
|
|
|
= render_if_exists 'admin/users/admin_export_user_permissions'
|
2021-04-17 20:07:23 +05:30
|
|
|
= link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-confirm btn-search float-right'
|
2021-03-11 19:13:27 +05:30
|
|
|
|
|
|
|
.filtered-search-block.row-content-block.border-top-0
|
|
|
|
= form_tag admin_users_path, method: :get do
|
|
|
|
- if params[:filter].present?
|
|
|
|
= hidden_field_tag "filter", h(params[:filter])
|
|
|
|
.search-holder
|
|
|
|
.search-field-holder.gl-mb-4
|
|
|
|
= search_field_tag :search_query, params[:search_query], placeholder: s_('AdminUsers|Search by name, email or username'), class: 'form-control search-text-input js-search-input', spellcheck: false, data: { qa_selector: 'user_search_field' }
|
|
|
|
- if @sort.present?
|
|
|
|
= hidden_field_tag :sort, @sort
|
|
|
|
= sprite_icon('search', css_class: 'search-icon')
|
|
|
|
= button_tag s_('AdminUsers|Search users') if Rails.env.test?
|
|
|
|
.dropdown.user-sort-dropdown
|
|
|
|
= label_tag 'Sort by', nil, class: 'label-bold'
|
|
|
|
- toggle_text = @sort.present? ? users_sort_options_hash[@sort] : sort_title_name
|
|
|
|
= dropdown_toggle(toggle_text, { toggle: 'dropdown' })
|
|
|
|
%ul.dropdown-menu.dropdown-menu-right
|
|
|
|
%li.dropdown-header
|
|
|
|
= s_('AdminUsers|Sort by')
|
|
|
|
%li
|
|
|
|
- users_sort_options_hash.each do |value, title|
|
|
|
|
= link_to admin_users_path(sort: value, filter: params[:filter], search_query: params[:search_query]) do
|
|
|
|
= title
|
|
|
|
|
2021-09-04 01:27:46 +05:30
|
|
|
#js-admin-users-app{ data: admin_users_data_attributes(@users) }
|
|
|
|
.gl-spinner-container.gl-my-7
|
|
|
|
%span.gl-vertical-align-bottom.gl-spinner.gl-spinner-dark.gl-spinner-lg{ aria: { label: _('Loading') } }
|
2021-03-11 19:13:27 +05:30
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
= paginate_collection @users
|
2021-03-11 19:13:27 +05:30
|
|
|
|
|
|
|
= render partial: 'admin/users/modals'
|