Merge branch 'easy-to-find-commit-on-network-graph' of https://github.com/hiroponz/gitlabhq into hiroponz-easy-to-find-commit-on-network-graph

This commit is contained in:
Dmitriy Zaporozhets 2013-02-12 19:02:05 +02:00
commit ddea7d1689
6 changed files with 91 additions and 34 deletions

View file

@ -0,0 +1,9 @@
%ul.nav.nav-tabs
%li
= render partial: 'shared/ref_switcher', locals: {destination: 'graph', path: @path}
%li.pull-right.search
= form_tag project_graph_path(@project, params[:id]), method: :get, class: 'navbar-form' do |f|
= label_tag :search , "Looking for commit:"
= text_field_tag :q, @q, placeholder: "Input SHA", class: "search-input"
%h3.page_title Project Network Graph

View file

@ -1,7 +1,4 @@
%h3.page_title Project Network Graph
%br
= render partial: 'shared/ref_switcher', locals: {destination: 'graph', path: @path}
%br
= render "head"
.graph_holder
%h4
%small You can move around the graph by using the arrow keys.
@ -12,8 +9,9 @@
var branch_graph;
$(function(){
branch_graph = new BranchGraph($("#holder"), {
url: '#{project_graph_path(@project, @ref, format: :json)}',
url: '#{project_graph_path(@project, @ref, q: @q, format: :json)}',
commit_url: '#{project_commit_path(@project, 'ae45ca32').gsub("ae45ca32", "%s")}',
ref: '#{@ref}'
ref: '#{@ref}',
commit_id: '#{@commit.id}'
});
});