Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.html.haml « users « admin « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 87d6309aefdfb8d1d1a2b45716e0c1e61c6baf65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
%h3.page_title
  Users
  = link_to 'New User', new_admin_user_path, class: "btn btn-small pull-right"
%br

= form_tag admin_users_path, method: :get, class: 'form-inline' do
  = text_field_tag :name, params[:name], class: "xlarge"
  = submit_tag "Search", class: "btn submit btn-primary"
%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

%table
  %thead
    %tr
      %th Admin
      %th
        Name
        %i.icon-sort-down
      %th Username
      %th Email
      %th Projects
      %th Edit
      %th.cred Danger Zone!

  - @admin_users.each do |user|
    %tr
      %td= check_box_tag "admin",   1, user.admin, disabled: :disabled
      %td= link_to user.name, [:admin, user]
      %td= user.username
      %td= user.email
      %td= user.users_projects.count
      %td= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-small"
      %td.bgred
        - if user == current_user
          %span.cred It's you!
        - else
          - if user.blocked
            = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-small success"
          - else
            = 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"

= paginate @admin_users, theme: "admin"