Remove `issue_to_atom` helper
This commit is contained in:
parent
c002a560af
commit
7001842dc4
|
@ -105,23 +105,6 @@ module IssuesHelper
|
||||||
return 'hidden' if issue.closed? == closed
|
return 'hidden' if issue.closed? == closed
|
||||||
end
|
end
|
||||||
|
|
||||||
def issue_to_atom(xml, issue)
|
|
||||||
xml.entry do
|
|
||||||
xml.id namespace_project_issue_url(issue.project.namespace,
|
|
||||||
issue.project, issue)
|
|
||||||
xml.link href: namespace_project_issue_url(issue.project.namespace,
|
|
||||||
issue.project, issue)
|
|
||||||
xml.title truncate(issue.title, length: 80)
|
|
||||||
xml.updated issue.created_at.xmlschema
|
|
||||||
xml.media :thumbnail, width: "40", height: "40", url: image_url(avatar_icon(issue.author_email))
|
|
||||||
xml.author do |author|
|
|
||||||
xml.name issue.author_name
|
|
||||||
xml.email issue.author_email
|
|
||||||
end
|
|
||||||
xml.summary issue.title
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def merge_requests_sentence(merge_requests)
|
def merge_requests_sentence(merge_requests)
|
||||||
# Sorting based on the `!123` or `group/project!123` reference will sort
|
# Sorting based on the `!123` or `group/project!123` reference will sort
|
||||||
# local merge requests first.
|
# local merge requests first.
|
||||||
|
|
|
@ -6,8 +6,5 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
|
||||||
xml.id issues_dashboard_url
|
xml.id issues_dashboard_url
|
||||||
xml.updated @issues.first.created_at.xmlschema if @issues.any?
|
xml.updated @issues.first.created_at.xmlschema if @issues.any?
|
||||||
|
|
||||||
@issues.each do |issue|
|
xml << render(partial: 'issues/issue', collection: @issues) if @issues.any?
|
||||||
issue_to_atom(xml, issue)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,5 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
|
||||||
xml.id issues_group_url
|
xml.id issues_group_url
|
||||||
xml.updated @issues.first.created_at.xmlschema if @issues.any?
|
xml.updated @issues.first.created_at.xmlschema if @issues.any?
|
||||||
|
|
||||||
@issues.each do |issue|
|
xml << render(partial: 'issues/issue', collection: @issues) if @issues.any?
|
||||||
issue_to_atom(xml, issue)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
xml.entry do
|
||||||
|
xml.id namespace_project_issue_url(issue.project.namespace, issue.project, issue)
|
||||||
|
xml.link href: namespace_project_issue_url(issue.project.namespace, issue.project, issue)
|
||||||
|
xml.title truncate(issue.title, length: 80)
|
||||||
|
xml.updated issue.created_at.xmlschema
|
||||||
|
xml.media :thumbnail, width: "40", height: "40", url: image_url(avatar_icon(issue.author_email))
|
||||||
|
|
||||||
|
xml.author do |author|
|
||||||
|
xml.name issue.author_name
|
||||||
|
xml.email issue.author_email
|
||||||
|
end
|
||||||
|
|
||||||
|
xml.summary issue.title
|
||||||
|
end
|
|
@ -6,7 +6,5 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
|
||||||
xml.id namespace_project_issues_url(@project.namespace, @project)
|
xml.id namespace_project_issues_url(@project.namespace, @project)
|
||||||
xml.updated @issues.first.created_at.xmlschema if @issues.any?
|
xml.updated @issues.first.created_at.xmlschema if @issues.any?
|
||||||
|
|
||||||
@issues.each do |issue|
|
xml << render(partial: 'issues/issue', collection: @issues) if @issues.any?
|
||||||
issue_to_atom(xml, issue)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue