debian-mirror-gitlab/app/views/search/results/_note.html.haml

26 lines
944 B
Text
Raw Normal View History

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
·
2016-06-02 11:05:42 +05:30
= link_to note.noteable.title, note_url
2015-04-26 12:48:37 +05:30
.note-search-result
.term
2017-08-17 22:00:37 +05:30
= search_md_sanitize(note, :note)