summaryrefslogtreecommitdiff
path: root/app/views/layouts/project.html.haml
blob: 3dbb69c4ea9e16998016015bf5616ed4bfe9655f (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
!!!
%html
  %head
    %title
      GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
    = stylesheet_link_tag    "application"
    = javascript_include_tag "application"
    - if current_page?(tree_project_ref_path(@project, @project.root_ref)) || current_page?(project_commits_path(@project))
      = auto_discovery_link_tag(:atom, project_commits_url(@project, :atom, :ref => @ref, :private_token => current_user.private_token), :title => "Recent commits to #{@project.name}:#{@ref}")
    - if request.path == project_issues_path(@project)
      = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, :private_token => current_user.private_token), :title => "#{@project.name} issues")
    = csrf_meta_tags
    = javascript_tag do
      REQ_URI = "#{request.env["REQUEST_URI"]}";
      REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
  %body{ :class => body_class('project-page'), :id => yield(:boyd_id)}
    = render :partial => "layouts/flash"
    #container
      = render :partial => "layouts/head_panel"
      = render :partial => "layouts/middle_panel" if @project && !@project.new_record?
      .project-container
        .project-sidebar
          .fixed
            %aside
              = link_to "Activities", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
              = link_to "Tree", tree_project_ref_path(@project,  @project.root_ref), :class => current_page?(:controller => "refs", :action => "tree", :project_id => @project, :id => @ref || @project.root_ref ) ? "current" : nil
              = link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil
              = link_to "Network graph", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil
              = link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do
                Team
                - if @project.users_projects.count > 0
                  %span{ :class => "number" }= @project.users_projects.count
              = link_to  project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do
                Issues
                - if @project.issues.open_for(current_user).count > 0
                  %span{ :class => "number" }= @project.issues.open_for(current_user).count
              = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do
                Wall
                - if @project.common_notes.today.count > 0
                  %span{ :class => "number" }= @project.common_notes.today.count
              = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do
                Merge Requests
                - if @project.merge_requests.opened.count > 0
                  %span{ :class => "number" }= @project.merge_requests.opened.count
              = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
                Snippets
                - if @project.snippets.non_expired.count > 0
                  %span{ :class => "number" }= @project.snippets.non_expired.count

              - if can? current_user, :admin_project, @project
                = link_to "Admin", edit_project_path(@project), :class => (current_page?(edit_project_path(@project))) ? "current" : nil

            .medium-tags{:style => 'padding: 10px 0 0 10px; width: 210px;'}= tag_list @project

        .project-content
          = yield