project.html.haml 2.59 KB
Newer Older
gitlabhq's avatar
gitlabhq committed
1 2 3 4 5
!!!
%html
  %head
    %title
      GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
6
    = favicon_link_tag 'favicon.ico'
gitlabhq's avatar
gitlabhq committed
7 8
    = stylesheet_link_tag    "application"
    = javascript_include_tag "application"
gitlabhq's avatar
gitlabhq committed
9
    - if current_page?(tree_project_ref_path(@project, @project.root_ref)) || current_page?(project_commits_path(@project))
10
      = 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}")
Nihad Abbasov's avatar
Nihad Abbasov committed
11
    - if request.path == project_issues_path(@project)
12
      = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, :private_token => current_user.private_token), :title => "#{@project.name} issues")
gitlabhq's avatar
gitlabhq committed
13 14 15 16
    = csrf_meta_tags
    = javascript_tag do
      REQ_URI = "#{request.env["REQUEST_URI"]}";
      REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
17
  %body{ :class => body_class('project-page'), :id => yield(:boyd_id)}
18
    = render :partial => "layouts/flash"
gitlabhq's avatar
gitlabhq committed
19 20
    #container
      = render :partial => "layouts/head_panel"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
21
      -#= render :partial => "layouts/middle_panel" if @project && !@project.new_record?
gitlabhq's avatar
gitlabhq committed
22
      .project-container
gitlabhq's avatar
gitlabhq committed
23 24
        .project-sidebar
          .fixed
25
            %aside
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
26
              = link_to project_path(@project), :class => project_tab_class do 
27
                Project
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
28

29 30
              - if @project.repo_exists?
                = link_to "Repository", project_repository_path(@project), :class => repository_tab_class
31
                = link_to "Tree", tree_project_ref_path(@project, @ref || @project.root_ref), :class => tree_tab_class
32 33 34 35 36 37 38 39 40 41
                = link_to "Commits", project_commits_path(@project), :class => (controller.controller_name == "commits") ? "current" : nil
                = link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil
                = link_to  project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do
                  Issues
                = 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
                  Requests
gitlabhq's avatar
gitlabhq committed
42

gitlabhq's avatar
gitlabhq committed
43

gitlabhq's avatar
gitlabhq committed
44 45 46

        .project-content
          = yield