Add "Show only selected branch" checkbox
This commit is contained in:
parent
3a4c1c5c63
commit
6505cd5ec9
|
@ -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")}',
|
||||
|
|
Loading…
Reference in New Issue