diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-07-29 16:20:00 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-08-01 11:53:12 -0300 |
commit | 9845079950da010b8a4c07777f984aaf02642ad0 (patch) | |
tree | 097ad8578aa8316273c47fc7b0638c348f54be47 /app/views/search | |
parent | ab3dd9a106787b70c26e55e9f0dc7fe6c34b0769 (diff) | |
download | gitlab-ce-9845079950da010b8a4c07777f984aaf02642ad0.tar.gz |
Fix search results for notes without commits
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/results/_note.html.haml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/views/search/results/_note.html.haml b/app/views/search/results/_note.html.haml index 8163aff43b6..e0400083870 100644 --- a/app/views/search/results/_note.html.haml +++ b/app/views/search/results/_note.html.haml @@ -1,6 +1,7 @@ - project = note.project - note_url = Gitlab::UrlBuilder.build(note) -- noteable_identifier = note.noteable.try(:iid) || note.noteable.id +- noteable_identifier = note.noteable.try(:iid) || note.noteable.try(:id) + .search-result-row %h5.note-search-caption.str-truncated %i.fa.fa-comment @@ -10,7 +11,10 @@ · - if note.for_commit? - = link_to "Commit #{truncate_sha(note.commit_id)}", note_url + = 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} · |