summaryrefslogtreecommitdiff
path: root/app/views/search/results/_note.html.haml
blob: f3701b89bb4709f76f3922800ddc56ae52aa97c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- project = note.project
- note_url = Gitlab::UrlBuilder.build(note)
- noteable_identifier = note.noteable.try(:iid) || note.noteable.try(:id)

.search-result-row
  %h5.note-search-caption.str-truncated
    %i.fa.fa-comment
    = link_to_member(project, note.author, avatar: false)
    commented on
    = link_to project.name_with_namespace, project
    ·

    - if note.for_commit?
      = link_to_if(noteable_identifier, "Commit #{truncate_sha(note.commit_id)}", note_url) do
        = truncate_sha(note.commit_id)
        %span.light Commit deleted

    - else
      %span #{note.noteable_type.titleize} ##{noteable_identifier}
      ·
      = link_to note.noteable.title, note_url

  .note-search-result
    .term
      = preserve do
        = search_md_sanitize(note, :note)