summaryrefslogtreecommitdiff
path: root/app/views/events
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-05-21 18:02:49 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-05-23 12:37:40 -0400
commit66cebb6f61193a5fb4199b85580a312ed6d94b42 (patch)
treeda0f9a0822dee28c8c62b42d08a4840f612ed299 /app/views/events
parent00fa9a769d632d010f741ccb5492fdda66b11996 (diff)
downloadgitlab-ce-66cebb6f61193a5fb4199b85580a312ed6d94b42.tar.gz
Remove `event_to_atom` helper
Diffstat (limited to 'app/views/events')
-rw-r--r--app/views/events/_event.atom.builder20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/views/events/_event.atom.builder b/app/views/events/_event.atom.builder
new file mode 100644
index 00000000000..7890e717aa7
--- /dev/null
+++ b/app/views/events/_event.atom.builder
@@ -0,0 +1,20 @@
+return unless event.visible_to_user?(current_user)
+
+xml.entry do
+ xml.id "tag:#{request.host},#{event.created_at.strftime("%Y-%m-%d")}:#{event.id}"
+ xml.link href: event_feed_url(event)
+ xml.title truncate(event_feed_title(event), length: 80)
+ xml.updated event.created_at.xmlschema
+ xml.media :thumbnail, width: "40", height: "40", url: image_url(avatar_icon(event.author_email))
+
+ xml.author do
+ xml.name event.author_name
+ xml.email event.author_email
+ end
+
+ xml.summary(type: "xhtml") do |summary|
+ event_summary = event_feed_summary(event)
+
+ summary << event_summary unless event_summary.nil?
+ end
+end