diff options
Diffstat (limited to 'app/views/projects/_top_menu.html.haml')
-rw-r--r-- | app/views/projects/_top_menu.html.haml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/views/projects/_top_menu.html.haml b/app/views/projects/_top_menu.html.haml new file mode 100644 index 00000000000..b81ba6bb4d6 --- /dev/null +++ b/app/views/projects/_top_menu.html.haml @@ -0,0 +1,24 @@ +%div.top_project_menu + -#%span= link_to @project.code.capitalize, @project, :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil + - if @project.repo_exists? + %span= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) || current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil + %span= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil + %span + = link_to team_project_path(@project), :class => current_page?(:controller => "projects", :action => "team", :id => @project) ? "current" : nil do + Team + - if @project.users_projects.count > 0 + %span{ :class => "top_menu_count" }= @project.users_projects.count + %span + = link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do + Issues + - if @project.issues.opened.count > 0 + %span{ :class => "top_menu_count" }= @project.issues.opened.count + %span + = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do + Wall + - if @project.common_notes.count > 0 + %span{ :class => "top_menu_count" }= @project.common_notes.count + + - if @commit + %span= link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil + |