Commit 6505cd5e authored by Sato Hiroyuki's avatar Sato Hiroyuki
Browse files

Add "Show only selected branch" checkbox

parent 948476b571a3
......@@ -4,6 +4,14 @@
.clearfix
.pull-left
= render partial: 'shared/ref_switcher', locals: {destination: 'graph'}
.pull-left
= form_tag project_graph_path(@project, @id), method: :get do |f|
.control-group
= label_tag :filter_ref, "Show only selected ref", class: 'control-label light'
.controls
= check_box_tag :filter_ref, 1, @options[:filter_ref]
- @options.each do |key, value|
= hidden_field_tag(key, value, id: nil) unless key == "filter_ref"
.search.pull-right
= form_tag project_graph_path(@project, @id), method: :get do |f|
......
......@@ -7,6 +7,9 @@
:javascript
var branch_graph;
$("#filter_ref").click(function() {
$(this).closest('form').submit();
});
branch_graph = new BranchGraph($("#holder"), {
url: '#{project_graph_path(@project, @ref, @options.merge(format: :json))}',
commit_url: '#{project_commit_path(@project, 'ae45ca32').gsub("ae45ca32", "%s")}',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment