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
Boxiang Sun
gitlab-ce
Commits
3c1700cd
Commit
3c1700cd
authored
Jun 12, 2017
by
Tieu-Philippe KHIM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor atom builder by using xml.atom layout
parent
b16730fc
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
59 additions
and
79 deletions
+59
-79
app/controllers/concerns/issues_action.rb
app/controllers/concerns/issues_action.rb
+1
-1
app/controllers/dashboard/projects_controller.rb
app/controllers/dashboard/projects_controller.rb
+1
-1
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+1
-1
app/controllers/projects/commits_controller.rb
app/controllers/projects/commits_controller.rb
+1
-1
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+1
-1
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-1
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+1
-1
app/views/dashboard/issues.atom.builder
app/views/dashboard/issues.atom.builder
+6
-9
app/views/dashboard/projects/index.atom.builder
app/views/dashboard/projects/index.atom.builder
+6
-9
app/views/groups/issues.atom.builder
app/views/groups/issues.atom.builder
+6
-9
app/views/groups/show.atom.builder
app/views/groups/show.atom.builder
+6
-9
app/views/layouts/xml.atom.builder
app/views/layouts/xml.atom.builder
+4
-0
app/views/projects/commits/show.atom.builder
app/views/projects/commits/show.atom.builder
+6
-9
app/views/projects/issues/index.atom.builder
app/views/projects/issues/index.atom.builder
+6
-9
app/views/projects/show.atom.builder
app/views/projects/show.atom.builder
+6
-9
app/views/users/show.atom.builder
app/views/users/show.atom.builder
+6
-9
No files found.
app/controllers/concerns/issues_action.rb
View file @
3c1700cd
...
...
@@ -14,7 +14,7 @@ module IssuesAction
respond_to
do
|
format
|
format
.
html
format
.
atom
{
render
layout:
false
}
format
.
atom
{
render
layout:
'xml.atom'
}
end
end
end
app/controllers/dashboard/projects_controller.rb
View file @
3c1700cd
...
...
@@ -11,7 +11,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
format
.
html
format
.
atom
do
load_events
render
layout:
false
render
layout:
'xml.atom'
end
format
.
json
do
render
json:
{
...
...
app/controllers/groups_controller.rb
View file @
3c1700cd
...
...
@@ -58,7 +58,7 @@ class GroupsController < Groups::ApplicationController
format
.
atom
do
load_events
render
layout:
false
render
layout:
'xml.atom'
end
end
end
...
...
app/controllers/projects/commits_controller.rb
View file @
3c1700cd
...
...
@@ -26,7 +26,7 @@ class Projects::CommitsController < Projects::ApplicationController
respond_to
do
|
format
|
format
.
html
format
.
atom
{
render
layout:
false
}
format
.
atom
{
render
layout:
'xml.atom'
}
format
.
json
do
pager_json
(
...
...
app/controllers/projects/issues_controller.rb
View file @
3c1700cd
...
...
@@ -55,7 +55,7 @@ class Projects::IssuesController < Projects::ApplicationController
respond_to
do
|
format
|
format
.
html
format
.
atom
{
render
layout:
false
}
format
.
atom
{
render
layout:
'xml.atom'
}
format
.
json
do
render
json:
{
html:
view_to_html_string
(
"projects/issues/_issues"
),
...
...
app/controllers/projects_controller.rb
View file @
3c1700cd
...
...
@@ -108,7 +108,7 @@ class ProjectsController < Projects::ApplicationController
format
.
atom
do
load_events
render
layout:
false
render
layout:
'xml.atom'
end
end
end
...
...
app/controllers/users_controller.rb
View file @
3c1700cd
...
...
@@ -10,7 +10,7 @@ class UsersController < ApplicationController
format
.
atom
do
load_events
render
layout:
false
render
layout:
'xml.atom'
end
format
.
json
do
...
...
app/views/dashboard/issues.atom.builder
View file @
3c1700cd
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{current_user.name} issues"
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.link href: issues_dashboard_url, rel: "alternate", type: "text/html"
xml.id issues_dashboard_url
xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any?
xml.title "#{current_user.name} issues"
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.link href: issues_dashboard_url, rel: "alternate", type: "text/html"
xml.id issues_dashboard_url
xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any?
xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any?
end
xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any?
app/views/dashboard/projects/index.atom.builder
View file @
3c1700cd
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "Activity"
xml.link href: dashboard_projects_url(rss_url_options), rel: "self", type: "application/atom+xml"
xml.link href: dashboard_projects_url, rel: "alternate", type: "text/html"
xml.id dashboard_projects_url
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml.title "Activity"
xml.link href: dashboard_projects_url(rss_url_options), rel: "self", type: "application/atom+xml"
xml.link href: dashboard_projects_url, rel: "alternate", type: "text/html"
xml.id dashboard_projects_url
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml << render(partial: 'events/event', collection: @events) if @events.any?
end
xml << render(partial: 'events/event', collection: @events) if @events.any?
app/views/groups/issues.atom.builder
View file @
3c1700cd
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{@group.name} issues"
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.link href: issues_group_url, rel: "alternate", type: "text/html"
xml.id issues_group_url
xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any?
xml.title "#{@group.name} issues"
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.link href: issues_group_url, rel: "alternate", type: "text/html"
xml.id issues_group_url
xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any?
xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any?
end
xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any?
app/views/groups/show.atom.builder
View file @
3c1700cd
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{@group.name} activity"
xml.link href: group_url(@group, rss_url_options), rel: "self", type: "application/atom+xml"
xml.link href: group_url(@group), rel: "alternate", type: "text/html"
xml.id group_url(@group)
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml.title "#{@group.name} activity"
xml.link href: group_url(@group, rss_url_options), rel: "self", type: "application/atom+xml"
xml.link href: group_url(@group), rel: "alternate", type: "text/html"
xml.id group_url(@group)
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml << render(@events) if @events.any?
end
xml << render(@events) if @events.any?
app/views/layouts/xml.atom.builder
0 → 100644
View file @
3c1700cd
xml.instruct!
xml.feed 'xmlns' => 'http://www.w3.org/2005/Atom', 'xmlns:media' => 'http://search.yahoo.com/mrss/' do
xml << yield
end
app/views/projects/commits/show.atom.builder
View file @
3c1700cd
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{@project.name}:#{@ref} commits"
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref, rss_url_options), rel: "self", type: "application/atom+xml"
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref), rel: "alternate", type: "text/html"
xml.id namespace_project_commits_url(@project.namespace, @project, @ref)
xml.updated @commits.first.committed_date.xmlschema if @commits.any?
xml.title "#{@project.name}:#{@ref} commits"
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref, rss_url_options), rel: "self", type: "application/atom+xml"
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref), rel: "alternate", type: "text/html"
xml.id namespace_project_commits_url(@project.namespace, @project, @ref)
xml.updated @commits.first.committed_date.xmlschema if @commits.any?
xml << render(@commits) if @commits.any?
end
xml << render(@commits) if @commits.any?
app/views/projects/issues/index.atom.builder
View file @
3c1700cd
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{@project.name} issues"
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.link href: namespace_project_issues_url(@project.namespace, @project), rel: "alternate", type: "text/html"
xml.id namespace_project_issues_url(@project.namespace, @project)
xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any?
xml.title "#{@project.name} issues"
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.link href: namespace_project_issues_url(@project.namespace, @project), rel: "alternate", type: "text/html"
xml.id namespace_project_issues_url(@project.namespace, @project)
xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any?
xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any?
end
xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any?
app/views/projects/show.atom.builder
View file @
3c1700cd
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{@project.name} activity"
xml.link href: namespace_project_url(@project.namespace, @project, rss_url_options), rel: "self", type: "application/atom+xml"
xml.link href: namespace_project_url(@project.namespace, @project), rel: "alternate", type: "text/html"
xml.id namespace_project_url(@project.namespace, @project)
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml.title "#{@project.name} activity"
xml.link href: namespace_project_url(@project.namespace, @project, rss_url_options), rel: "self", type: "application/atom+xml"
xml.link href: namespace_project_url(@project.namespace, @project), rel: "alternate", type: "text/html"
xml.id namespace_project_url(@project.namespace, @project)
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml << render(@events) if @events.any?
end
xml << render(@events) if @events.any?
app/views/users/show.atom.builder
View file @
3c1700cd
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{@user.name} activity"
xml.link href: user_url(@user, :atom), rel: "self", type: "application/atom+xml"
xml.link href: user_url(@user), rel: "alternate", type: "text/html"
xml.id user_url(@user)
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml.title "#{@user.name} activity"
xml.link href: user_url(@user, :atom), rel: "self", type: "application/atom+xml"
xml.link href: user_url(@user), rel: "alternate", type: "text/html"
xml.id user_url(@user)
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml << render(@events) if @events.any?
end
xml << render(@events) if @events.any?
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