summaryrefslogtreecommitdiff
path: root/app/views/groups/edit.html.haml
blob: 16038ef2f7938d998091030401c0a636805d5dee (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
- breadcrumb_title "General Settings"
.panel.panel-default.prepend-top-default
  .panel-heading
    Group settings
  .panel-body
    = form_for @group, html: { multipart: true, class: "form-horizontal gl-show-field-errors" }, authenticity_token: true do |f|
      = form_errors(@group)
      = render 'shared/group_form', f: f

      .form-group
        .col-sm-offset-2.col-sm-10
          .avatar-container.s160
            = group_icon(@group, alt: '', class: 'avatar group-avatar s160')
          %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
            = 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"

      = render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group

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

      .form-group
        %label.control-label
          = s_("GroupSettings|Share with group lock")
        .col-sm-10
          .checkbox
            = f.label :share_with_group_lock do
              = f.check_box :share_with_group_lock, disabled: !can_change_share_with_group_lock?(@group)
              %strong
                - 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 }
              %br
              %span.descr= share_with_group_lock_help_text(@group)

      = render 'group_admin_settings', f: f

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

.panel.panel-danger
  .panel-heading Remove group
  .panel-body
    = 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!

      .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