Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-01-29 12:25:17 +0400
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-01-30 04:12:03 +0400
commit525a8cd3e96b7bae0acda8b6e94df529fa06ff6a (patch)
treedbfda7c6ee03274470c2176c7c19dc396fc4ac5a /app/views
parentc84675ee06dfc72c46c178ef40e30f03053dcc5a (diff)
Switchable the main branch on network graph
Diffstat (limited to 'app/views')
-rw-r--r--app/views/graph/show.html.haml (renamed from app/views/projects/graph.html.haml)8
-rw-r--r--app/views/layouts/project_resource.html.haml4
2 files changed, 7 insertions, 5 deletions
diff --git a/app/views/projects/graph.html.haml b/app/views/graph/show.html.haml
index 72d9cb5ef15..ca3a8706313 100644
--- a/app/views/projects/graph.html.haml
+++ b/app/views/graph/show.html.haml
@@ -1,6 +1,7 @@
%h3.page_title Project Network Graph
%br
-
+= render partial: 'shared/ref_switcher', locals: {destination: 'graph', path: @path}
+%br
.graph_holder
%h4
%small You can move around the graph by using the arrow keys.
@@ -11,7 +12,8 @@
var branch_graph;
$(function(){
branch_graph = new BranchGraph($("#holder"), {
- url: '#{url_for controller: 'projects', action: 'graph', format: :json}',
- commit_url: '#{project_commit_path(@project, 'ae45ca32').gsub("ae45ca32", "%s")}'
+ url: '#{project_graph_path(@project, @ref, format: :json)}',
+ commit_url: '#{project_commit_path(@project, 'ae45ca32').gsub("ae45ca32", "%s")}',
+ ref: '#{@ref}'
});
});
diff --git a/app/views/layouts/project_resource.html.haml b/app/views/layouts/project_resource.html.haml
index 14671c5ca70..c19d33ceec9 100644
--- a/app/views/layouts/project_resource.html.haml
+++ b/app/views/layouts/project_resource.html.haml
@@ -20,8 +20,8 @@
= link_to 'Files', project_tree_path(@project, @ref || @repository.root_ref)
= nav_link(controller: %w(commit commits compare repositories protected_branches)) do
= link_to "Commits", project_commits_path(@project, @ref || @repository.root_ref)
- = nav_link(path: 'projects#graph') do
- = link_to "Network", graph_project_path(@project)
+ = nav_link(controller: %w(graph)) do
+ = link_to "Network", project_graph_path(@project, @ref || @repository.root_ref)
- if @project.issues_enabled
= nav_link(controller: %w(issues milestones labels)) do