BigW Consortium Gitlab

show.html.haml 3.52 KB
Newer Older
1
- page_title @group.name, "Groups"
2
%h3.page-title
3 4
  Group: #{@group.name}

5
  = link_to edit_admin_group_path(@group), class: "btn pull-right" do
6
    %i.fa.fa-pencil-square-o
7 8 9
    Edit
%hr
.row
10
  .col-md-6
11
    .panel.panel-default
12
      .panel-heading
13 14
        Group info:
      %ul.well-list
15
        %li
16
          = image_tag group_icon(@group), class: "avatar s60"
17 18 19 20 21 22 23
        %li
          %span.light Name:
          %strong= @group.name
        %li
          %span.light Path:
          %strong
            = @group.path
24

25 26 27 28
        %li
          %span.light Description:
          %strong
            = @group.description
29

30 31 32 33 34
        %li
          %span.light Visibility level:
          %strong
            = visibility_level_label(@group.visibility_level)

35
        %li
36
          %span.light Created on:
37
          %strong
38
            = @group.created_at.to_s(:medium)
39

40
    .panel.panel-default
41
      .panel-heading
42 43 44 45
        %h3.panel-title
          Projects
          %span.badge
            #{@group.projects.count}
46
      %ul.well-list
47
        - @projects.each do |project|
48 49
          %li
            %strong
Vinnie Okada committed
50
              = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project]
51 52
              %span.label.label-gray
                = repository_size(project)
53 54
            %span.pull-right.light
              %span.monospace= project.path_with_namespace + ".git"
55 56
      .panel-footer
        = paginate @projects, param_name: 'projects_page', theme: 'gitlab'
57

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
    - if @group.shared_projects.any?
      .panel.panel-default
        .panel-heading
          Projects shared with #{@group.name}
          %span.badge
            #{@group.shared_projects.count}
        %ul.well-list
          - @group.shared_projects.sort_by(&:name).each do |project|
            %li
              %strong
                = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project]
                %span.label.label-gray
                  = repository_size(project)
              %span.pull-right.light
                %span.monospace= project.path_with_namespace + ".git"

74
  .col-md-6
75 76 77 78 79 80 81 82
    - if can?(current_user, :admin_group_member, @group)
      .panel.panel-default
        .panel-heading
          Add user(s) to the group:
        .panel-body.form-holder
          %p.light
            Read more about project permissions
            %strong= link_to "here", help_page_path("permissions", "permissions"), class: "vlink"
83

84 85 86 87 88 89 90
          = form_tag members_update_admin_group_path(@group), id: "new_project_member", class: "bulk_import", method: :put  do
            %div
              = users_select_tag(:user_ids, multiple: true, email_user: true, scope: :all)
            %div.prepend-top-10
              = select_tag :access_level, options_for_select(GroupMember.access_level_roles), class: "project-access-select select2"
            %hr
            = button_tag 'Add users to group', class: "btn btn-create"
91

92
    = render 'shared/members/requests', membership_source: @group, requesters: @requesters
93

94
    .panel.panel-default
95
      .panel-heading
96 97
        %strong= @group.name
        group members
98
        %span.badge= @group.members.size
99 100 101
        .pull-right
          = link_to icon('pencil-square-o', text: 'Manage Access'), polymorphic_url([@group, :members]), class: "btn btn-xs"
      %ul.well-list.group-users-list.content-list
102
        = render partial: 'shared/members/member', collection: @members, as: :member, locals: { show_controls: false }
103
      .panel-footer
104
        = paginate @members, param_name: 'members_page', theme: 'gitlab'