Commit b27bd2b1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add anchors to comments from event feed

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 9a247213
...@@ -90,14 +90,14 @@ module EventsHelper ...@@ -90,14 +90,14 @@ module EventsHelper
if event.note? && event.note_commit? if event.note? && event.note_commit?
project_commit_path(event.project, event.note_target) project_commit_path(event.project, event.note_target)
else else
url_for([event.project, event.note_target]) polymorphic_path([event.project, event.note_target], anchor: dom_id(event.target))
end end
end end
def event_note_title_html(event) def event_note_title_html(event)
if event.note_target if event.note_target
if event.note_commit? if event.note_commit?
link_to project_commit_path(event.project, event.note_commit_id), class: "commit_short_id" do link_to project_commit_path(event.project, event.note_commit_id, anchor: dom_id(event.target)), class: "commit_short_id" do
"#{event.note_target_type} #{event.note_short_commit_id}" "#{event.note_target_type} #{event.note_short_commit_id}"
end end
elsif event.note_project_snippet? elsif event.note_project_snippet?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment