summaryrefslogtreecommitdiff
path: root/app/views/search/results/_blob.html.haml
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2016-11-10 19:27:09 +0200
committerValery Sizov <valery@gitlab.com>2016-11-16 14:25:54 +0200
commita5632e802b72db01c0fb0b8bec77c0fc28b41427 (patch)
tree78a4d3d6fb2ac537e9bc38d0e912275170d9fd3a /app/views/search/results/_blob.html.haml
parent37abb20cec2a9836a7d1d70a7f7535af6646df1e (diff)
downloadgitlab-ce-a5632e802b72db01c0fb0b8bec77c0fc28b41427.tar.gz
Search for a filename in a project23117-search-for-a-filename-in-a-project
Diffstat (limited to 'app/views/search/results/_blob.html.haml')
-rw-r--r--app/views/search/results/_blob.html.haml12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/views/search/results/_blob.html.haml b/app/views/search/results/_blob.html.haml
index 6f0a0ea36ec..9e8adc82583 100644
--- a/app/views/search/results/_blob.html.haml
+++ b/app/views/search/results/_blob.html.haml
@@ -1,11 +1,13 @@
-- blob = parse_search_result(blob)
+- file_name, blob = blob
.blob-result
.file-holder
.file-title
- - blob_link = namespace_project_blob_path(@project.namespace, @project, tree_join(blob.ref, blob.filename))
+ - ref = @search_results.repository_ref
+ - blob_link = namespace_project_blob_path(@project.namespace, @project, tree_join(ref, file_name))
= link_to blob_link do
%i.fa.fa-file
%strong
- = blob.filename
- .file-content.code.term
- = render 'shared/file_highlight', blob: blob, first_line_number: blob.startline, blob_link: blob_link
+ = file_name
+ - if blob
+ .file-content.code.term
+ = render 'shared/file_highlight', blob: blob, first_line_number: blob.startline, blob_link: blob_link