summaryrefslogtreecommitdiff
path: root/app/helpers/events_helper.rb
diff options
context:
space:
mode:
authorschwedenmut <schwedenmut@googlemail.com>2018-09-05 11:29:04 +0000
committerRémy Coutable <remy@rymai.me>2018-09-05 11:29:04 +0000
commit00e42e3c454bf87a5cae580c8edfa647d6e4d7c1 (patch)
tree5565cefd67b8114e9037050ac82bfc0d16a5ed63 /app/helpers/events_helper.rb
parent4a3a74979796e6245bd82dd06c52146caecb9b9e (diff)
downloadgitlab-ce-00e42e3c454bf87a5cae580c8edfa647d6e4d7c1.tar.gz
Resolve "<link href=""> and <a href=""> not properly filled in activity RSS feed"
Diffstat (limited to 'app/helpers/events_helper.rb')
-rw-r--r--app/helpers/events_helper.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb
index cb6f709c604..269acf5b2e2 100644
--- a/app/helpers/events_helper.rb
+++ b/app/helpers/events_helper.rb
@@ -110,10 +110,12 @@ module EventsHelper
event.note_target)
elsif event.note?
if event.note_target
- event_note_target_path(event)
+ event_note_target_url(event)
end
elsif event.push?
push_event_feed_url(event)
+ elsif event.created_project?
+ project_url(event.project)
end
end
@@ -145,14 +147,14 @@ module EventsHelper
end
end
- def event_note_target_path(event)
+ def event_note_target_url(event)
if event.commit_note?
- project_commit_path(event.project, event.note_target, anchor: dom_id(event.target))
+ project_commit_url(event.project, event.note_target, anchor: dom_id(event.target))
elsif event.project_snippet_note?
- project_snippet_path(event.project, event.note_target, anchor: dom_id(event.target))
+ project_snippet_url(event.project, event.note_target, anchor: dom_id(event.target))
else
- polymorphic_path([event.project.namespace.becomes(Namespace),
- event.project, event.note_target],
+ polymorphic_url([event.project.namespace.becomes(Namespace),
+ event.project, event.note_target],
anchor: dom_id(event.target))
end
end
@@ -166,7 +168,7 @@ module EventsHelper
event.note_target_reference
end
- link_to(text, event_note_target_path(event), title: event.target_title, class: 'has-tooltip')
+ link_to(text, event_note_target_url(event), title: event.target_title, class: 'has-tooltip')
else
content_tag(:strong, '(deleted)')
end