Commit 4461b1aa authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Add anchors to comments from event feed


Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent f36e8aa11e15
...@@ -90,10 +90,10 @@ ...@@ -90,10 +90,10 @@
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?
...@@ -94,10 +94,10 @@ ...@@ -94,10 +94,10 @@
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?
......
Supports Markdown
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