summaryrefslogtreecommitdiff
path: root/app/views/projects/group_links/index.html.haml
blob: 13f5fc141faf36e927146691a5b8fa29c151dbd0 (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
- page_title "Groups"
%h3.page_title Share project with other groups
%p.light
  Projects can be stored in only one group at once. However you can share a project with other groups here.
%hr
- if @group_links.present?
  .enabled-groups.panel.panel-default
    .panel-heading
      Already shared with
    %ul.well-list
      - @group_links.each do |group_link|
        - group = group_link.group
        %li
          .pull-right
            = link_to namespace_project_group_link_path(@project.namespace, @project, group_link), method: :delete, class: 'btn btn-sm' do
              %i.icon-remove
              disable sharing
          = link_to group do
            %strong
              %i.icon-folder-open
              = group.name
          %br
          .light up to #{group_link.human_access}


.available-groups
  %h4
    Can be shared with
  %div
    = form_tag namespace_project_group_links_path(@project.namespace, @project), method: :post, class: 'form-horizontal' do
      .form-group
        = label_tag :link_group_id, 'Group', class: 'control-label'
        .col-sm-10
          = groups_select_tag(:link_group_id, skip_group: @project.group.try(:path))
      .form-group
        = label_tag :link_group_access, 'Max access level', class: 'control-label'
        .col-sm-10
          = select_tag :link_group_access, options_for_select(ProjectGroupLink.access_options, ProjectGroupLink.default_access), class: "form-control"
      .form-actions
        = submit_tag "Share", class: "btn btn-create"