edit.html.haml 2.8 KB
Newer Older
1
.row
2 3
  .span2
    %ul.nav.nav-pills.nav-stacked.nav-stacked-menu
4
      %li.active
5 6 7
        = link_to '#tab-edit', 'data-toggle' => 'tab' do
          %i.icon-edit
          Edit Group
8
      %li
9 10 11
        = link_to '#tab-projects', 'data-toggle' => 'tab' do
          %i.icon-folder-close
          Projects
12 13
      %li
        = link_to 'Remove', '#tab-remove', 'data-toggle' => 'tab'
A
Andrew8xx8 已提交
14

15
  .span10
16
    .tab-content
17
      .tab-pane.active#tab-edit
18
        .ui-box
19
          .title
20
            %strong= @group.name
D
Dmitriy Zaporozhets 已提交
21
            group settings:
22 23 24 25 26
          %div.form-holder
            = form_for @group do |f|
              - if @group.errors.any?
                .alert.alert-error
                  %span= @group.errors.full_messages.first
27
              .control-group
28
                = f.label :name do
D
David Pursehouse 已提交
29
                  Group name
30
                .controls
31
                  = f.text_field :name, placeholder: "Ex. OpenSource", class: "input-xxlarge left"
A
Andrew8xx8 已提交
32

33
              .control-group.group-description-holder
34
                = f.label :description, "Details"
35
                .controls
36
                  = f.text_area :description, maxlength: 250, class: "input-xxlarge js-gfm-input", rows: 4
37

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

41 42
      .tab-pane#tab-projects
        .ui-box
43
          .title
44
            %strong= @group.name
D
Dmitriy Zaporozhets 已提交
45
            projects:
46 47 48 49 50 51 52 53 54 55 56 57 58 59
            - if can? current_user, :manage_group, @group
              %span.pull-right
                = link_to new_project_path(namespace_id: @group.id), class: "btn btn-tiny" do
                  %i.icon-plus
                  New Project
          %ul.well-list
            - @group.projects.each do |project|
              %li
                - if project.public
                  = public_icon
                - else
                  = private_icon
                = link_to project.name_with_namespace, project
                .pull-right
D
Dmitriy Zaporozhets 已提交
60
                  = link_to 'Members', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
61 62 63 64 65
                  = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
                  = link_to 'Remove', project, confirm: remove_project_message(project), method: :delete, class: "btn btn-small btn-remove"
            - if @group.projects.blank?
              %p.nothing_here_message This group has no projects yet

66 67
      .tab-pane#tab-remove
        .ui-box.ui-box-danger
68
          .title Remove group
69 70
          .ui-box-body
            %p
71
              Removing group will cause all child projects and resources to be removed.
72 73
            %p
              %strong Removed group can not be restored!
74

D
Dmitriy Zaporozhets 已提交
75
            = link_to 'Remove Group', @group, confirm: 'Removed group can not be restored! Are you sure?', method: :delete, class: "btn btn-remove"