Revision 1154
Added by Jean-Philippe Lang over 17 years ago
Atom feeds:
- prevent duplicate entry ids for issue changes
- prevent empty email in author element
trunk/app/models/journal.rb | ||
---|---|---|
32 | 32 |
acts_as_event :title => Proc.new {|o| "#{o.issue.tracker.name} ##{o.issue.id}: #{o.issue.subject}" + ((s = o.new_status) ? " (#{s})" : '') }, |
33 | 33 |
:description => :notes, |
34 | 34 |
:author => :user, |
35 |
:url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.issue.id}} |
|
35 |
:url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.issue.id, :anchor => "change-#{o.id}"}}
|
|
36 | 36 |
|
37 | 37 |
def save |
38 | 38 |
# Do not save an empty journal |
trunk/app/views/common/feed.atom.rxml | ||
---|---|---|
15 | 15 |
xml.updated item.event_datetime.xmlschema |
16 | 16 |
author = item.event_author if item.respond_to?(:author) |
17 | 17 |
xml.author do |
18 |
xml.name(author.is_a?(User) ? author.name : author)
|
|
19 |
xml.email(author.mail) if author.is_a?(User)
|
|
18 |
xml.name(author) |
|
19 |
xml.email(author.mail) if author.respond_to?(:mail) && !author.mail.blank?
|
|
20 | 20 |
end if author |
21 | 21 |
xml.content "type" => "html" do |
22 | 22 |
xml.text! textilizable(item.event_description) |
Also available in: Unified diff