edit.html.haml 2.4 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
            = image_tag group_icon(@group), alt: '', class: 'avatar group-avatar s160'
14 15 16 17 18 19 20 21
          %p.light
            - if @group.avatar?
              You can change your group avatar here
            - else
              You can upload a group avatar here
          = render 'shared/choose_group_avatar_button', f: f
          - if @group.avatar?
            %hr
D
Dmitriy Zaporozhets 已提交
22
            = link_to 'Remove avatar', group_avatar_path(@group.to_param), data: { confirm: "Group avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar"
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 60
      .form-actions
        = button_to 'Remove group', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_group_message(@group) }

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