show.html.haml 2.75 KB
Newer Older
1 2
%h3.page_title
  User: #{@admin_user.name}
3 4 5 6
  - if @admin_user.blocked
    %small Blocked
  - if @admin_user.admin
    %small Administrator
7 8 9
  = link_to edit_admin_user_path(@admin_user), class: "btn right" do
    %i.icon-edit
    Edit
gitlabhq's avatar
gitlabhq committed
10

11
%br
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
12

randx's avatar
randx committed
13 14 15 16 17
%table.zebra-striped
  %thead
    %tr
      %th Profile
      %th
18 19 20 21 22 23
  %tr
    %td
      %b
        Email:
    %td
      = @admin_user.email
24 25 26 27 28 29
  %tr
    %td
      %b
        Username:
    %td
      = @admin_user.username
30 31 32 33
  %tr
    %td
      %b
        Admin:
34
        %td= check_box_tag "admin", 1, @admin_user.admin, disabled: :disabled
randx's avatar
randx committed
35 36 37 38
  %tr
    %td
      %b
        Blocked:
39
        %td= check_box_tag "blocked", 1, @admin_user.blocked, disabled: :disabled
40 41 42 43 44 45
  %tr
    %td
      %b
        Created at:
    %td
      = @admin_user.created_at.stamp("March 1, 1999")
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
  %tr
    %td
      %b
        Projects limit:
    %td
      = @admin_user.projects_limit
  - unless @admin_user.skype.empty?
    %tr
      %td
        %b
          Skype:
      %td
        = @admin_user.skype
  - unless @admin_user.linkedin.empty?
    %tr
      %td
        %b
          Linkedin:
      %td
        = @admin_user.linkedin
  - unless @admin_user.twitter.empty?
    %tr
      %td
        %b
          Twitter:
      %td
        = @admin_user.twitter
gitlabhq's avatar
gitlabhq committed
73

74
%br
75
%h5 Add User to Projects
76
%br
77
= form_tag team_update_admin_user_path(@admin_user), class: "bulk_import", method: :put  do
randx's avatar
randx committed
78
  %table
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
79
    %thead
gitlabhq's avatar
gitlabhq committed
80
      %tr
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
81 82 83 84
        %th Projects
        %th Project Access:

    %tr
85
      %td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace),  multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5'
86
      %td= select_tag :project_access, options_for_select(Project.access_options), class: "project-access-select chosen span3"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
87

88
    %tr
89
      %td= submit_tag 'Add', class: "btn primary"
90
      %td
91
        Read more about project permissions
92
        %strong= link_to "here", help_permissions_path, class: "vlink"
93 94
%br

95 96 97 98 99 100 101 102 103 104 105 106 107 108
- if @admin_user.groups.present?
  %h5 Owner of groups:
  %br

  %table.zebra-striped
    %thead
      %tr
        %th Name

    - @admin_user.groups.each do |group|
      %tr
        %td= link_to group.name, admin_group_path(group)


109
- if @admin_user.projects.present?
110
  %h5 Projects:
111
  %br
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
112

randx's avatar
randx committed
113 114 115
  %table.zebra-striped
    %thead
      %tr
116 117 118 119 120 121 122 123
        %th Name
        %th Project Access
        %th
        %th

    - @admin_user.users_projects.each do |tm|
      - project = tm.project
      %tr
124
        %td= link_to project.name_with_namespace, admin_project_path(project)
125
        %td= tm.project_access_human
126 127
        %td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small"
        %td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn small danger"