show.html.haml 2.42 KB
Newer Older
1
%h3.page-title
2 3
  Group: #{@group.name}

4 5 6 7 8
  = link_to edit_admin_group_path(@group), class: "btn btn-small pull-right" do
    %i.icon-edit
    Edit
%hr
.row
9
  .col-md-6
10
    .ui-box
11
      .title
12 13 14 15 16 17 18 19 20
        Group info:
      %ul.well-list
        %li
          %span.light Name:
          %strong= @group.name
        %li
          %span.light Path:
          %strong
            = @group.path
21

22 23 24 25
        %li
          %span.light Description:
          %strong
            = @group.description
26

27
        %li
28
          %span.light Created on:
29 30
          %strong
            = @group.created_at.stamp("March 1, 1999")
31

32
    .ui-box
33
      .title
34 35 36 37 38 39 40 41
        Projects
        %small
          (#{@group.projects.count})
      %ul.well-list
        - @group.projects.sort_by(&:name).each do |project|
          %li
            %strong
              = link_to project.name_with_namespace, [:admin, project]
42 43
              %span.label.label-gray
                = repository_size(project)
44 45
            %span.pull-right.light
              %span.monospace= project.path_with_namespace + ".git"
46

47
  .col-md-6
48
    .ui-box
49
      .title
50
        Add user(s) to the group:
51
      .body.form-holder
52
        %p.light
53 54
          Read more about project permissions
          %strong= link_to "here", help_permissions_path, class: "vlink"
55

56 57 58 59
        = form_tag project_teams_update_admin_group_path(@group), id: "new_team_member", class: "bulk_import", method: :put  do
          %div
            = users_select_tag(:user_ids, multiple: true)
          %div.prepend-top-10
60
            = select_tag :group_access, options_for_select(UsersGroup.group_access_roles), class: "project-access-select chosen"
61
          %hr
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
62
          = submit_tag 'Add users into group', class: "btn btn-create"
63
    .ui-box
64
      .title
65 66
        %strong #{@group.name}
        Group Members
67
        %small
68
          (#{@group.users_groups.count})
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
69
      %ul.well-list.group-users-list
70 71
        - @group.users_groups.order('group_access DESC').each do |member|
          - user = member.user
72 73 74 75
          %li{class: dom_class(user)}
            %strong
              = link_to user.name, admin_user_path(user)
            %span.pull-right.light
76
              = member.human_access
77
              = link_to group_users_group_path(@group, member), data: { confirm: remove_user_from_group_message(@group, user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do
78
                %i.icon-minus.icon-white