project layout
This commit is contained in:
parent
1ffb4b98c0
commit
487ae906a9
5 changed files with 71 additions and 9 deletions
46
app/views/layouts/project.html.haml
Normal file
46
app/views/layouts/project.html.haml
Normal file
|
@ -0,0 +1,46 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%title
|
||||
GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
%link{:href => "/assets/favicon.png", :rel => "icon", :type => "image/png"}/
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%body.project-page
|
||||
#container
|
||||
= render :partial => "layouts/flash"
|
||||
= render :partial => "layouts/head_panel"
|
||||
= render :partial => "layouts/page_title"
|
||||
.project-container
|
||||
.project-sidebar.grid_1
|
||||
%input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo}
|
||||
%aside
|
||||
= link_to image_tag("home.png", :width => 20), project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
|
||||
= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
|
||||
= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_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 => "top_menu_count" }= @project.users_projects.count
|
||||
= 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
|
||||
= 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
|
||||
= link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
|
||||
Snippets
|
||||
- if @project.snippets.count > 0
|
||||
%span{ :class => "top_menu_count" }= @project.snippets.non_expired.count
|
||||
- if @commit
|
||||
= 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
|
||||
|
||||
|
||||
.project-content
|
||||
= yield
|
|
@ -1,5 +1,4 @@
|
|||
%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 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue