gitlabhq/app/views/admin/users/index.html.haml

59 lines
2 KiB
Plaintext
Raw Normal View History

2012-08-25 19:31:19 +02:00
%h3.page_title
Users
2013-01-30 15:40:43 +01:00
= link_to 'New User', new_admin_user_path, class: "btn btn-small pull-right"
2012-04-13 07:12:34 +02:00
%br
2012-08-23 23:04:43 +02:00
= form_tag admin_users_path, method: :get, class: 'form-inline' do
= text_field_tag :name, params[:name], class: "xlarge"
2013-01-29 21:18:19 +01:00
= submit_tag "Search", class: "btn submit btn-primary"
2012-11-28 04:14:05 +01:00
%ul.nav.nav-tabs
%li{class: "#{'active' unless params[:filter]}"}
= link_to admin_users_path do
Active
%span.badge= User.active.count
%li{class: "#{'active' if params[:filter] == "admins"}"}
= link_to admin_users_path(filter: "admins") do
Admins
%span.badge= User.admins.count
%li{class: "#{'active' if params[:filter] == "blocked"}"}
= link_to admin_users_path(filter: "blocked") do
Blocked
%span.badge= User.blocked.count
%li{class: "#{'active' if params[:filter] == "wop"}"}
= link_to admin_users_path(filter: "wop") do
Without projects
%span.badge= User.without_projects.count
2012-09-03 20:53:16 +02:00
%table
2011-11-02 16:21:17 +01:00
%thead
2012-12-11 02:39:05 +01:00
%tr
%th Admin
%th
Name
%i.icon-sort-down
%th Username
%th Email
%th Projects
%th Edit
%th.cred Danger Zone!
2011-10-08 23:36:38 +02:00
- @admin_users.each do |user|
%tr
%td= check_box_tag "admin", 1, user.admin, disabled: :disabled
2011-10-14 23:12:02 +02:00
%td= link_to user.name, [:admin, user]
2012-11-28 04:14:05 +01:00
%td= user.username
2011-10-08 23:36:38 +02:00
%td= user.email
%td= user.users_projects.count
2013-01-29 21:29:21 +01:00
%td= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-small"
2012-11-28 04:14:05 +01:00
%td.bgred
- if user == current_user
%span.cred It's you!
- else
- if user.blocked
2013-01-29 21:29:21 +01:00
= link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-small success"
- else
2013-01-29 21:29:21 +01:00
= link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove"
= link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn btn-small btn-remove"
2011-10-08 23:36:38 +02:00
= paginate @admin_users, theme: "admin"