diff options
Diffstat (limited to 'app/views/search/results')
-rw-r--r-- | app/views/search/results/_blob_data.html.haml | 1 | ||||
-rw-r--r-- | app/views/search/results/_issuable.html.haml | 33 | ||||
-rw-r--r-- | app/views/search/results/_timeout.html.haml | 10 |
3 files changed, 30 insertions, 14 deletions
diff --git a/app/views/search/results/_blob_data.html.haml b/app/views/search/results/_blob_data.html.haml index 16d640273b0..fb2825ad15e 100644 --- a/app/views/search/results/_blob_data.html.haml +++ b/app/views/search/results/_blob_data.html.haml @@ -5,6 +5,7 @@ = sprite_icon('document') %strong = search_blob_title(project, path) + = copy_file_path_button(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, blob_link: blob_link, highlight_line: blob.highlight_line diff --git a/app/views/search/results/_issuable.html.haml b/app/views/search/results/_issuable.html.haml index da0adba88db..551f5c048bc 100644 --- a/app/views/search/results/_issuable.html.haml +++ b/app/views/search/results/_issuable.html.haml @@ -1,14 +1,19 @@ -%div{ class: 'search-result-row gl-pb-3! gl-mt-5 gl-mb-0!' } - %span.gl-display-flex.gl-align-items-center - %span.badge.badge-pill.gl-badge.sm{ class: "badge-#{issuable_state_to_badge_class(issuable)}" }= issuable_state_text(issuable) - = sprite_icon('eye-slash', css_class: 'gl-text-gray-500 gl-ml-2') if issuable.respond_to?(:confidential?) && issuable.confidential? - = link_to issuable_path(issuable), data: { track_event: 'click_text', track_label: "#{issuable.class.name.downcase}_title", track_property: 'search_result' }, class: 'gl-w-full' do - %span.term.str-truncated.gl-font-weight-bold.gl-ml-2= issuable.title - .gl-text-gray-500.gl-my-3 - = issuable_project_reference(issuable) - · - = sprintf(s_('created %{issuable_created} by %{author}'), { issuable_created: time_ago_with_tooltip(issuable.created_at, placement: 'bottom'), author: link_to_member(@project, issuable.author, avatar: false) }).html_safe - · - = sprintf(s_('updated %{time_ago}'), { time_ago: time_ago_with_tooltip(issuable.updated_at, placement: 'bottom') }).html_safe - .description.term.col-sm-10.gl-px-0 - = highlight_and_truncate_issuable(issuable, @search_term, @search_highlight) +%div{ class: 'search-result-row gl-display-flex gl-sm-flex-direction-row gl-flex-direction-column gl-align-items-center gl-pb-3! gl-mt-5 gl-mb-0!' } + .col-sm-9 + %span.gl-display-flex.gl-align-items-center + %span.badge.badge-pill.gl-badge.sm{ class: "badge-#{issuable_state_to_badge_class(issuable)}" }= issuable_state_text(issuable) + = sprite_icon('eye-slash', css_class: 'gl-text-gray-500 gl-ml-2') if issuable.respond_to?(:confidential?) && issuable.confidential? + = link_to issuable_path(issuable), data: { track_event: 'click_text', track_label: "#{issuable.class.name.downcase}_title", track_property: 'search_result' }, class: 'gl-w-full' do + %span.term.str-truncated.gl-font-weight-bold.gl-ml-2= issuable.title + .gl-text-gray-500.gl-my-3 + = issuable_project_reference(issuable) + · + = sprintf(s_('created %{issuable_created} by %{author}'), { issuable_created: time_ago_with_tooltip(issuable.created_at, placement: 'bottom'), author: link_to_member(@project, issuable.author, avatar: false) }).html_safe + .description.term.gl-px-0 + = highlight_and_truncate_issuable(issuable, @search_term, @search_highlight) + .col-sm-3.gl-mt-3.gl-sm-mt-0.gl-text-right + - if Feature.enabled?(:search_sort_issues_by_popularity) && issuable.respond_to?(:upvotes_count) && issuable.upvotes_count > 0 + %li.issuable-upvotes.gl-list-style-none.has-tooltip{ title: _('Upvotes') } + = sprite_icon('thumb-up', css_class: "gl-vertical-align-middle") + = issuable.upvotes_count + %span.gl-text-gray-500= sprintf(s_('updated %{time_ago}'), { time_ago: time_ago_with_tooltip(issuable.updated_at, placement: 'bottom') }).html_safe diff --git a/app/views/search/results/_timeout.html.haml b/app/views/search/results/_timeout.html.haml new file mode 100644 index 00000000000..740e2bedd54 --- /dev/null +++ b/app/views/search/results/_timeout.html.haml @@ -0,0 +1,10 @@ +.gl-display-flex.gl-flex-direction-column.gl-align-items-center + %div + .svg-content.svg-150 + = image_tag 'illustrations/search-timeout-md.svg' + %div + %h4.gl-text-center.gl-font-weight-bold= _('Your search timed out') + %p.gl-text-center= _('To resolve this, try to:') + %ul + %li= html_escape(_('Refine your search criteria (select a %{strong_open}group%{strong_close} and %{strong_open}project%{strong_close} when possible)')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } + %li= html_escape(_('Use double quotes for multiple keywords, such as %{code_open}"your search"%{code_close}')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } |