diff options
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/_filter.html.haml | 4 | ||||
-rw-r--r-- | app/views/search/_project_filter.html.haml | 1 | ||||
-rw-r--r-- | app/views/search/_results.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/results/_blob.html.haml | 4 | ||||
-rw-r--r-- | app/views/search/results/_issue.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/results/_merge_request.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/results/_note.html.haml | 6 | ||||
-rw-r--r-- | app/views/search/results/_project.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/results/_snippet_blob.html.haml | 6 | ||||
-rw-r--r-- | app/views/search/results/_snippet_title.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/results/_wiki_blob.html.haml | 4 | ||||
-rw-r--r-- | app/views/search/show.html.haml | 2 |
12 files changed, 16 insertions, 21 deletions
diff --git a/app/views/search/_filter.html.haml b/app/views/search/_filter.html.haml index eca69ce50b1..ffc145497ab 100644 --- a/app/views/search/_filter.html.haml +++ b/app/views/search/_filter.html.haml @@ -1,5 +1,5 @@ .dropdown.inline - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} + %button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'} %i.fa.fa-tags %span.light Group: - if @group.present? @@ -17,7 +17,7 @@ = group.name .dropdown.inline.prepend-left-10.project-filter - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} + %button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'} %i.fa.fa-tags %span.light Project: - if @project.present? diff --git a/app/views/search/_project_filter.html.haml b/app/views/search/_project_filter.html.haml index c201b3d6c47..ad933502a28 100644 --- a/app/views/search/_project_filter.html.haml +++ b/app/views/search/_project_filter.html.haml @@ -25,6 +25,7 @@ = @search_results.notes_count %li{class: ("active" if @scope == 'wiki_blobs')} = link_to search_filter_path(scope: 'wiki_blobs') do + %i.fa.fa-book Wiki .pull-right = @search_results.wiki_blobs_count diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml index 58bcff9dbe3..796dd752a4c 100644 --- a/app/views/search/_results.html.haml +++ b/app/views/search/_results.html.haml @@ -2,7 +2,7 @@ #{@search_results.total_count} results found - unless @show_snippets - if @project - for #{link_to @project.name_with_namespace, @project} + for #{link_to @project.name_with_namespace, [@project.namespace.becomes(Namespace), @project]} - elsif @group for #{link_to @group.name, @group} diff --git a/app/views/search/results/_blob.html.haml b/app/views/search/results/_blob.html.haml index b46b4832e19..84e9be82c44 100644 --- a/app/views/search/results/_blob.html.haml +++ b/app/views/search/results/_blob.html.haml @@ -1,9 +1,9 @@ .blob-result .file-holder .file-title - = link_to project_blob_path(@project, tree_join(blob.ref, blob.filename), :anchor => "L" + blob.startline.to_s) do + = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(blob.ref, blob.filename), :anchor => "L" + blob.startline.to_s) do %i.fa.fa-file %strong = blob.filename .file-content.code.term - = render 'shared/file_hljs', blob: blob, first_line_number: blob.startline + = render 'shared/file_highlight', blob: blob, first_line_number: blob.startline, user_color_scheme_class: 'white' diff --git a/app/views/search/results/_issue.html.haml b/app/views/search/results/_issue.html.haml index 7868f958261..ce8ddff9556 100644 --- a/app/views/search/results/_issue.html.haml +++ b/app/views/search/results/_issue.html.haml @@ -1,6 +1,6 @@ .search-result-row %h4 - = link_to [issue.project, issue] do + = link_to [issue.project.namespace.becomes(Namespace), issue.project, issue] do %span.term.str-truncated= issue.title .pull-right ##{issue.iid} - if issue.description.present? diff --git a/app/views/search/results/_merge_request.html.haml b/app/views/search/results/_merge_request.html.haml index 56b185283bd..2efa616d664 100644 --- a/app/views/search/results/_merge_request.html.haml +++ b/app/views/search/results/_merge_request.html.haml @@ -1,6 +1,6 @@ .search-result-row %h4 - = link_to [merge_request.target_project, merge_request] do + = link_to [merge_request.target_project.namespace.becomes(Namespace), merge_request.target_project, merge_request] do %span.term.str-truncated= merge_request.title .pull-right ##{merge_request.iid} - if merge_request.description.present? diff --git a/app/views/search/results/_note.html.haml b/app/views/search/results/_note.html.haml index f2327cd69cc..5fcba2b7e93 100644 --- a/app/views/search/results/_note.html.haml +++ b/app/views/search/results/_note.html.haml @@ -9,15 +9,15 @@ = link_to project do = project.name_with_namespace · - = link_to project_commit_path(project, note.commit_id, anchor: dom_id(note)) do - Commit #{note.commit_id[0..8]} + = link_to namespace_project_commit_path(project.namespace, project, note.commit_id, anchor: dom_id(note)) do + Commit #{truncate_sha(note.commit_id)} - else = link_to project do = project.name_with_namespace · %span #{note.noteable_type.titleize} ##{note.noteable.iid} · - = link_to [project, note.noteable, anchor: dom_id(note)] do + = link_to [project.namespace.becomes(Namespace), project, note.noteable, anchor: dom_id(note)] do = note.noteable.title .note-search-result diff --git a/app/views/search/results/_project.html.haml b/app/views/search/results/_project.html.haml index 301b65eca29..195cf06c8ea 100644 --- a/app/views/search/results/_project.html.haml +++ b/app/views/search/results/_project.html.haml @@ -1,6 +1,6 @@ .search-result-row %h4 - = link_to project do + = link_to [project.namespace.becomes(Namespace), project] do %span.term= project.name_with_namespace - if project.description.present? %span.light.term= project.description diff --git a/app/views/search/results/_snippet_blob.html.haml b/app/views/search/results/_snippet_blob.html.haml index 6fc2cdf6362..8af393777f0 100644 --- a/app/views/search/results/_snippet_blob.html.haml +++ b/app/views/search/results/_snippet_blob.html.haml @@ -13,12 +13,6 @@ .file-title %i.fa.fa-file %strong= snippet_blob[:snippet_object].file_name - %span.options - .btn-group.tree-btn-group.pull-right - - if snippet_blob[:snippet_object].author == current_user - = link_to "Edit", edit_snippet_path(snippet_blob[:snippet_object]), class: "btn btn-tiny", title: 'Edit Snippet' - = link_to "Delete", snippet_path(snippet_blob[:snippet_object]), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-tiny", title: 'Delete Snippet' - = link_to "Raw", raw_snippet_path(snippet_blob[:snippet_object]), class: "btn btn-tiny", target: "_blank" - if gitlab_markdown?(snippet_blob[:snippet_object].file_name) .file-content.wiki - snippet_blob[:snippet_chunks].each do |snippet| diff --git a/app/views/search/results/_snippet_title.html.haml b/app/views/search/results/_snippet_title.html.haml index f7e5ee5e20e..c414acb6a11 100644 --- a/app/views/search/results/_snippet_title.html.haml +++ b/app/views/search/results/_snippet_title.html.haml @@ -11,7 +11,7 @@ %small.pull-right.cgray - if snippet_title.project_id? - = link_to snippet_title.project.name_with_namespace, project_path(snippet_title.project) + = link_to snippet_title.project.name_with_namespace, namespace_project_path(snippet_title.project.namespace, snippet_title.project) .snippet-info = "##{snippet_title.id}" diff --git a/app/views/search/results/_wiki_blob.html.haml b/app/views/search/results/_wiki_blob.html.haml index e361074b6a0..f9c5810e3d0 100644 --- a/app/views/search/results/_wiki_blob.html.haml +++ b/app/views/search/results/_wiki_blob.html.haml @@ -1,9 +1,9 @@ .blob-result .file-holder .file-title - = link_to project_wiki_path(@project, wiki_blob.filename) do + = link_to namespace_project_wiki_path(@project.namespace, @project, wiki_blob.filename) do %i.fa.fa-file %strong = wiki_blob.filename .file-content.code.term - = render 'shared/file_hljs', blob: wiki_blob, first_line_number: wiki_blob.startline + = render 'shared/file_highlight', blob: wiki_blob, first_line_number: wiki_blob.startline, user_color_scheme_class: 'white' diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml index bae57917a4c..5b4816e4c40 100644 --- a/app/views/search/show.html.haml +++ b/app/views/search/show.html.haml @@ -6,7 +6,7 @@ .col-sm-6 = search_field_tag :search, params[:search], placeholder: "issue 143", class: "form-control search-text-input", id: "dashboard_search" .col-sm-4 - = submit_tag 'Search', class: "btn btn-create" + = button_tag 'Search', class: "btn btn-create" .form-group .col-sm-2 - unless params[:snippets].eql? 'true' |