edit.html.haml 3.6 KB
Newer Older
1
- breadcrumb_title "General Settings"
G
George Tsiolis 已提交
2 3
- @content_class = "limit-container-width" unless fluid_layout

4 5
.card.prepend-top-default
  .card-header
D
Douwe Maan 已提交
6
    Group settings
7
  .card-body
8
    = form_for @group, html: { multipart: true, class: "gl-show-field-errors" }, authenticity_token: true do |f|
9
      = form_errors(@group)
10
      = render 'shared/group_form', f: f
S
Steven Thonus 已提交
11

12
      .form-group.row
13
        .offset-sm-2.col-sm-10
14
          .avatar-container.s160
15
            = group_icon(@group, alt: '', class: 'avatar group-avatar s160')
16 17
          %p.light
            - if @group.avatar?
18
              You can change the group avatar here
19 20 21 22 23
            - else
              You can upload a group avatar here
          = render 'shared/choose_group_avatar_button', f: f
          - if @group.avatar?
            %hr
24
            = link_to _('Remove avatar'), group_avatar_path(@group.to_param), data: { confirm: _("Avatar will be removed. Are you sure?")}, method: :delete, class: "btn btn-danger btn-inverted"
25

F
Felipe Artur 已提交
26 27
      = render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group

28
      .form-group.row
29
        .offset-sm-2.col-sm-10
30 31
          = render 'shared/allow_request_access', form: f

32
      .form-group.row
33
        %label.col-form-label.col-sm-2
34
          = s_("GroupSettings|Share with group lock")
35
        .col-sm-10
36
          .form-check
37
            = f.label :share_with_group_lock do
M
Michael Kozono 已提交
38
              = f.check_box :share_with_group_lock, disabled: !can_change_share_with_group_lock?(@group)
39
              %strong
W
Winnie Hellmann 已提交
40 41
                - group_link = link_to @group.name, group_path(@group)
                = s_("GroupSettings|Prevent sharing a project within %{group} with other groups").html_safe % { group: group_link }
W
winh 已提交
42
              %br
M
Michael Kozono 已提交
43
              %span.descr= share_with_group_lock_help_text(@group)
44

45
      = render 'group_admin_settings', f: f
46

47 48
      .form-actions
        = f.submit 'Save group', class: "btn btn-save"
49

50 51 52
.card.bg-danger
  .card-header Remove group
  .card-body
53 54 55 56 57
    = form_tag(@group, method: :delete) do
      %p
        Removing group will cause all child projects and resources to be removed.
        %br
        %strong Removed group can not be restored!
58

59 60 61
      .form-actions
        = button_to 'Remove group', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_group_message(@group) }

62
- if supports_nested_groups?
63 64 65
  .card.bg-warning
    .card-header Transfer group
    .card-body
66
      = form_for @group, url: transfer_group_path(@group), method: :put do |f|
A
Annabel Dunstone Gray 已提交
67
        .form-group
68 69 70 71 72 73 74 75 76 77
          = dropdown_tag('Select parent group', options: { toggle_class: 'js-groups-dropdown', title: 'Parent Group', filter: true, dropdown_class: 'dropdown-open-top dropdown-group-transfer', placeholder: "Search groups", data: { data: parent_group_options(@group) } })
          = hidden_field_tag 'new_parent_group_id'

        %ul
          %li Be careful. Changing a group's parent can have unintended #{link_to 'side effects', 'https://docs.gitlab.com/ce/user/project/index.html#redirects-when-changing-repository-paths', target: 'blank'}.
          %li You can only transfer the group to a group you manage.
          %li You will need to update your local repositories to point to the new location.
          %li If the parent group's visibility is lower than the group current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility.
        = f.submit 'Transfer group', class: "btn btn-warning"

78
= render 'shared/confirm_modal', phrase: @group.path