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
Jérome Perrin
gitlab-ce
Commits
896aa2a1
Commit
896aa2a1
authored
Jun 13, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/33584-atom-layout' into 'master'
Refactor atom builder by using a layout See merge request !12114
parents
578f4606
3c1700cd
Changes
16
Show 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 @
896aa2a1
...
@@ -14,7 +14,7 @@ module IssuesAction
...
@@ -14,7 +14,7 @@ module IssuesAction
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
atom
{
render
layout:
false
}
format
.
atom
{
render
layout:
'xml.atom'
}
end
end
end
end
end
end
app/controllers/dashboard/projects_controller.rb
View file @
896aa2a1
...
@@ -11,7 +11,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
...
@@ -11,7 +11,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
format
.
html
format
.
html
format
.
atom
do
format
.
atom
do
load_events
load_events
render
layout:
false
render
layout:
'xml.atom'
end
end
format
.
json
do
format
.
json
do
render
json:
{
render
json:
{
...
...
app/controllers/groups_controller.rb
View file @
896aa2a1
...
@@ -58,7 +58,7 @@ class GroupsController < Groups::ApplicationController
...
@@ -58,7 +58,7 @@ class GroupsController < Groups::ApplicationController
format
.
atom
do
format
.
atom
do
load_events
load_events
render
layout:
false
render
layout:
'xml.atom'
end
end
end
end
end
end
...
...
app/controllers/projects/commits_controller.rb
View file @
896aa2a1
...
@@ -26,7 +26,7 @@ class Projects::CommitsController < Projects::ApplicationController
...
@@ -26,7 +26,7 @@ class Projects::CommitsController < Projects::ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
atom
{
render
layout:
false
}
format
.
atom
{
render
layout:
'xml.atom'
}
format
.
json
do
format
.
json
do
pager_json
(
pager_json
(
...
...
app/controllers/projects/issues_controller.rb
View file @
896aa2a1
...
@@ -55,7 +55,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -55,7 +55,7 @@ class Projects::IssuesController < Projects::ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
atom
{
render
layout:
false
}
format
.
atom
{
render
layout:
'xml.atom'
}
format
.
json
do
format
.
json
do
render
json:
{
render
json:
{
html:
view_to_html_string
(
"projects/issues/_issues"
),
html:
view_to_html_string
(
"projects/issues/_issues"
),
...
...
app/controllers/projects_controller.rb
View file @
896aa2a1
...
@@ -108,7 +108,7 @@ class ProjectsController < Projects::ApplicationController
...
@@ -108,7 +108,7 @@ class ProjectsController < Projects::ApplicationController
format
.
atom
do
format
.
atom
do
load_events
load_events
render
layout:
false
render
layout:
'xml.atom'
end
end
end
end
end
end
...
...
app/controllers/users_controller.rb
View file @
896aa2a1
...
@@ -10,7 +10,7 @@ class UsersController < ApplicationController
...
@@ -10,7 +10,7 @@ class UsersController < ApplicationController
format
.
atom
do
format
.
atom
do
load_events
load_events
render
layout:
false
render
layout:
'xml.atom'
end
end
format
.
json
do
format
.
json
do
...
...
app/views/dashboard/issues.atom.builder
View file @
896aa2a1
xml.instruct!
xml.title "#{current_user.name} issues"
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.title "#{current_user.name} issues"
xml.link href: issues_dashboard_url, rel: "alternate", type: "text/html"
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.id issues_dashboard_url
xml.link href: issues_dashboard_url, rel: "alternate", type: "text/html"
xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any?
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?
xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any?
end
app/views/dashboard/projects/index.atom.builder
View file @
896aa2a1
xml.instruct!
xml.title "Activity"
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.link href: dashboard_projects_url(rss_url_options), rel: "self", type: "application/atom+xml"
xml.title "Activity"
xml.link href: dashboard_projects_url, rel: "alternate", type: "text/html"
xml.link href: dashboard_projects_url(rss_url_options), rel: "self", type: "application/atom+xml"
xml.id dashboard_projects_url
xml.link href: dashboard_projects_url, rel: "alternate", type: "text/html"
xml.updated @events[0].updated_at.xmlschema if @events[0]
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?
xml << render(partial: 'events/event', collection: @events) if @events.any?
end
app/views/groups/issues.atom.builder
View file @
896aa2a1
xml.instruct!
xml.title "#{@group.name} issues"
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.title "#{@group.name} issues"
xml.link href: issues_group_url, rel: "alternate", type: "text/html"
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.id issues_group_url
xml.link href: issues_group_url, rel: "alternate", type: "text/html"
xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any?
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?
xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any?
end
app/views/groups/show.atom.builder
View file @
896aa2a1
xml.instruct!
xml.title "#{@group.name} activity"
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.link href: group_url(@group, rss_url_options), rel: "self", type: "application/atom+xml"
xml.title "#{@group.name} activity"
xml.link href: group_url(@group), rel: "alternate", type: "text/html"
xml.link href: group_url(@group, rss_url_options), rel: "self", type: "application/atom+xml"
xml.id group_url(@group)
xml.link href: group_url(@group), rel: "alternate", type: "text/html"
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml.id group_url(@group)
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml << render(@events) if @events.any?
xml << render(@events) if @events.any?
end
app/views/layouts/xml.atom.builder
0 → 100644
View file @
896aa2a1
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 @
896aa2a1
xml.instruct!
xml.title "#{@project.name}:#{@ref} commits"
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref, rss_url_options), rel: "self", type: "application/atom+xml"
xml.title "#{@project.name}:#{@ref} commits"
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref), rel: "alternate", type: "text/html"
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref, rss_url_options), rel: "self", type: "application/atom+xml"
xml.id namespace_project_commits_url(@project.namespace, @project, @ref)
xml.link href: namespace_project_commits_url(@project.namespace, @project, @ref), rel: "alternate", type: "text/html"
xml.updated @commits.first.committed_date.xmlschema if @commits.any?
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?
xml << render(@commits) if @commits.any?
end
app/views/projects/issues/index.atom.builder
View file @
896aa2a1
xml.instruct!
xml.title "#{@project.name} issues"
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.title "#{@project.name} issues"
xml.link href: namespace_project_issues_url(@project.namespace, @project), rel: "alternate", type: "text/html"
xml.link href: url_for(params), rel: "self", type: "application/atom+xml"
xml.id namespace_project_issues_url(@project.namespace, @project)
xml.link href: namespace_project_issues_url(@project.namespace, @project), rel: "alternate", type: "text/html"
xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any?
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?
xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any?
end
app/views/projects/show.atom.builder
View file @
896aa2a1
xml.instruct!
xml.title "#{@project.name} activity"
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.link href: namespace_project_url(@project.namespace, @project, rss_url_options), rel: "self", type: "application/atom+xml"
xml.title "#{@project.name} activity"
xml.link href: namespace_project_url(@project.namespace, @project), rel: "alternate", type: "text/html"
xml.link href: namespace_project_url(@project.namespace, @project, rss_url_options), rel: "self", type: "application/atom+xml"
xml.id namespace_project_url(@project.namespace, @project)
xml.link href: namespace_project_url(@project.namespace, @project), rel: "alternate", type: "text/html"
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml.id namespace_project_url(@project.namespace, @project)
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml << render(@events) if @events.any?
xml << render(@events) if @events.any?
end
app/views/users/show.atom.builder
View file @
896aa2a1
xml.instruct!
xml.title "#{@user.name} activity"
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.link href: user_url(@user, :atom), rel: "self", type: "application/atom+xml"
xml.title "#{@user.name} activity"
xml.link href: user_url(@user), rel: "alternate", type: "text/html"
xml.link href: user_url(@user, :atom), rel: "self", type: "application/atom+xml"
xml.id user_url(@user)
xml.link href: user_url(@user), rel: "alternate", type: "text/html"
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml.id user_url(@user)
xml.updated @events[0].updated_at.xmlschema if @events[0]
xml << render(@events) if @events.any?
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