Commit 5c4e74acc32f2afefcb8ad3a4cbbcd7122e7f0bf
1 parent
d2b882fa
Exists in
master
and in
4 other branches
Add settings tab to project. Move all project administration there
Showing
4 changed files
with
29 additions
and
29 deletions
Show diff stats
app/helpers/tab_helper.rb
app/views/layouts/project_resource.html.haml
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | |
| 10 | 10 | .container |
| 11 | 11 | %ul.main_menu |
| 12 | - = nav_link(html_options: {class: "home #{project_tab_class}"}) do | |
| 12 | + = nav_link(path: 'projects#show', html_options: {class: "home"}) do | |
| 13 | 13 | = link_to project_path(@project), title: "Project" do |
| 14 | 14 | %i.icon-home |
| 15 | 15 | |
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | = nav_link(controller: %w(graph)) do |
| 23 | 23 | = link_to "Network", project_graph_path(@project, @ref || @repository.root_ref) |
| 24 | 24 | |
| 25 | - - if @project.issues_enabled | |
| 25 | + - if @project.issues_enabled | |
| 26 | 26 | = nav_link(controller: %w(issues milestones labels)) do |
| 27 | 27 | = link_to url_for_project_issues do |
| 28 | 28 | Issues |
| ... | ... | @@ -43,4 +43,9 @@ |
| 43 | 43 | = nav_link(controller: :wikis) do |
| 44 | 44 | = link_to 'Wiki', project_wiki_path(@project, :index) |
| 45 | 45 | |
| 46 | + - if can? current_user, :admin_project, @project | |
| 47 | + = nav_link(html_options: {class: "#{project_tab_class}"}) do | |
| 48 | + = link_to edit_project_path(@project), class: "stat-tab tab " do | |
| 49 | + Settings | |
| 50 | + | |
| 46 | 51 | .content= yield | ... | ... |
app/views/projects/_project_head.html.haml
| 1 | 1 | %ul.nav.nav-tabs |
| 2 | - = nav_link(path: 'projects#show') do | |
| 3 | - = link_to project_path(@project), class: "activities-tab tab" do | |
| 4 | - %i.icon-home | |
| 5 | - Show | |
| 2 | + = nav_link(path: 'projects#edit') do | |
| 3 | + = link_to edit_project_path(@project), class: "stat-tab tab " do | |
| 4 | + %i.icon-edit | |
| 5 | + Edit | |
| 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-user |
| 9 | 9 | Team |
| 10 | - = nav_link(path: 'projects#files') do | |
| 11 | - = link_to 'Attachments', files_project_path(@project), class: "files-tab tab" | |
| 12 | - = nav_link(controller: :snippets) do | |
| 13 | - = link_to 'Snippets', project_snippets_path(@project), class: "snippets-tab tab" | |
| 10 | + = nav_link(controller: :deploy_keys) do | |
| 11 | + = link_to project_deploy_keys_path(@project) do | |
| 12 | + %span | |
| 13 | + Deploy Keys | |
| 14 | + = nav_link(controller: :hooks) do | |
| 15 | + = link_to project_hooks_path(@project) do | |
| 16 | + %span | |
| 17 | + Hooks | |
| 18 | + = nav_link(controller: :services) do | |
| 19 | + = link_to project_services_path(@project) do | |
| 20 | + %span | |
| 21 | + Services | |
| 22 | + | |
| 23 | + -#= nav_link(path: 'projects#files') do | |
| 24 | + -#= link_to 'Attachments', files_project_path(@project), class: "files-tab tab" | |
| 25 | + -#= nav_link(controller: :snippets) do | |
| 26 | + -#= link_to 'Snippets', project_snippets_path(@project), class: "snippets-tab tab" | |
| 14 | 27 | |
| 15 | - - if can? current_user, :admin_project, @project | |
| 16 | - = nav_link(controller: :deploy_keys, html_options: {class: 'pull-right'}) do | |
| 17 | - = link_to project_deploy_keys_path(@project) do | |
| 18 | - %span | |
| 19 | - Deploy Keys | |
| 20 | - = nav_link(controller: :hooks, html_options: {class: 'pull-right'}) do | |
| 21 | - = link_to project_hooks_path(@project) do | |
| 22 | - %span | |
| 23 | - Hooks | |
| 24 | - = nav_link(controller: :services, html_options: {class: 'pull-right'}) do | |
| 25 | - = link_to project_services_path(@project) do | |
| 26 | - %span | |
| 27 | - Services | |
| 28 | - = nav_link(path: 'projects#edit', html_options: {class: 'pull-right'}) do | |
| 29 | - = link_to edit_project_path(@project), class: "stat-tab tab " do | |
| 30 | - %i.icon-edit | |
| 31 | - Edit | ... | ... |
app/views/projects/show.html.haml