diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /app/views/search | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) | |
download | gitlab-ce-9f46488805e86b1bc341ea1620b866016c2ce5ed.tar.gz |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/_category.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/results/_blob_data.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/results/_snippet_blob.html.haml | 50 | ||||
-rw-r--r-- | app/views/search/results/_snippet_title.html.haml | 2 |
4 files changed, 3 insertions, 53 deletions
diff --git a/app/views/search/_category.html.haml b/app/views/search/_category.html.haml index 6ad155eb715..db7769fa743 100644 --- a/app/views/search/_category.html.haml +++ b/app/views/search/_category.html.haml @@ -24,7 +24,7 @@ = users - elsif @show_snippets - = search_filter_link 'snippet_titles', _("Titles and Filenames"), search: { snippets: true, group_id: nil, project_id: nil } + = search_filter_link 'snippet_titles', _("Titles and Descriptions"), search: { snippets: true, group_id: nil, project_id: nil } - else = search_filter_link 'projects', _("Projects"), data: { qa_selector: 'projects_tab' } = search_filter_link 'issues', _("Issues") diff --git a/app/views/search/results/_blob_data.html.haml b/app/views/search/results/_blob_data.html.haml index 01e42224428..218de30d707 100644 --- a/app/views/search/results/_blob_data.html.haml +++ b/app/views/search/results/_blob_data.html.haml @@ -7,4 +7,4 @@ = search_blob_title(project, path) - if blob.data .file-content.code.term{ data: { qa_selector: 'file_text_content' } } - = render 'shared/file_highlight', blob: blob, first_line_number: blob.startline + = render 'shared/file_highlight', blob: blob, first_line_number: blob.startline, blob_link: blob_link diff --git a/app/views/search/results/_snippet_blob.html.haml b/app/views/search/results/_snippet_blob.html.haml deleted file mode 100644 index fa77566dddb..00000000000 --- a/app/views/search/results/_snippet_blob.html.haml +++ /dev/null @@ -1,50 +0,0 @@ -- snippet_blob = chunk_snippet(snippet_blob, @search_term) -- snippet = snippet_blob[:snippet_object] -- snippet_chunks = snippet_blob[:snippet_chunks] -- snippet_path = gitlab_snippet_path(snippet) - -.search-result-row.snippet-row - = image_tag avatar_icon_for_user(snippet.author), class: "avatar s40 d-none d-sm-block", alt: '' - .title - = link_to gitlab_snippet_path(snippet) do - = snippet.title - .snippet-info - = snippet.to_reference - · - authored - = time_ago_with_tooltip(snippet.created_at) - by - = link_to user_snippets_path(snippet.author) do - = snippet.author_name - - .file-holder.my-2 - .js-file-title.file-title-flex-parent - = link_to snippet_path do - %i.fa.fa-file - %strong= snippet.file_name - - if markup?(snippet.file_name) - .file-content.md - - snippet_chunks.each do |chunk| - - unless chunk[:data].empty? - = markup(snippet.file_name, chunk[:data]) - - else - .file-content.code - .nothing-here-block= _("Empty file") - - else - .file-content.code.js-syntax-highlight - .line-numbers - - snippet_chunks.each do |chunk| - - unless chunk[:data].empty? - - Gitlab::Git::Util.count_lines(chunk[:data]).times do |index| - - offset = defined?(chunk[:start_line]) ? chunk[:start_line] : 1 - - i = index + offset - = link_to snippet_path+"#L#{i}", id: "L#{i}", rel: "#L#{i}", class: "diff-line-num" do - %i.fa.fa-link - = i - .blob-content - - snippet_chunks.each do |chunk| - - unless chunk[:data].empty? - = highlight(snippet.file_name, chunk[:data]) - - else - .file-content.code - .nothing-here-block= _("Empty file") diff --git a/app/views/search/results/_snippet_title.html.haml b/app/views/search/results/_snippet_title.html.haml index 81e746c55a3..a28d9effbdd 100644 --- a/app/views/search/results/_snippet_title.html.haml +++ b/app/views/search/results/_snippet_title.html.haml @@ -1,5 +1,5 @@ .search-result-row - %h4.snippet-title.term + %h4 = link_to gitlab_snippet_path(snippet_title) do = truncate(snippet_title.title, length: 60) = snippet_badge(snippet_title) |