Fix project find url so branch ref is not nil

Also adds autocomplete="off" to find input.
This commit is contained in:
Jacob Schatz 2016-01-19 21:39:48 -05:00
parent 4784695860
commit 70e59035c0
2 changed files with 7 additions and 3 deletions

View File

@ -37,6 +37,10 @@
%h1.title= title
= render 'shared/outdated_browser'
- if @project
-if @project && !@project.empty_repo? && @ref
:javascript
var findFileURL = '#{namespace_project_find_file_path(@project.namespace, @project, @ref || @project.repository.root_ref)}';
var findFileURL = '#{namespace_project_find_file_path(@project.namespace, @project, @ref)}';
-elsif @project && !@project.empty_repo?
:javascript
var findFileURL = '#{namespace_project_find_file_path(@project.namespace, @project, @project.repository.root_ref)}';

View File

@ -10,7 +10,7 @@
= link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
= @project.path
%li.file-finder
%input#file_find.form-control.file-finder-input{type: "text", placeholder: 'Find by path'}
%input#file_find.form-control.file-finder-input{type: "text", placeholder: 'Find by path', autocomplete: 'off'}
%div.tree-content-holder
.table-holder