Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
896aa2a1
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
896aa2a1
编写于
6月 13, 2017
作者:
R
Rémy Coutable
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/33584-atom-layout' into 'master'
Refactor atom builder by using a layout See merge request !12114
上级
578f4606
3c1700cd
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
59 addition
and
79 deletion
+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
未找到文件。
app/controllers/concerns/issues_action.rb
浏览文件 @
896aa2a1
...
...
@@ -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
浏览文件 @
896aa2a1
...
...
@@ -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
浏览文件 @
896aa2a1
...
...
@@ -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
浏览文件 @
896aa2a1
...
...
@@ -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
浏览文件 @
896aa2a1
...
...
@@ -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
浏览文件 @
896aa2a1
...
...
@@ -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
浏览文件 @
896aa2a1
...
...
@@ -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
浏览文件 @
896aa2a1
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
浏览文件 @
896aa2a1
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
浏览文件 @
896aa2a1
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
浏览文件 @
896aa2a1
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
浏览文件 @
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
浏览文件 @
896aa2a1
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
浏览文件 @
896aa2a1
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
浏览文件 @
896aa2a1
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
浏览文件 @
896aa2a1
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?
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录