Add search box for the commit.
This commit is contained in:
parent
81cc1cb87b
commit
8ff5cf9cd5
3 changed files with 22 additions and 6 deletions
|
@ -7,6 +7,16 @@ class GraphController < ProjectResourceController
|
|||
before_filter :require_non_empty_project
|
||||
|
||||
def show
|
||||
if params.has_key?(:q) && params[:q].blank?
|
||||
redirect_to project_graph_path(@project, params[:id])
|
||||
return
|
||||
end
|
||||
|
||||
if params.has_key?(:q)
|
||||
@q = params[:q]
|
||||
@commit = @project.repository.commit(@q) || @commit
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue