Commit f12967ce authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'bugfix/304/dashboard_feed_note_urls' into 'master'

Fix Dashboard Feed URLs For Notes

This MR fixes issue #304 by updating the app/helpers/events_helper.rb event_feed_url() function to also return a URL for the various types of notes. Without this change, no URL is returned, which causes any note events on the feed to link directly back to the feed.
parents 5be5b23f 420b46ee
......@@ -64,7 +64,16 @@ module EventsHelper
project_issue_url(event.project, event.issue)
elsif event.merge_request?
project_merge_request_url(event.project, event.merge_request)
elsif event.note?
if event.note_target
if event.note_commit?
project_commit_path(event.project, event.note_commit_id, anchor: dom_id(event.target))
elsif event.note_project_snippet?
project_snippet_path(event.project, event.note_target)
else
event_note_target_path(event)
end
end
elsif event.push?
if event.push_with_commits?
if event.commits_count > 1
......
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