Commit 746ffcfc authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Make group settings menu looks similar to project settings menu

parent 8fb84104
.row .row
.span3 .span2
%ul.nav.nav-pills.nav-stacked %ul.nav.nav-pills.nav-stacked.nav-stacked-menu
%li.active %li.active
= link_to 'Projects', '#tab-projects', 'data-toggle' => 'tab' = link_to '#tab-edit', 'data-toggle' => 'tab' do
%i.icon-edit
Edit Group
%li %li
= link_to 'Edit Group', '#tab-edit', 'data-toggle' => 'tab' = link_to '#tab-projects', 'data-toggle' => 'tab' do
%i.icon-folder-close
Projects
%li %li
= link_to 'Transfer', '#tab-transfer', 'data-toggle' => 'tab' = link_to 'Transfer', '#tab-transfer', 'data-toggle' => 'tab'
%li %li
= link_to 'Remove', '#tab-remove', 'data-toggle' => 'tab' = link_to 'Remove', '#tab-remove', 'data-toggle' => 'tab'
.span9 .span10
.tab-content .tab-content
.tab-pane.active#tab-projects .tab-pane.active#tab-edit
.ui-box .ui-box
%h5.title Projects %h5.title
%ul.well-list %strong= @group.name
- @group.projects.each do |project| Group Settings:
%li
- if project.public
= public_icon
- else
= private_icon
= link_to project.name_with_namespace, project
.pull-right
= link_to 'Team', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
= 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
.tab-pane#tab-edit
.ui-box
%h5.title Edit Group
%div.form-holder %div.form-holder
= form_for @group do |f| = form_for @group do |f|
- if @group.errors.any? - if @group.errors.any?
...@@ -52,6 +40,31 @@ ...@@ -52,6 +40,31 @@
.form-actions .form-actions
= f.submit 'Save group', class: "btn btn-save" = f.submit 'Save group', class: "btn btn-save"
.tab-pane#tab-projects
.ui-box
%h5.title
%strong= @group.name
Projects:
- 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
= link_to 'Team', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
= 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
.tab-pane#tab-transfer .tab-pane#tab-transfer
.ui-box.ui-box-danger .ui-box.ui-box-danger
%h5.title Transfer group %h5.title Transfer group
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
.project-edit-errors .project-edit-errors
.project-edit-content .project-edit-content
.ui-box.white .ui-box.white
%h5.title Settings: %h5.title
%strong= @project.name
Project Settings:
.form-holder .form-holder
= form_for(@project, remote: true) do |f| = form_for(@project, remote: true) do |f|
%fieldset %fieldset
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment