2022-01-06 07:14:04 -05:00
|
|
|
- if registration_features_can_be_prompted?
|
2022-04-05 14:09:00 -04:00
|
|
|
= render Pajamas::AlertComponent.new(variant: :tip,
|
2022-01-06 07:14:04 -05:00
|
|
|
alert_class: 'gl-my-5',
|
2022-05-05 20:07:56 -04:00
|
|
|
dismissible: false) do |c|
|
|
|
|
= c.body do
|
2022-01-06 07:14:04 -05:00
|
|
|
= render 'shared/registration_features_discovery_message', feature_title: s_('RegistrationFeatures|send emails to users')
|
|
|
|
|
2022-02-01 01:17:35 -05:00
|
|
|
.top-area
|
|
|
|
.scrolling-tabs-container.inner-page-scroll-tabs.gl-flex-grow-1.gl-min-w-0.gl-w-full
|
|
|
|
.fade-left
|
|
|
|
= sprite_icon('chevron-lg-left', size: 12)
|
|
|
|
.fade-right
|
|
|
|
= sprite_icon('chevron-lg-right', size: 12)
|
|
|
|
= gl_tabs_nav({ class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-w-full' }) do
|
|
|
|
= gl_tab_link_to admin_users_path, { item_active: active_when(params[:filter].nil?), class: 'gl-border-0!' } do
|
|
|
|
= s_('AdminUsers|Active')
|
|
|
|
= gl_tab_counter_badge(limited_counter_with_delimiter(User.active_without_ghosts))
|
|
|
|
= gl_tab_link_to admin_users_path(filter: "admins"), { item_active: active_when(params[:filter] == 'admins'), class: 'gl-border-0!' } do
|
|
|
|
= s_('AdminUsers|Admins')
|
|
|
|
= gl_tab_counter_badge(limited_counter_with_delimiter(User.admins))
|
|
|
|
= gl_tab_link_to admin_users_path(filter: 'two_factor_enabled'), { item_active: active_when(params[:filter] == 'two_factor_enabled'), class: 'filter-two-factor-enabled gl-border-0!' } do
|
|
|
|
= s_('AdminUsers|2FA Enabled')
|
|
|
|
= gl_tab_counter_badge(limited_counter_with_delimiter(User.with_two_factor))
|
|
|
|
= gl_tab_link_to admin_users_path(filter: 'two_factor_disabled'), { item_active: active_when(params[:filter] == 'two_factor_disabled'), class: 'filter-two-factor-disabled gl-border-0!' } do
|
|
|
|
= s_('AdminUsers|2FA Disabled')
|
|
|
|
= gl_tab_counter_badge(limited_counter_with_delimiter(User.without_two_factor))
|
|
|
|
= gl_tab_link_to admin_users_path(filter: 'external'), { item_active: active_when(params[:filter] == 'external'), class: 'gl-border-0!' } do
|
|
|
|
= s_('AdminUsers|External')
|
|
|
|
= gl_tab_counter_badge(limited_counter_with_delimiter(User.external))
|
|
|
|
= gl_tab_link_to admin_users_path(filter: "blocked"), { item_active: active_when(params[:filter] == 'blocked'), class: 'gl-border-0!' } do
|
|
|
|
= s_('AdminUsers|Blocked')
|
|
|
|
= gl_tab_counter_badge(limited_counter_with_delimiter(User.blocked))
|
|
|
|
- if ban_feature_available?
|
|
|
|
= gl_tab_link_to admin_users_path(filter: "banned"), { item_active: active_when(params[:filter] == 'banned'), class: 'gl-border-0!' } do
|
|
|
|
= s_('AdminUsers|Banned')
|
|
|
|
= gl_tab_counter_badge(limited_counter_with_delimiter(User.banned))
|
|
|
|
= gl_tab_link_to admin_users_path(filter: "blocked_pending_approval"), { item_active: active_when(params[:filter] == 'blocked_pending_approval'), class: 'filter-blocked-pending-approval gl-border-0!', data: { qa_selector: 'pending_approval_tab' } } do
|
|
|
|
= s_('AdminUsers|Pending approval')
|
|
|
|
= gl_tab_counter_badge(limited_counter_with_delimiter(User.blocked_pending_approval))
|
|
|
|
= gl_tab_link_to admin_users_path(filter: "deactivated"), { item_active: active_when(params[:filter] == 'deactivated'), class: 'gl-border-0!' } do
|
|
|
|
= s_('AdminUsers|Deactivated')
|
|
|
|
= gl_tab_counter_badge(limited_counter_with_delimiter(User.deactivated))
|
|
|
|
= gl_tab_link_to admin_users_path(filter: "wop"), { item_active: active_when(params[:filter] == 'wop'), class: 'gl-border-0!' } do
|
|
|
|
= s_('AdminUsers|Without projects')
|
|
|
|
= gl_tab_counter_badge(limited_counter_with_delimiter(User.without_projects))
|
2021-01-27 10:09:15 -05:00
|
|
|
.nav-controls
|
|
|
|
= render_if_exists 'admin/users/admin_email_users'
|
|
|
|
= render_if_exists 'admin/users/admin_export_user_permissions'
|
2021-03-04 22:08:54 -05:00
|
|
|
= link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-confirm btn-search float-right'
|
2021-01-27 10:09:15 -05:00
|
|
|
|
|
|
|
.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?
|
2022-03-03 19:18:28 -05:00
|
|
|
.dropdown.gl-sm-ml-3
|
|
|
|
= label_tag s_('AdminUsers|Sort by')
|
|
|
|
= gl_redirect_listbox_tag admin_users_sort_options(filter: params[:filter], search_query: params[:search_query]), @sort, data: { right: true }
|
2021-01-27 10:09:15 -05:00
|
|
|
|
2021-06-09 20:10:09 -04:00
|
|
|
#js-admin-users-app{ data: admin_users_data_attributes(@users) }
|
2022-03-17 17:08:35 -04:00
|
|
|
= gl_loading_icon(size: 'lg', css_class: 'gl-my-7')
|
2021-01-27 10:09:15 -05:00
|
|
|
|
2021-04-22 08:09:49 -04:00
|
|
|
= paginate_collection @users
|