diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-01 11:46:23 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-01 11:46:23 +0000 |
commit | f12967ced74dec4803e3a09382891b6f3ba81d56 (patch) | |
tree | 7a3e515300c156ad5899c7d8034545001869ed27 /app | |
parent | 5be5b23f43f2f94885f1a86483349aa0fa78183e (diff) | |
parent | 420b46eedf03bdcaaa4177b9db7b8c39162fe40c (diff) | |
download | gitlab-ce-f12967ced74dec4803e3a09382891b6f3ba81d56.tar.gz |
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.
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/events_helper.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index f0530c74828..91c18ff8f95 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -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 |