2015-04-26 12:48:37 +05:30
|
|
|
- project = note.project
|
2016-06-02 11:05:42 +05:30
|
|
|
- note_url = Gitlab::UrlBuilder.build(note)
|
2016-09-13 17:45:13 +05:30
|
|
|
- noteable_identifier = note.noteable.try(:iid) || note.noteable.try(:id)
|
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
.search-result-row
|
|
|
|
%h5.note-search-caption.str-truncated
|
2020-10-24 23:57:45 +05:30
|
|
|
= sprite_icon('comment', css_class: 'gl-vertical-align-text-bottom')
|
2015-04-26 12:48:37 +05:30
|
|
|
= link_to_member(project, note.author, avatar: false)
|
2019-03-02 22:35:43 +05:30
|
|
|
- link_to_project = link_to(project.full_name, project)
|
|
|
|
= _("commented on %{link_to_project}").html_safe % { link_to_project: link_to_project }
|
2016-06-02 11:05:42 +05:30
|
|
|
·
|
2015-04-26 12:48:37 +05:30
|
|
|
|
|
|
|
- if note.for_commit?
|
2019-03-02 22:35:43 +05:30
|
|
|
= link_to_if(noteable_identifier, _("Commit %{commit_id}") % { commit_id: truncate_sha(note.commit_id) }, note_url) do
|
2016-09-13 17:45:13 +05:30
|
|
|
= truncate_sha(note.commit_id)
|
2019-03-02 22:35:43 +05:30
|
|
|
%span.light= _("Commit deleted")
|
2016-09-13 17:45:13 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
- else
|
2016-06-02 11:05:42 +05:30
|
|
|
%span #{note.noteable_type.titleize} ##{noteable_identifier}
|
2015-04-26 12:48:37 +05:30
|
|
|
·
|
2020-11-24 15:15:51 +05:30
|
|
|
= 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
|
|
|
|
·
|
|
|
|
%span.system-note-separator= time_ago_with_tooltip(note.created_at, placement: 'bottom', html_class: 'note-created-ago')
|
2015-04-26 12:48:37 +05:30
|
|
|
|
|
|
|
.note-search-result
|
|
|
|
.term
|
2020-11-24 15:15:51 +05:30
|
|
|
= search_md_sanitize(note.note)
|