Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
66cebb6f
Commit
66cebb6f
authored
May 21, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `event_to_atom` helper
parent
00fa9a76
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
34 deletions
+24
-34
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+0
-22
app/views/dashboard/projects/index.atom.builder
app/views/dashboard/projects/index.atom.builder
+1
-3
app/views/events/_event.atom.builder
app/views/events/_event.atom.builder
+20
-0
app/views/groups/show.atom.builder
app/views/groups/show.atom.builder
+1
-3
app/views/projects/show.atom.builder
app/views/projects/show.atom.builder
+1
-3
app/views/users/show.atom.builder
app/views/users/show.atom.builder
+1
-3
No files found.
app/helpers/events_helper.rb
View file @
66cebb6f
...
...
@@ -159,28 +159,6 @@ module EventsHelper
"--broken encoding"
end
def
event_to_atom
(
xml
,
event
)
if
event
.
visible_to_user?
(
current_user
)
xml
.
entry
do
event_link
=
event_feed_url
(
event
)
event_title
=
event_feed_title
(
event
)
event_summary
=
event_feed_summary
(
event
)
xml
.
id
"tag:
#{
request
.
host
}
,
#{
event
.
created_at
.
strftime
(
"%Y-%m-%d"
)
}
:
#{
event
.
id
}
"
xml
.
link
href:
event_link
xml
.
title
truncate
(
event_title
,
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
|
author
|
xml
.
name
event
.
author_name
xml
.
email
event
.
author_email
end
xml
.
summary
(
type:
"xhtml"
)
{
|
x
|
x
<<
event_summary
unless
event_summary
.
nil?
}
end
end
end
def
event_row_class
(
event
)
if
event
.
body?
"event-block"
...
...
app/views/dashboard/projects/index.atom.builder
View file @
66cebb6f
...
...
@@ -6,7 +6,5 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
xml.id dashboard_projects_url
xml.updated @events[0].updated_at.xmlschema if @events[0]
@events.each do |event|
event_to_atom(xml, event)
end
xml << render(partial: 'events/event', collection: @events) if @events.any?
end
app/views/events/_event.atom.builder
0 → 100644
View file @
66cebb6f
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
app/views/groups/show.atom.builder
View file @
66cebb6f
...
...
@@ -6,7 +6,5 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
xml.id group_url(@group)
xml.updated @events[0].updated_at.xmlschema if @events[0]
@events.each do |event|
event_to_atom(xml, event)
end
xml << render(@events) if @events.any?
end
app/views/projects/show.atom.builder
View file @
66cebb6f
...
...
@@ -6,7 +6,5 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
xml.id namespace_project_url(@project.namespace, @project)
xml.updated @events[0].updated_at.xmlschema if @events[0]
@events.each do |event|
event_to_atom(xml, event)
end
xml << render(@events) if @events.any?
end
app/views/users/show.atom.builder
View file @
66cebb6f
...
...
@@ -6,7 +6,5 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
xml.id user_url(@user)
xml.updated @events[0].updated_at.xmlschema if @events[0]
@events.each do |event|
event_to_atom(xml, event)
end
xml << render(@events) if @events.any?
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment