_top_menu.html.haml 1.96 KB
Newer Older
gitlabhq's avatar
gitlabhq committed
1 2
%div.top_project_menu
  - if @project.repo_exists?
gitlabhq's avatar
gitlabhq committed
3 4
    %span= link_to image_tag("home.png", :width => 20), project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
    %span= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
gitlabhq's avatar
gitlabhq committed
5 6
    %span= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil
    %span
7
      = link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do
gitlabhq's avatar
gitlabhq committed
8 9 10 11 12 13 14 15 16 17 18 19 20
        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
gitlabhq's avatar
gitlabhq committed
21 22 23 24
  %span
    = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
      Snippets
      - if @project.snippets.count > 0
Nihad Abbasov's avatar
Nihad Abbasov committed
25
        %span{ :class => "top_menu_count" }= @project.snippets.non_expired.count
gitlabhq's avatar
gitlabhq committed
26 27 28 29

  - 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