keep current branch when switch from tree to commits
This commit is contained in:
parent
2cd5aa694d
commit
3b91a103e0
2 changed files with 20 additions and 23 deletions
app/views/layouts
19
app/views/layouts/_project_side.html.haml
Normal file
19
app/views/layouts/_project_side.html.haml
Normal file
|
@ -0,0 +1,19 @@
|
|||
.project-sidebar
|
||||
.fixed
|
||||
%aside
|
||||
= link_to project_path(@project), :class => project_tab_class do
|
||||
Project
|
||||
|
||||
- if @project.repo_exists?
|
||||
= link_to "Repository", project_repository_path(@project), :class => repository_tab_class
|
||||
= link_to "Tree", tree_project_ref_path(@project, @ref || @project.root_ref), :class => tree_tab_class
|
||||
= link_to "Commits", project_commits_path(@project, :ref => (@ref || @project.root_ref)), :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
|
|
@ -18,29 +18,7 @@
|
|||
= 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 project_path(@project), :class => project_tab_class do
|
||||
Project
|
||||
|
||||
- if @project.repo_exists?
|
||||
= link_to "Repository", project_repository_path(@project), :class => repository_tab_class
|
||||
= link_to "Tree", tree_project_ref_path(@project, @ref || @project.root_ref), :class => tree_tab_class
|
||||
= 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
|
||||
|
||||
|
||||
|
||||
= render :partial => "layouts/project_side"
|
||||
.project-content
|
||||
= yield
|
||||
|
|
Loading…
Add table
Reference in a new issue