Sha256: 59dc7471b39c148c8e7b2c2208ae82922f17155da251fb2d2a586f397f05b2dd

Contents?: true

Size: 1.34 KB

Versions: 34

Compression:

Stored size: 1.34 KB

Contents

xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
  xml.title   truncate_single_line_raw(@title, 100)
  xml.link    "rel" => "self", "href" => url_for(params.merge(:only_path => false))
  xml.link    "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
  xml.id      home_url
  xml.icon    favicon_url
  xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
  xml.author  { xml.name "#{Setting.app_title}" }
  xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
  @items.each do |item|
    xml.entry do
      url = url_for(item.event_url(:only_path => false))
      if @project
        xml.title truncate_single_line_raw(item.event_title, 100)
      else
        xml.title truncate_single_line_raw("#{item.project} - #{item.event_title}", 100)
      end
      xml.link "rel" => "alternate", "href" => url
      xml.id url
      xml.updated item.event_datetime.xmlschema
      author = item.event_author if item.respond_to?(:event_author)
      xml.author do
        xml.name(author)
        xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
      end if author
      xml.content "type" => "html" do
        xml.text! textilizable(item, :event_description, :only_path => false)
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
redmine_extensions-0.0.23 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.22 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.21 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.20 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.19 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.18 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.17 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.16 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.15 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.14 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.13 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.12 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.10 spec/redmine/app/views/common/feed.atom.builder
redmine_extensions-0.0.8 spec/redmine/app/views/common/feed.atom.builder