To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / common / feed.atom.builder @ 1531:ae8145b28b2b

History | View | Annotate | Download (1.38 KB)

1
xml.instruct!
2
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
3
  xml.title   truncate_single_line_raw(@title, 100)
4
  xml.link    "rel" => "self", "href" => url_for(params.merge(:only_path => false))
5
  xml.link    "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
6
  xml.id      url_for(:controller => 'welcome', :only_path => false)
7
  xml.icon    favicon_url
8
  xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
9
  xml.author  { xml.name "#{Setting.app_title}" }
10
  xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
11
  @items.each do |item|
12
    xml.entry do
13
      url = url_for(item.event_url(:only_path => false))
14
      if @project
15
        xml.title truncate_single_line_raw(item.event_title, 100)
16
      else
17
        xml.title truncate_single_line_raw("#{item.project} - #{item.event_title}", 100)
18
      end
19
      xml.link "rel" => "alternate", "href" => url
20
      xml.id url
21
      xml.updated item.event_datetime.xmlschema
22
      author = item.event_author if item.respond_to?(:event_author)
23
      xml.author do
24
        xml.name(author)
25
        xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
26
      end if author
27
      xml.content "type" => "html" do
28
        xml.text! textilizable(item, :event_description, :only_path => false)
29
      end
30
    end
31
  end
32
end