2016-06-14 16:37:02 -04:00
|
|
|
- @no_container = true
|
2015-04-30 13:06:18 -04:00
|
|
|
- page_title "Users"
|
2015-04-26 18:43:02 -04:00
|
|
|
|
2016-06-30 09:01:26 -04:00
|
|
|
%div{ class: container_class }
|
2017-05-18 17:39:19 -04:00
|
|
|
.prepend-top-default
|
|
|
|
= form_tag admin_users_path, method: :get do
|
|
|
|
- if params[:filter].present?
|
|
|
|
= hidden_field_tag "filter", h(params[:filter])
|
|
|
|
.search-holder
|
|
|
|
.search-field-holder
|
|
|
|
= search_field_tag :search_query, params[:search_query], placeholder: 'Search by name, email or username', class: 'form-control search-text-input js-search-input', spellcheck: false
|
|
|
|
= icon("search", class: "search-icon")
|
|
|
|
.dropdown
|
|
|
|
- toggle_text = if @sort.present? then sort_options_hash[@sort] else sort_title_name end
|
|
|
|
= dropdown_toggle(toggle_text, { toggle: 'dropdown' })
|
2018-04-17 13:18:41 -04:00
|
|
|
%ul.dropdown-menu.dropdown-menu-right
|
2017-05-18 17:39:19 -04:00
|
|
|
%li.dropdown-header
|
|
|
|
Sort by
|
|
|
|
%li
|
|
|
|
= link_to admin_users_path(sort: sort_value_name, filter: params[:filter]) do
|
|
|
|
= sort_title_name
|
|
|
|
= link_to admin_users_path(sort: sort_value_recently_signin, filter: params[:filter]) do
|
|
|
|
= sort_title_recently_signin
|
|
|
|
= link_to admin_users_path(sort: sort_value_oldest_signin, filter: params[:filter]) do
|
|
|
|
= sort_title_oldest_signin
|
|
|
|
= link_to admin_users_path(sort: sort_value_recently_created, filter: params[:filter]) do
|
|
|
|
= sort_title_recently_created
|
|
|
|
= link_to admin_users_path(sort: sort_value_oldest_created, filter: params[:filter]) do
|
|
|
|
= sort_title_oldest_created
|
|
|
|
= link_to admin_users_path(sort: sort_value_recently_updated, filter: params[:filter]) do
|
|
|
|
= sort_title_recently_updated
|
|
|
|
= link_to admin_users_path(sort: sort_value_oldest_updated, filter: params[:filter]) do
|
|
|
|
= sort_title_oldest_updated
|
|
|
|
= link_to 'New user', new_admin_user_path, class: 'btn btn-new btn-search'
|
2012-04-16 16:33:03 -04:00
|
|
|
|
2017-05-18 17:39:19 -04:00
|
|
|
.top-area.scrolling-tabs-container.inner-page-scroll-tabs
|
|
|
|
.fade-left
|
|
|
|
= icon('angle-left')
|
|
|
|
.fade-right
|
|
|
|
= icon('angle-right')
|
2018-04-19 23:34:20 -04:00
|
|
|
%ul.nav-links.nav.nav-tabs.scrolling-tabs
|
2017-02-12 03:02:26 -05:00
|
|
|
= nav_link(html_options: { class: active_when(params[:filter].nil?) }) do
|
2016-05-26 18:55:49 -04:00
|
|
|
= link_to admin_users_path do
|
|
|
|
Active
|
2018-05-08 11:49:30 -04:00
|
|
|
%small.badge.badge-pill= limited_counter_with_delimiter(User.active)
|
2017-02-12 03:02:26 -05:00
|
|
|
= nav_link(html_options: { class: active_when(params[:filter] == 'admins') }) do
|
2016-05-26 18:55:49 -04:00
|
|
|
= link_to admin_users_path(filter: "admins") do
|
|
|
|
Admins
|
2018-05-08 11:49:30 -04:00
|
|
|
%small.badge.badge-pill= limited_counter_with_delimiter(User.admins)
|
2017-02-12 03:02:26 -05:00
|
|
|
= nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_enabled')} filter-two-factor-enabled" }) do
|
2016-05-26 18:55:49 -04:00
|
|
|
= link_to admin_users_path(filter: 'two_factor_enabled') do
|
|
|
|
2FA Enabled
|
2018-05-08 11:49:30 -04:00
|
|
|
%small.badge.badge-pill= limited_counter_with_delimiter(User.with_two_factor)
|
2017-02-12 03:02:26 -05:00
|
|
|
= nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_disabled')} filter-two-factor-disabled" }) do
|
2016-05-26 18:55:49 -04:00
|
|
|
= link_to admin_users_path(filter: 'two_factor_disabled') do
|
|
|
|
2FA Disabled
|
2018-05-08 11:49:30 -04:00
|
|
|
%small.badge.badge-pill= limited_counter_with_delimiter(User.without_two_factor)
|
2017-02-12 03:02:26 -05:00
|
|
|
= nav_link(html_options: { class: active_when(params[:filter] == 'external') }) do
|
2016-05-26 18:55:49 -04:00
|
|
|
= link_to admin_users_path(filter: 'external') do
|
|
|
|
External
|
2018-05-08 11:49:30 -04:00
|
|
|
%small.badge.badge-pill= limited_counter_with_delimiter(User.external)
|
2017-02-12 03:02:26 -05:00
|
|
|
= nav_link(html_options: { class: active_when(params[:filter] == 'blocked') }) do
|
2016-05-26 18:55:49 -04:00
|
|
|
= link_to admin_users_path(filter: "blocked") do
|
|
|
|
Blocked
|
2018-05-08 11:49:30 -04:00
|
|
|
%small.badge.badge-pill= limited_counter_with_delimiter(User.blocked)
|
2017-02-12 03:02:26 -05:00
|
|
|
= nav_link(html_options: { class: active_when(params[:filter] == 'wop') }) do
|
2016-05-26 18:55:49 -04:00
|
|
|
= link_to admin_users_path(filter: "wop") do
|
|
|
|
Without projects
|
2018-05-08 11:49:30 -04:00
|
|
|
%small.badge.badge-pill= limited_counter_with_delimiter(User.without_projects)
|
2016-01-13 11:26:45 -05:00
|
|
|
|
2016-12-05 10:59:30 -05:00
|
|
|
%ul.flex-list.content-list
|
2016-05-26 18:55:49 -04:00
|
|
|
- if @users.empty?
|
|
|
|
%li
|
|
|
|
.nothing-here-block No users found.
|
|
|
|
- else
|
|
|
|
= render partial: 'admin/users/user', collection: @users
|
2016-01-13 11:26:45 -05:00
|
|
|
|
2016-06-14 16:37:02 -04:00
|
|
|
= paginate @users, theme: "gitlab"
|
2018-02-08 00:17:12 -05:00
|
|
|
|
|
|
|
#delete-user-modal
|
|
|
|
|