summaryrefslogtreecommitdiff
path: root/app/views/search
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 01:45:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 01:45:44 +0000
commit85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch)
tree9160f299afd8c80c038f08e1545be119f5e3f1e1 /app/views/search
parent15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff)
downloadgitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/views/search')
-rw-r--r--app/views/search/_results.html.haml2
-rw-r--r--app/views/search/results/_blob_data.html.haml2
-rw-r--r--app/views/search/results/_commit.html.haml2
-rw-r--r--app/views/search/results/_issue.html.haml23
-rw-r--r--app/views/search/results/_merge_request.html.haml4
-rw-r--r--app/views/search/results/_milestone.html.haml4
-rw-r--r--app/views/search/results/_note.html.haml9
7 files changed, 27 insertions, 19 deletions
diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml
index 79f01c61833..e0dbb5135e9 100644
--- a/app/views/search/_results.html.haml
+++ b/app/views/search/_results.html.haml
@@ -22,6 +22,8 @@
= _("in group %{link_to_group}").html_safe % { link_to_group: link_to_group }
= render_if_exists 'shared/promotions/promote_advanced_search'
+ #js-search-filter-by-state{ 'v-cloak': true, data: { scope: @scope, state: params[:state] } }
+
.results.gl-mt-3
- if @scope == 'commits'
%ul.content-list.commit-list
diff --git a/app/views/search/results/_blob_data.html.haml b/app/views/search/results/_blob_data.html.haml
index 218de30d707..27d4dbe1085 100644
--- a/app/views/search/results/_blob_data.html.haml
+++ b/app/views/search/results/_blob_data.html.haml
@@ -1,7 +1,7 @@
.blob-result{ data: { qa_selector: 'result_item_content' } }
.file-holder
.js-file-title.file-title{ data: { qa_selector: 'file_title_content' } }
- = link_to blob_link do
+ = link_to blob_link, data: {track_event: 'click_text', track_label: 'blob_path', track_property: 'search_result'} do
%i.fa.fa-file
%strong
= search_blob_title(project, path)
diff --git a/app/views/search/results/_commit.html.haml b/app/views/search/results/_commit.html.haml
index ed5a3badf11..3e5ea785aae 100644
--- a/app/views/search/results/_commit.html.haml
+++ b/app/views/search/results/_commit.html.haml
@@ -1 +1 @@
-= render 'projects/commits/commit', project: commit.project, commit: commit, ref: nil, show_project_name: @project.nil?
+= render 'projects/commits/commit', project: commit.project, commit: commit, ref: nil, show_project_name: @project.nil?, link_data_attrs: {track_event: 'click_text', track_label: 'commit_title', track_property: 'search_result'}
diff --git a/app/views/search/results/_issue.html.haml b/app/views/search/results/_issue.html.haml
index 2f6024c3f2b..e0336d98f04 100644
--- a/app/views/search/results/_issue.html.haml
+++ b/app/views/search/results/_issue.html.haml
@@ -1,13 +1,14 @@
-.search-result-row
- %h4
- = confidential_icon(issue)
- = link_to project_issue_path(issue.project, issue) do
- %span.term.str-truncated= issue.title
+%div{ class: 'search-result-row gl-pb-3! gl-mt-5 gl-mb-0!' }
+ %span.gl-display-flex.gl-align-items-center
- if issue.closed?
- %span.badge.badge-danger.gl-ml-2= _("Closed")
- .float-right ##{issue.iid}
+ %span.badge.badge-info.badge-pill.gl-badge.sm= _("Closed")
+ - else
+ %span.badge.badge-success.badge-pill.gl-badge.sm= _("Open")
+ = sprite_icon('eye-slash', css_class: 'gl-text-gray-500 gl-ml-2') if issue.confidential?
+ = link_to project_issue_path(issue.project, issue), data: { track_event: 'click_text', track_label: 'issue_title', track_property: 'search_result' }, class: 'gl-w-full' do
+ %span.term.str-truncated.gl-font-weight-bold.gl-ml-2= issue.title
+ .gl-text-gray-500.gl-my-3
+ = sprintf(s_(' %{project_name}#%{issue_iid} &middot; opened %{issue_created} by %{author}'), { project_name: issue.project.full_name, issue_iid: issue.iid, issue_created: time_ago_with_tooltip(issue.created_at, placement: 'bottom'), author: link_to_member(@project, issue.author, avatar: false) }).html_safe
- if issue.description.present?
- .description.term
- = search_md_sanitize(issue, :description)
- %span.light
- #{issue.project.full_name}
+ .description.term.col-sm-10.gl-px-0
+ = truncate(issue.description, length: 200)
diff --git a/app/views/search/results/_merge_request.html.haml b/app/views/search/results/_merge_request.html.haml
index 680c2ea0208..3135ab9a17e 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 project_merge_request_path(merge_request.target_project, merge_request) do
+ = link_to project_merge_request_path(merge_request.target_project, merge_request), data: {track_event: 'click_text', track_label: 'merge_request_title', track_property: 'search_result'} do
%span.term.str-truncated= merge_request.title
- if merge_request.merged?
%span.badge.badge-primary.gl-ml-2= _("Merged")
@@ -9,6 +9,6 @@
.float-right= merge_request.to_reference
- if merge_request.description.present?
.description.term
- = search_md_sanitize(merge_request, :description)
+ = search_md_sanitize(merge_request.description)
%span.light
#{merge_request.project.full_name}
diff --git a/app/views/search/results/_milestone.html.haml b/app/views/search/results/_milestone.html.haml
index 53c2d380bc5..6d4ce88a377 100644
--- a/app/views/search/results/_milestone.html.haml
+++ b/app/views/search/results/_milestone.html.haml
@@ -1,8 +1,8 @@
.search-result-row
%h4
- = link_to project_milestone_path(milestone.project, milestone) do
+ = link_to project_milestone_path(milestone.project, milestone), data: {track_event: 'click_text', track_label: 'milestone_title', track_property: 'search_result'} do
%span.term.str-truncated= milestone.title
- if milestone.description.present?
.description.term
- = search_md_sanitize(milestone, :description)
+ = search_md_sanitize(milestone.description)
diff --git a/app/views/search/results/_note.html.haml b/app/views/search/results/_note.html.haml
index a83b003a516..d88b7b32ed6 100644
--- a/app/views/search/results/_note.html.haml
+++ b/app/views/search/results/_note.html.haml
@@ -18,8 +18,13 @@
- else
%span #{note.noteable_type.titleize} ##{noteable_identifier}
&middot;
- = link_to note.noteable.title, note_url
+ = link_to note.noteable.title, note_url, data: {track_event: 'click_text', track_label: 'noteable_title', track_property: 'search_result'}
+
+ %span.note-headline-light.note-headline-meta
+ %span.system-note-separator
+ &middot;
+ %span.system-note-separator= time_ago_with_tooltip(note.created_at, placement: 'bottom', html_class: 'note-created-ago')
.note-search-result
.term
- = search_md_sanitize(note, :note)
+ = search_md_sanitize(note.note)