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

11
      .form-group
12
        .col-sm-offset-2.col-sm-10
13
          .avatar-container.s160
14
            = image_tag group_icon(@group), alt: '', class: 'avatar group-avatar s160'
15 16 17 18 19 20 21 22
          %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 已提交
23
            = 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"
24

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

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

31
      .form-group
32
        = f.label :share_with_group_lock, 'Share lock', class: 'control-label'
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: share_with_group_lock_disabled
37 38 39 40
              %strong
                Prevent sharing a project within
                = @group.name
                with other groups
W
winh 已提交
41
              %br
M
Michael Kozono 已提交
42
              %span.descr= share_with_group_lock_help_text
43

44
      = render 'group_admin_settings', f: f
45

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

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

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) }

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