Commit 1811d32e23f2c7c4c76f4e868ab3b5850f6addb3
1 parent
8e737ed5
Exists in
master
and in
4 other branches
Squash project settings navs
Showing
18 changed files
with
190 additions
and
201 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap/nav.scss
app/controllers/deploy_keys_controller.rb
| ... | ... | @@ -4,6 +4,8 @@ class DeployKeysController < ProjectResourceController |
| 4 | 4 | # Authorize |
| 5 | 5 | before_filter :authorize_admin_project! |
| 6 | 6 | |
| 7 | + layout "project_settings" | |
| 8 | + | |
| 7 | 9 | def index |
| 8 | 10 | @enabled_keys = @project.deploy_keys.all |
| 9 | 11 | @available_keys = available_keys - @enabled_keys | ... | ... |
app/controllers/hooks_controller.rb
app/controllers/projects_controller.rb
| ... | ... | @@ -15,6 +15,7 @@ class ProjectsController < ProjectResourceController |
| 15 | 15 | end |
| 16 | 16 | |
| 17 | 17 | def edit |
| 18 | + render 'edit', layout: "project_settings" | |
| 18 | 19 | end |
| 19 | 20 | |
| 20 | 21 | def create |
| ... | ... | @@ -42,7 +43,7 @@ class ProjectsController < ProjectResourceController |
| 42 | 43 | format.html { redirect_to edit_project_path(@project), notice: 'Project was successfully updated.' } |
| 43 | 44 | format.js |
| 44 | 45 | else |
| 45 | - format.html { render action: "edit" } | |
| 46 | + format.html { render action: "edit", layout: "project_settings" } | |
| 46 | 47 | format.js |
| 47 | 48 | end |
| 48 | 49 | end | ... | ... |
app/controllers/services_controller.rb
app/controllers/team_members_controller.rb
| ... | ... | @@ -3,6 +3,8 @@ class TeamMembersController < ProjectResourceController |
| 3 | 3 | before_filter :authorize_read_project! |
| 4 | 4 | before_filter :authorize_admin_project!, except: [:index, :show] |
| 5 | 5 | |
| 6 | + layout "project_settings" | |
| 7 | + | |
| 6 | 8 | def index |
| 7 | 9 | @group = @project.group |
| 8 | 10 | @users_projects = @project.users_projects.order('project_access DESC') | ... | ... |
app/views/deploy_keys/index.html.haml
| 1 | -= render "projects/settings_nav" | |
| 2 | - | |
| 3 | 1 | %p.slead |
| 4 | 2 | Deploy keys allow read-only access to repository. They can be used for CI, staging or production servers |
| 5 | 3 | |
| ... | ... | @@ -12,7 +10,7 @@ |
| 12 | 10 | %hr.clearfix |
| 13 | 11 | |
| 14 | 12 | .row |
| 15 | - .span6.enabled-keys | |
| 13 | + .span5.enabled-keys | |
| 16 | 14 | %h5.cgreen |
| 17 | 15 | Enabled deploy keys |
| 18 | 16 | %small for this project |
| ... | ... | @@ -21,7 +19,7 @@ |
| 21 | 19 | - if @enabled_keys.blank? |
| 22 | 20 | .light-well |
| 23 | 21 | %p.nothing_here_message Create #{link_to 'new deploy key', new_project_deploy_key_path(@project)} or add existing one |
| 24 | - .span6.available-keys | |
| 22 | + .span5.available-keys | |
| 25 | 23 | %h5 |
| 26 | 24 | Available deploy keys |
| 27 | 25 | %small from projects you are able to manage | ... | ... |
app/views/deploy_keys/new.html.haml
app/views/deploy_keys/show.html.haml
app/views/hooks/index.html.haml
| ... | ... | @@ -0,0 +1,20 @@ |
| 1 | +!!! 5 | |
| 2 | +%html{ lang: "en"} | |
| 3 | + = render "layouts/head", title: @project.name_with_namespace | |
| 4 | + %body{class: "#{app_theme} project", :'data-page' => body_data_page, :'data-project-id' => @project.id } | |
| 5 | + = render "layouts/head_panel", title: project_title(@project) | |
| 6 | + = render "layouts/init_auto_complete" | |
| 7 | + = render "layouts/flash" | |
| 8 | + - if can?(current_user, :download_code, @project) | |
| 9 | + = render 'shared/no_ssh' | |
| 10 | + | |
| 11 | + %nav.main-nav | |
| 12 | + .container= render 'layouts/nav/project' | |
| 13 | + | |
| 14 | + .container | |
| 15 | + .content | |
| 16 | + .row | |
| 17 | + .span2 | |
| 18 | + = render "projects/settings_nav" | |
| 19 | + .span10 | |
| 20 | + = yield | ... | ... |
app/views/projects/_settings_nav.html.haml
| 1 | -%ul.nav.nav-tabs | |
| 1 | +%ul.nav.nav-pills.nav-stacked.nav-stacked-menu | |
| 2 | 2 | = nav_link(path: 'projects#edit') do |
| 3 | 3 | = link_to edit_project_path(@project), class: "stat-tab tab " do |
| 4 | 4 | %i.icon-edit |
| 5 | - Edit | |
| 5 | + Edit Project | |
| 6 | 6 | = nav_link(controller: [:team_members, :teams]) do |
| 7 | 7 | = link_to project_team_index_path(@project), class: "team-tab tab" do |
| 8 | 8 | %i.icon-group | ... | ... |
app/views/projects/edit.html.haml
| 1 | -= render "projects/settings_nav" | |
| 2 | - | |
| 3 | 1 | .project-edit-container |
| 4 | - %h3.page_title Edit Project | |
| 5 | - %hr | |
| 6 | 2 | .project-edit-errors |
| 7 | 3 | .project-edit-content |
| 8 | - .row | |
| 9 | - .span3 | |
| 10 | - %ul.nav.nav-pills.nav-stacked | |
| 11 | - %li.active | |
| 12 | - = link_to 'Settings', '#tab-settings', 'data-toggle' => 'tab' | |
| 13 | - %li | |
| 14 | - = link_to 'Rename repo', '#tab-rename', 'data-toggle' => 'tab' | |
| 15 | - %li | |
| 16 | - = link_to 'Transfer', '#tab-transfer', 'data-toggle' => 'tab' | |
| 17 | - %li | |
| 18 | - = link_to 'Remove', '#tab-remove', 'data-toggle' => 'tab' | |
| 19 | - | |
| 20 | - .span9 | |
| 21 | - .tab-content | |
| 22 | - .tab-pane.active#tab-settings | |
| 23 | - .ui-box.white | |
| 24 | - %h5.title Settings: | |
| 25 | - .form-holder | |
| 26 | - = form_for(@project, remote: true) do |f| | |
| 27 | - %fieldset | |
| 28 | - .clearfix.project_name_holder | |
| 29 | - = f.label :name do | |
| 30 | - Project name is | |
| 31 | - .input | |
| 32 | - = f.text_field :name, placeholder: "Example Project", class: "span5" | |
| 33 | - | |
| 34 | - | |
| 35 | - .clearfix | |
| 36 | - = f.label :description do | |
| 37 | - Project description | |
| 38 | - %span.light (optional) | |
| 39 | - .input | |
| 40 | - = f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250 | |
| 41 | - | |
| 42 | - - unless @project.empty_repo? | |
| 43 | - .clearfix | |
| 44 | - = f.label :default_branch, "Default Branch" | |
| 45 | - .input= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'}) | |
| 46 | - | |
| 47 | - | |
| 48 | - - if can?(current_user, :change_public_mode, @project) | |
| 49 | - %fieldset.public-mode | |
| 50 | - %legend | |
| 51 | - Public mode: | |
| 52 | - .control-group | |
| 53 | - = f.label :public, class: 'control-label' do | |
| 54 | - %span Public access | |
| 55 | - .controls | |
| 56 | - = f.check_box :public | |
| 57 | - %span.descr | |
| 58 | - If checked, this project can be cloned | |
| 59 | - %em without any | |
| 60 | - authentication. | |
| 61 | - It will also be listed on the #{link_to "public access directory", public_root_path}. | |
| 62 | - %em Any | |
| 63 | - user will have #{link_to "Guest", help_permissions_path} permissions on the repository. | |
| 64 | - | |
| 65 | - %fieldset.features | |
| 66 | - %legend | |
| 67 | - Labels: | |
| 68 | - .control-group | |
| 69 | - = f.label :label_list, "Labels", class: 'control-label' | |
| 70 | - .controls | |
| 71 | - = f.text_field :label_list, maxlength: 2000, class: "span5" | |
| 72 | - %p.hint Separate with comma. | |
| 73 | - | |
| 74 | - %fieldset.features | |
| 75 | - %legend | |
| 76 | - Features: | |
| 77 | - .control-group | |
| 78 | - = f.label :issues_enabled, "Issues", class: 'control-label' | |
| 79 | - .controls | |
| 80 | - = f.check_box :issues_enabled | |
| 81 | - %span.descr Lightweight issue tracking system for this project | |
| 82 | - | |
| 83 | - - if Project.issues_tracker.values.count > 1 | |
| 84 | - .control-group | |
| 85 | - = f.label :issues_tracker, "Issues tracker", class: 'control-label' | |
| 86 | - .input= f.select(:issues_tracker, Project.issues_tracker.values, {}, { disabled: !@project.issues_enabled }) | |
| 87 | - | |
| 88 | - .clearfix | |
| 89 | - = f.label :issues_tracker_id, "Project name or id in issues tracker", class: 'control-label' | |
| 90 | - .input= f.text_field :issues_tracker_id, disabled: !@project.can_have_issues_tracker_id? | |
| 91 | - | |
| 92 | - .control-group | |
| 93 | - = f.label :merge_requests_enabled, "Merge Requests", class: 'control-label' | |
| 94 | - .controls | |
| 95 | - = f.check_box :merge_requests_enabled | |
| 96 | - %span.descr Submit changes to be merged upstream. | |
| 97 | - | |
| 98 | - .control-group | |
| 99 | - = f.label :wiki_enabled, "Wiki", class: 'control-label' | |
| 100 | - .controls | |
| 101 | - = f.check_box :wiki_enabled | |
| 102 | - %span.descr Pages for project documentation | |
| 103 | - | |
| 104 | - .control-group | |
| 105 | - = f.label :wall_enabled, "Wall", class: 'control-label' | |
| 106 | - .controls | |
| 107 | - = f.check_box :wall_enabled | |
| 108 | - %span.descr Simple chat system for broadcasting inside project | |
| 109 | - | |
| 110 | - .control-group | |
| 111 | - = f.label :snippets_enabled, "Snippets", class: 'control-label' | |
| 112 | - .controls | |
| 113 | - = f.check_box :snippets_enabled | |
| 114 | - %span.descr Share code pastes with others out of git repository | |
| 115 | - | |
| 116 | - | |
| 117 | - .form-actions | |
| 118 | - = f.submit 'Save', class: "btn btn-save" | |
| 119 | - | |
| 120 | - .tab-pane#tab-transfer | |
| 121 | - - if can?(current_user, :change_namespace, @project) | |
| 122 | - .ui-box.ui-box-danger | |
| 123 | - %h5.title Transfer project | |
| 124 | - .errors-holder | |
| 125 | - .form-holder | |
| 126 | - = form_for(@project, url: transfer_project_path(@project), remote: true, html: { class: 'transfer-project' }) do |f| | |
| 127 | - .control-group | |
| 128 | - = f.label :namespace_id do | |
| 129 | - %span Namespace | |
| 130 | - .controls | |
| 131 | - .clearfix | |
| 132 | - = f.select :namespace_id, namespaces_options(@project.namespace_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'} | |
| 133 | - %ul | |
| 134 | - %li Be careful. Changing project namespace can have unintended side effects | |
| 135 | - %li You can transfer project only to namespaces you can manage | |
| 136 | - %li You will need to update your local repositories to point to the new location. | |
| 137 | - .form-actions | |
| 138 | - = f.submit 'Transfer', class: "btn btn-remove" | |
| 139 | - - else | |
| 140 | - %p.nothing_here_message Only project owner can transfer a project | |
| 141 | - | |
| 142 | - .tab-pane#tab-rename | |
| 143 | - .ui-box.ui-box-danger | |
| 144 | - %h5.title Rename repository | |
| 145 | - .errors-holder | |
| 146 | - .form-holder | |
| 147 | - = form_for(@project) do |f| | |
| 148 | - .control-group | |
| 149 | - = f.label :path do | |
| 150 | - %span Path | |
| 151 | - .controls | |
| 152 | - .clearfix | |
| 153 | - = f.text_field :path | |
| 154 | - %ul | |
| 155 | - %li Be careful. Rename of project repo can have unintended side effects | |
| 156 | - %li You will need to update your local repositories to point to the new location. | |
| 157 | - .form-actions | |
| 158 | - = f.submit 'Rename', class: "btn btn-remove" | |
| 159 | - | |
| 160 | - .tab-pane#tab-remove | |
| 161 | - - if can?(current_user, :remove_project, @project) | |
| 162 | - .ui-box.ui-box-danger | |
| 163 | - %h5.title Remove project | |
| 164 | - .ui-box-body | |
| 165 | - %p | |
| 166 | - Remove of project will cause removing repository and all related resources like issues, merge requests etc. | |
| 167 | - %p | |
| 168 | - %strong Removed project can not be restored! | |
| 169 | - | |
| 170 | - = link_to 'Remove project', @project, confirm: remove_project_message(@project), method: :delete, class: "btn btn-remove btn-small" | |
| 171 | - - else | |
| 172 | - %p.nothing_here_message Only project owner can remove a project | |
| 4 | + .ui-box.white | |
| 5 | + %h5.title Settings: | |
| 6 | + .form-holder | |
| 7 | + = form_for(@project, remote: true) do |f| | |
| 8 | + %fieldset | |
| 9 | + .clearfix.project_name_holder | |
| 10 | + = f.label :name do | |
| 11 | + Project name is | |
| 12 | + .input | |
| 13 | + = f.text_field :name, placeholder: "Example Project", class: "span5" | |
| 14 | + | |
| 15 | + | |
| 16 | + .clearfix | |
| 17 | + = f.label :description do | |
| 18 | + Project description | |
| 19 | + %span.light (optional) | |
| 20 | + .input | |
| 21 | + = f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250 | |
| 22 | + | |
| 23 | + - unless @project.empty_repo? | |
| 24 | + .clearfix | |
| 25 | + = f.label :default_branch, "Default Branch" | |
| 26 | + .input= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'}) | |
| 27 | + | |
| 28 | + | |
| 29 | + - if can?(current_user, :change_public_mode, @project) | |
| 30 | + %fieldset.public-mode | |
| 31 | + %legend | |
| 32 | + Public mode: | |
| 33 | + .control-group | |
| 34 | + = f.label :public, class: 'control-label' do | |
| 35 | + %span Public access | |
| 36 | + .controls | |
| 37 | + = f.check_box :public | |
| 38 | + %span.descr | |
| 39 | + If checked, this project can be cloned | |
| 40 | + %em without any | |
| 41 | + authentication. | |
| 42 | + It will also be listed on the #{link_to "public access directory", public_root_path}. | |
| 43 | + %em Any | |
| 44 | + user will have #{link_to "Guest", help_permissions_path} permissions on the repository. | |
| 45 | + | |
| 46 | + %fieldset.features | |
| 47 | + %legend | |
| 48 | + Labels: | |
| 49 | + .control-group | |
| 50 | + = f.label :label_list, "Labels", class: 'control-label' | |
| 51 | + .controls | |
| 52 | + = f.text_field :label_list, maxlength: 2000, class: "span5" | |
| 53 | + %p.hint Separate with comma. | |
| 54 | + | |
| 55 | + %fieldset.features | |
| 56 | + %legend | |
| 57 | + Features: | |
| 58 | + .control-group | |
| 59 | + = f.label :issues_enabled, "Issues", class: 'control-label' | |
| 60 | + .controls | |
| 61 | + = f.check_box :issues_enabled | |
| 62 | + %span.descr Lightweight issue tracking system for this project | |
| 63 | + | |
| 64 | + - if Project.issues_tracker.values.count > 1 | |
| 65 | + .control-group | |
| 66 | + = f.label :issues_tracker, "Issues tracker", class: 'control-label' | |
| 67 | + .input= f.select(:issues_tracker, Project.issues_tracker.values, {}, { disabled: !@project.issues_enabled }) | |
| 68 | + | |
| 69 | + .clearfix | |
| 70 | + = f.label :issues_tracker_id, "Project name or id in issues tracker", class: 'control-label' | |
| 71 | + .input= f.text_field :issues_tracker_id, disabled: !@project.can_have_issues_tracker_id? | |
| 72 | + | |
| 73 | + .control-group | |
| 74 | + = f.label :merge_requests_enabled, "Merge Requests", class: 'control-label' | |
| 75 | + .controls | |
| 76 | + = f.check_box :merge_requests_enabled | |
| 77 | + %span.descr Submit changes to be merged upstream. | |
| 78 | + | |
| 79 | + .control-group | |
| 80 | + = f.label :wiki_enabled, "Wiki", class: 'control-label' | |
| 81 | + .controls | |
| 82 | + = f.check_box :wiki_enabled | |
| 83 | + %span.descr Pages for project documentation | |
| 84 | + | |
| 85 | + .control-group | |
| 86 | + = f.label :wall_enabled, "Wall", class: 'control-label' | |
| 87 | + .controls | |
| 88 | + = f.check_box :wall_enabled | |
| 89 | + %span.descr Simple chat system for broadcasting inside project | |
| 90 | + | |
| 91 | + .control-group | |
| 92 | + = f.label :snippets_enabled, "Snippets", class: 'control-label' | |
| 93 | + .controls | |
| 94 | + = f.check_box :snippets_enabled | |
| 95 | + %span.descr Share code pastes with others out of git repository | |
| 96 | + | |
| 97 | + | |
| 98 | + .form-actions | |
| 99 | + = f.submit 'Save', class: "btn btn-save" | |
| 100 | + | |
| 101 | + - if can?(current_user, :change_namespace, @project) | |
| 102 | + .ui-box.ui-box-danger | |
| 103 | + %h5.title Transfer project | |
| 104 | + .errors-holder | |
| 105 | + .form-holder | |
| 106 | + = form_for(@project, url: transfer_project_path(@project), remote: true, html: { class: 'transfer-project' }) do |f| | |
| 107 | + .control-group | |
| 108 | + = f.label :namespace_id do | |
| 109 | + %span Namespace | |
| 110 | + .controls | |
| 111 | + .clearfix | |
| 112 | + = f.select :namespace_id, namespaces_options(@project.namespace_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'} | |
| 113 | + %ul | |
| 114 | + %li Be careful. Changing project namespace can have unintended side effects | |
| 115 | + %li You can transfer project only to namespaces you can manage | |
| 116 | + %li You will need to update your local repositories to point to the new location. | |
| 117 | + .form-actions | |
| 118 | + = f.submit 'Transfer', class: "btn btn-remove" | |
| 119 | + - else | |
| 120 | + %p.nothing_here_message Only project owner can transfer a project | |
| 121 | + | |
| 122 | + .ui-box.ui-box-danger | |
| 123 | + %h5.title Rename repository | |
| 124 | + .errors-holder | |
| 125 | + .form-holder | |
| 126 | + = form_for(@project) do |f| | |
| 127 | + .control-group | |
| 128 | + = f.label :path do | |
| 129 | + %span Path | |
| 130 | + .controls | |
| 131 | + .clearfix | |
| 132 | + = f.text_field :path | |
| 133 | + %ul | |
| 134 | + %li Be careful. Rename of project repo can have unintended side effects | |
| 135 | + %li You will need to update your local repositories to point to the new location. | |
| 136 | + .form-actions | |
| 137 | + = f.submit 'Rename', class: "btn btn-remove" | |
| 138 | + | |
| 139 | + - if can?(current_user, :remove_project, @project) | |
| 140 | + .ui-box.ui-box-danger | |
| 141 | + %h5.title Remove project | |
| 142 | + .ui-box-body | |
| 143 | + %p | |
| 144 | + Remove of project will cause removing repository and all related resources like issues, merge requests etc. | |
| 145 | + %p | |
| 146 | + %strong Removed project can not be restored! | |
| 147 | + | |
| 148 | + = link_to 'Remove project', @project, confirm: remove_project_message(@project), method: :delete, class: "btn btn-remove btn-small" | |
| 149 | + - else | |
| 150 | + %p.nothing_here_message Only project owner can remove a project | |
| 173 | 151 | |
| 174 | 152 | .save-project-loader.hide |
| 175 | 153 | %center | ... | ... |
app/views/services/edit.html.haml
app/views/services/index.html.haml
app/views/team_members/import.html.haml
app/views/team_members/index.html.haml
| 1 | -= render "projects/settings_nav" | |
| 2 | 1 | %h3.page_title |
| 3 | 2 | Users with access to this project |
| 4 | 3 | |
| ... | ... | @@ -12,15 +11,6 @@ |
| 12 | 11 | %p.light |
| 13 | 12 | Read more about project permissions |
| 14 | 13 | %strong= link_to "here", help_permissions_path, class: "vlink" |
| 15 | - | |
| 16 | -.clearfix | |
| 17 | - | |
| 18 | 14 | - if @group |
| 19 | - .row | |
| 20 | - .span6 | |
| 21 | - = render "team_members/group_members" | |
| 22 | - .span6 | |
| 23 | - = render "team_members/team", members: @users_projects | |
| 24 | - | |
| 25 | -- else | |
| 26 | - = render "team_members/team", members: @users_projects | |
| 15 | + = render "team_members/group_members" | |
| 16 | += render "team_members/team", members: @users_projects | ... | ... |
app/views/team_members/new.html.haml