summaryrefslogtreecommitdiff
path: root/app/views/projects/_top_menu.html.haml
blob: b81ba6bb4d66dbccbeba0ff78f934310767836c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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