edit.html.haml 3.6 KB
Newer Older
1
- breadcrumb_title "General Settings"
2
.panel.panel-default.prepend-top-default
3
  .panel-heading
D
Douwe Maan 已提交
4
    Group settings
5
  .panel-body
6
    = form_for @group, html: { multipart: true, class: "form-horizontal gl-show-field-errors" }, authenticity_token: true do |f|
7
      = form_errors(@group)
8
      = render 'shared/group_form', f: f
S
Steven Thonus 已提交
9

10
      .form-group
11
        .col-sm-offset-2.col-sm-10
12
          .avatar-container.s160
13
            = group_icon(@group, alt: '', class: 'avatar group-avatar s160')
14 15
          %p.light
            - if @group.avatar?
16
              You can change the group avatar here
17 18 19 20 21
            - else
              You can upload a group avatar here
          = render 'shared/choose_group_avatar_button', f: f
          - if @group.avatar?
            %hr
22
            = 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"
23

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

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

30
      .form-group
W
Winnie Hellmann 已提交
31
        %label.control-label
32
          = s_("GroupSettings|Share with group lock")
33 34
        .col-sm-10
          .checkbox
35
            = f.label :share_with_group_lock do
M
Michael Kozono 已提交
36
              = f.check_box :share_with_group_lock, disabled: !can_change_share_with_group_lock?(@group)
37
              %strong
W
Winnie Hellmann 已提交
38 39
                - 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 已提交
40
              %br
M
Michael Kozono 已提交
41
              %span.descr= share_with_group_lock_help_text(@group)
42

43
      = render 'group_admin_settings', f: f
44

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

48 49 50
.panel.panel-danger
  .panel-heading Remove group
  .panel-body
51 52 53 54 55
    = 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!
56

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

60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
- if supports_nested_groups?
  .panel.panel-warning
    .panel-heading Transfer group
    .panel-body
      = form_for @group, url: transfer_group_path(@group), method: :put do |f|
        .form-group
          = 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"

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