Commit f956514b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dont use nav-pills. Instead use nav-lists

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 3238b0bc
...@@ -100,16 +100,6 @@ ...@@ -100,16 +100,6 @@
} }
.nav-pills > li > a {
color: #666;
}
.nav-pills > .active > a > span > .badge {
background-color: #fff;
color: $gl-primary;
}
/** /**
* fix to keep tooltips position in top navigation bar * fix to keep tooltips position in top navigation bar
* *
......
...@@ -458,11 +458,11 @@ table.table.protected-branches-list tr.no-border { ...@@ -458,11 +458,11 @@ table.table.protected-branches-list tr.no-border {
padding-top: 10px; padding-top: 10px;
padding-bottom: 4px; padding-bottom: 4px;
ul.nav-pills { ul.nav {
display:inline-block; display:inline-block;
} }
.nav-pills li { .nav li {
display:inline; display:inline;
} }
......
- page_title "Users" - page_title "Users"
= render 'shared/show_aside' = render 'shared/show_aside'
.row .admin-filter
%aside.col-md-3 %ul.nav-links
.admin-filter %li{class: "#{'active' unless params[:filter]}"}
%ul.nav.nav-pills.nav-stacked = link_to admin_users_path do
%li{class: "#{'active' unless params[:filter]}"} Active
= link_to admin_users_path do %small.badge= number_with_delimiter(User.active.count)
Active %li{class: "#{'active' if params[:filter] == "admins"}"}
%small.pull-right= number_with_delimiter(User.active.count) = link_to admin_users_path(filter: "admins") do
%li{class: "#{'active' if params[:filter] == "admins"}"} Admins
= link_to admin_users_path(filter: "admins") do %small.badge= number_with_delimiter(User.admins.count)
Admins %li.filter-two-factor-enabled{class: "#{'active' if params[:filter] == 'two_factor_enabled'}"}
%small.pull-right= number_with_delimiter(User.admins.count) = link_to admin_users_path(filter: 'two_factor_enabled') do
%li.filter-two-factor-enabled{class: "#{'active' if params[:filter] == 'two_factor_enabled'}"} 2FA Enabled
= link_to admin_users_path(filter: 'two_factor_enabled') do %small.badge= number_with_delimiter(User.with_two_factor.count)
2FA Enabled %li.filter-two-factor-disabled{class: "#{'active' if params[:filter] == 'two_factor_disabled'}"}
%small.pull-right= number_with_delimiter(User.with_two_factor.count) = link_to admin_users_path(filter: 'two_factor_disabled') do
%li.filter-two-factor-disabled{class: "#{'active' if params[:filter] == 'two_factor_disabled'}"} 2FA Disabled
= link_to admin_users_path(filter: 'two_factor_disabled') do %small.badge= number_with_delimiter(User.without_two_factor.count)
2FA Disabled %li{class: "#{'active' if params[:filter] == "blocked"}"}
%small.pull-right= number_with_delimiter(User.without_two_factor.count) = link_to admin_users_path(filter: "blocked") do
%li{class: "#{'active' if params[:filter] == "blocked"}"} Blocked
= link_to admin_users_path(filter: "blocked") do %small.badge= number_with_delimiter(User.blocked.count)
Blocked %li{class: "#{'active' if params[:filter] == "wop"}"}
%small.pull-right= number_with_delimiter(User.blocked.count) = link_to admin_users_path(filter: "wop") do
%li{class: "#{'active' if params[:filter] == "wop"}"} Without projects
= link_to admin_users_path(filter: "wop") do %small.badge= number_with_delimiter(User.without_projects.count)
Without projects
%small.pull-right= number_with_delimiter(User.without_projects.count)
%hr
= form_tag admin_users_path, method: :get, class: 'form-inline' do
.form-group
= search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control', spellcheck: false
= hidden_field_tag "filter", params[:filter]
= button_tag class: 'btn btn-primary' do
%i.fa.fa-search
%hr
= link_to 'Reset', admin_users_path, class: "btn btn-cancel"
%section.col-md-9 .gray-content-block.second-block
.panel.panel-default .pull-right
.panel-heading .dropdown.inline
Users (#{number_with_delimiter(@users.total_count)}) %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
.panel-head-actions %span.light sort:
.dropdown.inline - if @sort.present?
%a.dropdown-toggle.btn.btn-sm{href: '#', "data-toggle" => "dropdown"} = sort_options_hash[@sort]
%span.light sort: - else
- if @sort.present? = sort_title_name
= sort_options_hash[@sort] %b.caret
- else %ul.dropdown-menu
= sort_title_name
%b.caret
%ul.dropdown-menu
%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-sm"
%ul.well-list
- @users.each do |user|
%li %li
.list-item-name = link_to admin_users_path(sort: sort_value_name, filter: params[:filter]) do
- if user.blocked? = sort_title_name
%i.fa.fa-lock.cred = link_to admin_users_path(sort: sort_value_recently_signin, filter: params[:filter]) do
- else = sort_title_recently_signin
%i.fa.fa-user.cgreen = link_to admin_users_path(sort: sort_value_oldest_signin, filter: params[:filter]) do
= link_to user.name, [:admin, user] = sort_title_oldest_signin
- if user.admin? = link_to admin_users_path(sort: sort_value_recently_created, filter: params[:filter]) do
%strong.cred (Admin) = sort_title_recently_created
- if user == current_user = link_to admin_users_path(sort: sort_value_oldest_created, filter: params[:filter]) do
%span.cred It's you! = sort_title_oldest_created
.pull-right = link_to admin_users_path(sort: sort_value_recently_updated, filter: params[:filter]) do
%span.light = sort_title_recently_updated
%i.fa.fa-envelope = link_to admin_users_path(sort: sort_value_oldest_updated, filter: params[:filter]) do
= mail_to user.email, user.email, class: 'light' = sort_title_oldest_updated
&nbsp;
= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-xs" = link_to 'New User', new_admin_user_path, class: "btn btn-new"
- unless user == current_user = form_tag admin_users_path, method: :get, class: 'form-inline' do
- if user.blocked? .form-group
= link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success" = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control', spellcheck: false
- else = hidden_field_tag "filter", params[:filter]
= link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs btn-warning" = button_tag class: 'btn btn-primary' do
- if user.access_locked? %i.fa.fa-search
= link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success", data: { confirm: 'Are you sure?' }
- if user.can_be_removed?
= link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All issues, merge requests and groups linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: "btn btn-xs btn-remove" .panel.panel-default
= paginate @users, theme: "gitlab" %ul.well-list
- @users.each do |user|
%li
.list-item-name
- if user.blocked?
%i.fa.fa-lock.cred
- else
%i.fa.fa-user.cgreen
= link_to user.name, [:admin, user]
- if user.admin?
%strong.cred (Admin)
- if user == current_user
%span.cred It's you!
.pull-right
%span.light
%i.fa.fa-envelope
= mail_to user.email, user.email, class: 'light'
&nbsp;
= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-xs"
- unless user == current_user
- if user.blocked?
= link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success"
- else
= link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs btn-warning"
- if user.access_locked?
= link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success", data: { confirm: 'Are you sure?' }
- if user.can_be_removed?
= link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All issues, merge requests and groups linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: "btn btn-xs btn-remove"
= paginate @users, theme: "gitlab"
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
= render "home_panel" = render "home_panel"
.project-stats.gray-content-block.second-block .project-stats.gray-content-block.second-block
%ul.nav.nav-pills %ul.nav
%li %li
= link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do = link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do
= pluralize(number_with_delimiter(@project.commit_count), 'commit') = pluralize(number_with_delimiter(@project.commit_count), 'commit')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment