Commit 922a164d authored by Annabel Dunstone's avatar Annabel Dunstone

Add sub links to overview

parent 736ba42b
%ul.nav-links.sub-nav
%div{ class: (container_class) }
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do
= link_to admin_root_path, title: 'Overview' do
%span
Overview
= nav_link(controller: [:admin, :projects]) do
= link_to admin_namespaces_projects_path, title: 'Projects' do
%span
Projects
= nav_link(controller: :users) do
= link_to admin_users_path, title: 'Users' do
%span
Users
= nav_link(controller: :groups) do
= link_to admin_groups_path, title: 'Groups' do
%span
Groups
.admin-dashboard.prepend-top-default - @no_container = true
.row = render "admin/dashboard/head"
.col-md-4
%h4 Statistics
%hr
%p
Forks
%span.light.pull-right
= number_with_delimiter(ForkedProjectLink.count)
%p
Issues
%span.light.pull-right
= number_with_delimiter(Issue.count)
%p
Merge Requests
%span.light.pull-right
= number_with_delimiter(MergeRequest.count)
%p
Notes
%span.light.pull-right
= number_with_delimiter(Note.count)
%p
Snippets
%span.light.pull-right
= number_with_delimiter(Snippet.count)
%p
SSH Keys
%span.light.pull-right
= number_with_delimiter(Key.count)
%p
Milestones
%span.light.pull-right
= number_with_delimiter(Milestone.count)
%p
Active Users
%span.light.pull-right
= number_with_delimiter(User.active.count)
.col-md-4
%h4
Features
%hr
%p
Sign up
%span.light.pull-right
= boolean_to_icon signup_enabled?
%p
LDAP
%span.light.pull-right
= boolean_to_icon Gitlab.config.ldap.enabled
%p
Gravatar
%span.light.pull-right
= boolean_to_icon gravatar_enabled?
%p
OmniAuth
%span.light.pull-right
= boolean_to_icon Gitlab.config.omniauth.enabled
%p
Reply by email
%span.light.pull-right
= boolean_to_icon Gitlab::IncomingEmail.enabled?
.col-md-4
%h4
Components
- if current_application_settings.version_check_enabled
.pull-right
= version_status_badge
%hr %div{ class: (container_class) }
%p .admin-dashboard.prepend-top-default
GitLab .row
%span.pull-right .col-md-4
= Gitlab::VERSION %h4 Statistics
%p %hr
GitLab Shell
%span.pull-right
= Gitlab::Shell.new.version
%p
GitLab API
%span.pull-right
= API::API::version
%p
Git
%span.pull-right
= Gitlab::Git.version
%p
Ruby
%span.pull-right
#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}
%p
Rails
%span.pull-right
#{Rails::VERSION::STRING}
%p
= Gitlab::Database.adapter_name
%span.pull-right
= Gitlab::Database.version
%hr
.row
.col-sm-4
.light-well
%h4 Projects
.data
= link_to admin_namespaces_projects_path do
%h1= number_with_delimiter(Project.count)
%hr
= link_to('New Project', new_project_path, class: "btn btn-new")
.col-sm-4
.light-well
%h4 Users
.data
= link_to admin_users_path do
%h1= number_with_delimiter(User.count)
%hr
= link_to 'New User', new_admin_user_path, class: "btn btn-new"
.col-sm-4
.light-well
%h4 Groups
.data
= link_to admin_groups_path do
%h1= number_with_delimiter(Group.count)
%hr
= link_to 'New Group', new_admin_group_path, class: "btn btn-new"
.row.prepend-top-10
.col-md-4
%h4 Latest projects
%hr
- @projects.each do |project|
%p %p
= link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project], class: 'str-truncated' Forks
%span.light.pull-right %span.light.pull-right
#{time_ago_with_tooltip(project.created_at)} = number_with_delimiter(ForkedProjectLink.count)
.col-md-4
%h4 Latest users
%hr
- @users.each do |user|
%p %p
= link_to [:admin, user], class: 'str-truncated' do Issues
= user.name
%span.light.pull-right %span.light.pull-right
#{time_ago_with_tooltip(user.created_at)} = number_with_delimiter(Issue.count)
%p
.col-md-4 Merge Requests
%h4 Latest groups %span.light.pull-right
%hr = number_with_delimiter(MergeRequest.count)
- @groups.each do |group| %p
Notes
%span.light.pull-right
= number_with_delimiter(Note.count)
%p
Snippets
%span.light.pull-right
= number_with_delimiter(Snippet.count)
%p
SSH Keys
%span.light.pull-right
= number_with_delimiter(Key.count)
%p
Milestones
%span.light.pull-right
= number_with_delimiter(Milestone.count)
%p
Active Users
%span.light.pull-right
= number_with_delimiter(User.active.count)
.col-md-4
%h4
Features
%hr
%p
Sign up
%span.light.pull-right
= boolean_to_icon signup_enabled?
%p %p
= link_to [:admin, group], class: 'str-truncated' do LDAP
= group.name
%span.light.pull-right %span.light.pull-right
#{time_ago_with_tooltip(group.created_at)} = boolean_to_icon Gitlab.config.ldap.enabled
%p
Gravatar
%span.light.pull-right
= boolean_to_icon gravatar_enabled?
%p
OmniAuth
%span.light.pull-right
= boolean_to_icon Gitlab.config.omniauth.enabled
%p
Reply by email
%span.light.pull-right
= boolean_to_icon Gitlab::IncomingEmail.enabled?
.col-md-4
%h4
Components
- if current_application_settings.version_check_enabled
.pull-right
= version_status_badge
%hr
%p
GitLab
%span.pull-right
= Gitlab::VERSION
%p
GitLab Shell
%span.pull-right
= Gitlab::Shell.new.version
%p
GitLab API
%span.pull-right
= API::API::version
%p
Git
%span.pull-right
= Gitlab::Git.version
%p
Ruby
%span.pull-right
#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}
%p
Rails
%span.pull-right
#{Rails::VERSION::STRING}
%p
= Gitlab::Database.adapter_name
%span.pull-right
= Gitlab::Database.version
%hr
.row
.col-sm-4
.light-well
%h4 Projects
.data
= link_to admin_namespaces_projects_path do
%h1= number_with_delimiter(Project.count)
%hr
= link_to('New Project', new_project_path, class: "btn btn-new")
.col-sm-4
.light-well
%h4 Users
.data
= link_to admin_users_path do
%h1= number_with_delimiter(User.count)
%hr
= link_to 'New User', new_admin_user_path, class: "btn btn-new"
.col-sm-4
.light-well
%h4 Groups
.data
= link_to admin_groups_path do
%h1= number_with_delimiter(Group.count)
%hr
= link_to 'New Group', new_admin_group_path, class: "btn btn-new"
.row.prepend-top-10
.col-md-4
%h4 Latest projects
%hr
- @projects.each do |project|
%p
= link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project], class: 'str-truncated'
%span.light.pull-right
#{time_ago_with_tooltip(project.created_at)}
.col-md-4
%h4 Latest users
%hr
- @users.each do |user|
%p
= link_to [:admin, user], class: 'str-truncated' do
= user.name
%span.light.pull-right
#{time_ago_with_tooltip(user.created_at)}
.col-md-4
%h4 Latest groups
%hr
- @groups.each do |group|
%p
= link_to [:admin, group], class: 'str-truncated' do
= group.name
%span.light.pull-right
#{time_ago_with_tooltip(group.created_at)}
- @no_container = true
- page_title "Groups" - page_title "Groups"
%h3.page-title = render "admin/dashboard/head"
Groups (#{number_with_delimiter(@groups.total_count)})
%p.light %div{ class: (container_class) }
Group allows you to keep projects organized. %h3.page-title
Use groups for uniting related projects. Groups (#{number_with_delimiter(@groups.total_count)})
.top-area %p.light
.nav-search Group allows you to keep projects organized.
= form_tag admin_groups_path, method: :get, class: 'form-inline' do Use groups for uniting related projects.
= hidden_field_tag :sort, @sort
= text_field_tag :name, params[:name], class: "form-control"
= button_tag "Search", class: "btn submit btn-primary"
.nav-controls .top-area
.dropdown.inline .nav-search
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} = form_tag admin_groups_path, method: :get, class: 'form-inline' do
%span.light = hidden_field_tag :sort, @sort
- if @sort.present? = text_field_tag :name, params[:name], class: "form-control"
= sort_options_hash[@sort] = button_tag "Search", class: "btn submit btn-primary"
- else
= sort_title_recently_created .nav-controls
%b.caret .dropdown.inline
%ul.dropdown-menu %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%li %span.light
= link_to admin_groups_path(sort: sort_value_recently_created) do - if @sort.present?
= sort_options_hash[@sort]
- else
= sort_title_recently_created = sort_title_recently_created
= link_to admin_groups_path(sort: sort_value_oldest_created) do %b.caret
= sort_title_oldest_created %ul.dropdown-menu
= link_to admin_groups_path(sort: sort_value_recently_updated) do %li
= sort_title_recently_updated = link_to admin_groups_path(sort: sort_value_recently_created) do
= link_to admin_groups_path(sort: sort_value_oldest_updated) do = sort_title_recently_created
= sort_title_oldest_updated = link_to admin_groups_path(sort: sort_value_oldest_created) do
= link_to 'New Group', new_admin_group_path, class: "btn btn-new" = sort_title_oldest_created
= link_to admin_groups_path(sort: sort_value_recently_updated) do
= sort_title_recently_updated
= link_to admin_groups_path(sort: sort_value_oldest_updated) do
= sort_title_oldest_updated
= link_to 'New Group', new_admin_group_path, class: "btn btn-new"
%ul.content-list %ul.content-list
- @groups.each do |group| - @groups.each do |group|
= render 'group', group: group = render 'group', group: group
= paginate @groups, theme: "gitlab" = paginate @groups, theme: "gitlab"
- @no_container = true
- page_title "Projects" - page_title "Projects"
= render 'shared/show_aside' = render 'shared/show_aside'
= render "admin/dashboard/head"
.row.prepend-top-default %div{ class: (container_class) }
%aside.col-md-3 .row.prepend-top-default
.panel.admin-filter %aside.col-md-3
= form_tag admin_namespaces_projects_path, method: :get, class: '' do .panel.admin-filter
.form-group = form_tag admin_namespaces_projects_path, method: :get, class: '' do
= label_tag :name, 'Name:' .form-group
= text_field_tag :name, params[:name], class: "form-control" = label_tag :name, 'Name:'
= text_field_tag :name, params[:name], class: "form-control"
.form-group .form-group
= label_tag :namespace_id, "Namespace" = label_tag :namespace_id, "Namespace"
= namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large' = namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large'
.form-group .form-group
%strong Activity %strong Activity
.checkbox .checkbox
= label_tag :with_push do = label_tag :with_push do
= check_box_tag :with_push, 1, params[:with_push] = check_box_tag :with_push, 1, params[:with_push]
%span Projects with push events %span Projects with push events
.checkbox .checkbox
= label_tag :abandoned do = label_tag :abandoned do
= check_box_tag :abandoned, 1, params[:abandoned] = check_box_tag :abandoned, 1, params[:abandoned]
%span No activity over 6 month %span No activity over 6 month
.checkbox .checkbox
= label_tag :with_archived do = label_tag :with_archived do
= check_box_tag :with_archived, 1, params[:with_archived] = check_box_tag :with_archived, 1, params[:with_archived]
%span Show archived projects %span Show archived projects
%fieldset %fieldset
%strong Visibility level: %strong Visibility level:
.visibility-levels .visibility-levels
- Project.visibility_levels.each do |label, level| - Project.visibility_levels.each do |label, level|
.checkbox .checkbox
%label %label
= check_box_tag 'visibility_levels[]', level, params[:visibility_levels].present? && params[:visibility_levels].include?(level.to_s) = check_box_tag 'visibility_levels[]', level, params[:visibility_levels].present? && params[:visibility_levels].include?(level.to_s)
%span.descr %span.descr
= visibility_level_icon(level) = visibility_level_icon(level)
= label = label
%fieldset %fieldset
%strong Problems %strong Problems
.checkbox .checkbox
= label_tag :last_repository_check_failed do = label_tag :last_repository_check_failed do
= check_box_tag :last_repository_check_failed, 1, params[:last_repository_check_failed] = check_box_tag :last_repository_check_failed, 1, params[:last_repository_check_failed]
%span Last repository check failed %span Last repository check failed
= hidden_field_tag :sort, params[:sort] = hidden_field_tag :sort, params[:sort]
= button_tag "Search", class: "btn submit btn-primary" = button_tag "Search", class: "btn submit btn-primary"
= link_to "Reset", admin_namespaces_projects_path, class: "btn btn-cancel" = link_to "Reset", admin_namespaces_projects_path, class: "btn btn-cancel"
%section.col-md-9 %section.col-md-9
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
Projects (#{@projects.total_count}) Projects (#{@projects.total_count})
.controls .controls
.dropdown.inline .dropdown.inline
%button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'} %button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'}
%span.light %span.light
- if @sort.present? - if @sort.present?
= sort_options_hash[@sort] = sort_options_hash[@sort]
- else - else
= sort_title_recently_created
%b.caret
%ul.dropdown-menu
%li
= link_to admin_namespaces_projects_path(sort: sort_value_recently_created) do
= sort_title_recently_created = sort_title_recently_created
= link_to admin_namespaces_projects_path(sort: sort_value_oldest_created) do %b.caret
= sort_title_oldest_created %ul.dropdown-menu
= link_to admin_namespaces_projects_path(sort: sort_value_recently_updated) do %li
= sort_title_recently_updated = link_to admin_namespaces_projects_path(sort: sort_value_recently_created) do
= link_to admin_namespaces_projects_path(sort: sort_value_oldest_updated) do = sort_title_recently_created
= sort_title_oldest_updated = link_to admin_namespaces_projects_path(sort: sort_value_oldest_created) do
= link_to admin_namespaces_projects_path(sort: sort_value_largest_repo) do = sort_title_oldest_created
= sort_title_largest_repo = link_to admin_namespaces_projects_path(sort: sort_value_recently_updated) do
= link_to 'New Project', new_project_path, class: "btn btn-sm btn-success" = sort_title_recently_updated
%ul.well-list = link_to admin_namespaces_projects_path(sort: sort_value_oldest_updated) do
- @projects.each do |project| = sort_title_oldest_updated
%li = link_to admin_namespaces_projects_path(sort: sort_value_largest_repo) do
.list-item-name = sort_title_largest_repo
%span{ class: visibility_level_color(project.visibility_level) } = link_to 'New Project', new_project_path, class: "btn btn-sm btn-success"
= visibility_level_icon(project.visibility_level) %ul.well-list
= link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project] - @projects.each do |project|
.pull-right %li
- if project.archived .list-item-name
%span.label.label-warning archived %span{ class: visibility_level_color(project.visibility_level) }
%span.label.label-gray = visibility_level_icon(project.visibility_level)
= repository_size(project) = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project]
= link_to 'Edit', edit_namespace_project_path(project.namespace, project), id: "edit_#{dom_id(project)}", class: "btn btn-sm" .pull-right
= link_to 'Destroy', [project.namespace.becomes(Namespace), project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-sm btn-remove" - if project.archived
- if @projects.blank? %span.label.label-warning archived
.nothing-here-block 0 projects matches %span.label.label-gray
= paginate @projects, theme: "gitlab" = repository_size(project)
= link_to 'Edit', edit_namespace_project_path(project.namespace, project), id: "edit_#{dom_id(project)}", class: "btn btn-sm"
= link_to 'Destroy', [project.namespace.becomes(Namespace), project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-sm btn-remove"
- if @projects.blank?
.nothing-here-block 0 projects matches
= paginate @projects, theme: "gitlab"
- @no_container = true
- page_title "Users" - page_title "Users"
= render 'shared/show_aside' = render 'shared/show_aside'
= render "admin/dashboard/head"
.admin-filter %div{ class: (container_class) }
%ul.nav-links .admin-filter
%li{class: "#{'active' unless params[:filter]}"} %ul.nav-links
= 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.badge= 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.badge= 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.badge= 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.filter-external{class: "#{'active' if params[:filter] == 'external'}"} %small.badge= number_with_delimiter(User.without_two_factor.count)
= link_to admin_users_path(filter: 'external') do %li.filter-external{class: "#{'active' if params[:filter] == 'external'}"}
External = link_to admin_users_path(filter: 'external') do
%small.badge= number_with_delimiter(User.external.count) External
%li{class: "#{'active' if params[:filter] == "blocked"}"} %small.badge= number_with_delimiter(User.external.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.badge= 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.badge= number_with_delimiter(User.without_projects.count)
.row-content-block.second-block .row-content-block.second-block
.pull-right .pull-right
.dropdown.inline .dropdown.inline
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%span.light %span.light
- if @sort.present? - if @sort.present?
= sort_options_hash[@sort] = sort_options_hash[@sort]
- else - else
= 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 = sort_title_name
= link_to admin_users_path(sort: sort_value_recently_signin, filter: params[:filter]) do %b.caret
= sort_title_recently_signin %ul.dropdown-menu
= link_to admin_users_path(sort: sort_value_oldest_signin, filter: params[:filter]) do %li
= sort_title_oldest_signin = link_to admin_users_path(sort: sort_value_name, filter: params[:filter]) do
= link_to admin_users_path(sort: sort_value_recently_created, filter: params[:filter]) do = sort_title_name
= sort_title_recently_created = link_to admin_users_path(sort: sort_value_recently_signin, filter: params[:filter]) do
= link_to admin_users_path(sort: sort_value_oldest_created, filter: params[:filter]) do = sort_title_recently_signin
= sort_title_oldest_created = link_to admin_users_path(sort: sort_value_oldest_signin, filter: params[:filter]) do
= link_to admin_users_path(sort: sort_value_recently_updated, filter: params[:filter]) do = sort_title_oldest_signin
= sort_title_recently_updated = link_to admin_users_path(sort: sort_value_recently_created, filter: params[:filter]) do
= link_to admin_users_path(sort: sort_value_oldest_updated, filter: params[:filter]) do = sort_title_recently_created
= sort_title_oldest_updated = 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" = link_to 'New User', new_admin_user_path, class: "btn btn-new"
= form_tag admin_users_path, method: :get, class: 'form-inline' do = form_tag admin_users_path, method: :get, class: 'form-inline' do
.form-group .form-group
= search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control', spellcheck: false = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control', spellcheck: false
= hidden_field_tag "filter", params[:filter] = hidden_field_tag "filter", params[:filter]
= button_tag class: 'btn btn-primary' do = button_tag class: 'btn btn-primary' do
%i.fa.fa-search %i.fa.fa-search
.panel.panel-default .panel.panel-default
%ul.well-list %ul.well-list
- @users.each do |user| - @users.each do |user|
%li %li
.list-item-name .list-item-name
- if user.blocked? - if user.blocked?
= icon("lock", class: "cred") = icon("lock", class: "cred")
- else - else
= icon("user", class: "cgreen") = icon("user", class: "cgreen")
= link_to user.name, [:admin, user] = link_to user.name, [:admin, user]
- if user.admin? - if user.admin?
%strong.cred (Admin) %strong.cred (Admin)
- if user.external? - if user.external?
%strong.cred (External) %strong.cred (External)
- if user == current_user - if user == current_user
%span.cred It's you! %span.cred It's you!
.pull-right
%span.light
%i.fa.fa-envelope
= mail_to user.email, user.email, class: 'light'
 
.pull-right .pull-right
= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn-grouped btn btn-xs' %span.light
- unless user == current_user %i.fa.fa-envelope
- if user.ldap_blocked? = mail_to user.email, user.email, class: 'light'
= link_to '#', title: 'Cannot unblock LDAP blocked users', data: {toggle: 'tooltip'}, class: 'btn-grouped btn btn-xs btn-success disabled' do  
%i.fa.fa-lock .pull-right
Unblock = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn-grouped btn btn-xs'
- elsif user.blocked? - unless user == current_user
= link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: 'btn-grouped btn btn-xs btn-success' - if user.ldap_blocked?
- else = link_to '#', title: 'Cannot unblock LDAP blocked users', data: {toggle: 'tooltip'}, class: 'btn-grouped btn btn-xs btn-success disabled' do
= link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: 'btn-grouped btn btn-xs btn-warning' %i.fa.fa-lock
- if user.access_locked? Unblock
= link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: 'btn-grouped btn btn-xs btn-success', data: { confirm: 'Are you sure?' } - elsif user.blocked?
- if user.can_be_removed? = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: 'btn-grouped btn btn-xs btn-success'
= 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-grouped btn btn-xs btn-remove' - else
= paginate @users, theme: "gitlab" = link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: 'btn-grouped btn btn-xs btn-warning'
- if user.access_locked?
= link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: 'btn-grouped 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-grouped btn btn-xs btn-remove'
= paginate @users, theme: "gitlab"
%ul.nav-links.scrolling-tabs %ul.nav-links.scrolling-tabs
.fade-left .fade-left
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do = nav_link(controller: %w(dashboard admin projects users groups), html_options: {class: 'home'}) do
= link_to admin_root_path, title: 'Overview' do = link_to admin_root_path, title: 'Overview', class: 'shortcuts-tree' do
%span %span
Overview Overview
= nav_link(controller: [:admin, :projects]) do
= link_to admin_namespaces_projects_path, title: 'Projects' do
%span
Projects
= nav_link(controller: :users) do
= link_to admin_users_path, title: 'Users' do
%span
Users
= nav_link(controller: :groups) do
= link_to admin_groups_path, title: 'Groups' do
%span
Groups
= nav_link(controller: :deploy_keys) do = nav_link(controller: :deploy_keys) do
= link_to admin_deploy_keys_path, title: 'Deploy Keys' do = link_to admin_deploy_keys_path, title: 'Deploy Keys' do
%span %span
......
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