gitlab-org--gitlab-foss/app/views/search/results/_note.html.haml
Dmitriy Zaporozhets 0189be0831
Use short_id instead of [0..N] for short version of commit sha
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-10 15:39:48 +03:00

26 lines
818 B
Text

- project = note.project
.search-result-row
%h5.note-search-caption.str-truncated
%i.fa.fa-comment
= link_to_member(project, note.author, avatar: false)
commented on
- if note.for_commit?
= link_to project do
= project.name_with_namespace
&middot;
= link_to project_commit_path(project, note.commit_id, anchor: dom_id(note)) do
Commit #{truncate_sha(note.commit_id)}
- else
= link_to project do
= project.name_with_namespace
&middot;
%span #{note.noteable_type.titleize} ##{note.noteable.iid}
&middot;
= link_to [project, note.noteable, anchor: dom_id(note)] do
= note.noteable.title
.note-search-result
.term
= preserve do
= search_md_sanitize(markdown(note.note, {no_header_anchors: true}))