Commit 5c4e74ac authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add settings tab to project. Move all project administration there

parent d2b882fa
...@@ -73,7 +73,7 @@ module TabHelper ...@@ -73,7 +73,7 @@ module TabHelper
end end
def project_tab_class def project_tab_class
[:show, :files, :edit, :update].each do |action| [:files, :edit].each do |action|
return "active" if current_page?(controller: "projects", action: action, id: @project) return "active" if current_page?(controller: "projects", action: action, id: @project)
end end
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.container .container
%ul.main_menu %ul.main_menu
= nav_link(html_options: {class: "home #{project_tab_class}"}) do = nav_link(path: 'projects#show', html_options: {class: "home"}) do
= link_to project_path(@project), title: "Project" do = link_to project_path(@project), title: "Project" do
%i.icon-home %i.icon-home
...@@ -43,4 +43,9 @@ ...@@ -43,4 +43,9 @@
= nav_link(controller: :wikis) do = nav_link(controller: :wikis) do
= link_to 'Wiki', project_wiki_path(@project, :index) = link_to 'Wiki', project_wiki_path(@project, :index)
- if can? current_user, :admin_project, @project
= nav_link(html_options: {class: "#{project_tab_class}"}) do
= link_to edit_project_path(@project), class: "stat-tab tab " do
Settings
.content= yield .content= yield
%ul.nav.nav-tabs %ul.nav.nav-tabs
= nav_link(path: 'projects#show') do = nav_link(path: 'projects#edit') do
= link_to project_path(@project), class: "activities-tab tab" do = link_to edit_project_path(@project), class: "stat-tab tab " do
%i.icon-home %i.icon-edit
Show Edit
= nav_link(controller: [:team_members, :teams]) do = nav_link(controller: [:team_members, :teams]) do
= link_to project_team_index_path(@project), class: "team-tab tab" do = link_to project_team_index_path(@project), class: "team-tab tab" do
%i.icon-user %i.icon-user
Team Team
= nav_link(path: 'projects#files') do = nav_link(controller: :deploy_keys) do
= link_to 'Attachments', files_project_path(@project), class: "files-tab tab"
= nav_link(controller: :snippets) do
= link_to 'Snippets', project_snippets_path(@project), class: "snippets-tab tab"
- if can? current_user, :admin_project, @project
= nav_link(controller: :deploy_keys, html_options: {class: 'pull-right'}) do
= link_to project_deploy_keys_path(@project) do = link_to project_deploy_keys_path(@project) do
%span %span
Deploy Keys Deploy Keys
= nav_link(controller: :hooks, html_options: {class: 'pull-right'}) do = nav_link(controller: :hooks) do
= link_to project_hooks_path(@project) do = link_to project_hooks_path(@project) do
%span %span
Hooks Hooks
= nav_link(controller: :services, html_options: {class: 'pull-right'}) do = nav_link(controller: :services) do
= link_to project_services_path(@project) do = link_to project_services_path(@project) do
%span %span
Services Services
= nav_link(path: 'projects#edit', html_options: {class: 'pull-right'}) do
= link_to edit_project_path(@project), class: "stat-tab tab " do -#= nav_link(path: 'projects#files') do
%i.icon-edit -#= link_to 'Attachments', files_project_path(@project), class: "files-tab tab"
Edit -#= nav_link(controller: :snippets) do
-#= link_to 'Snippets', project_snippets_path(@project), class: "snippets-tab tab"
= render "project_head"
= render 'clone_panel' = render 'clone_panel'
= render "events/event_last_push", event: @last_push = render "events/event_last_push", event: @last_push
......
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