Sha256: c0a1ad5a14cf972bf03f0f9a5baf956371ac0d8241456d0d917a9f41bcde9c70

Contents?: true

Size: 1.31 KB

Versions: 6

Compression:

Stored size: 1.31 KB

Contents

xm.entry do
  xm.author do
    name = item.user.name rescue item.author
    email = item.user.email rescue nil
    xm.name name
    xm.email email if this_blog.link_to_author unless email.blank?
  end
  xm.id "urn:uuid:#{item.guid}"

  xm.published item.published_at.xmlschema
  xm.updated item.updated_at.xmlschema
  xm.title post_title(item), "type"=>"html"

  xm.link "rel" => "alternate", "type" => "text/html", "href" => item.permalink_url

  item.categories.each do |category|
    xm.category "term" => category.permalink, "label" => category.name, "scheme" => category.permalink_url
  end
  item.tags.each do |tag|
    xm.category "term" => tag.display_name, "scheme" => tag.permalink_url
  end

  item.resources.each do |resource|
    if resource.size > 0  # The Atom spec disallows files with size=0
      xm.link "rel" => "enclosure",
              :type => resource.mime,
              :title => item.title,
              :href => this_blog.file_url(resource.filename),
              :length => resource.size
    else
      xm.link "rel" => "enclosure",
              :type => resource.mime,
              :title => item.title,
              :href => this_blog.file_url(resource.filename)
    end
  end
  xm.summary html(item, :body), "type"=>"html"
  xm.content html(item, :all), "type"=>"html" if this_blog.show_extended_on_rss 
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
typo-5.5 app/views/xml/_atom10_item_article.atom.builder
typo-5.4.4 app/views/xml/_atom10_item_article.atom.builder
typo-5.4.3 app/views/xml/_atom10_item_article.atom.builder
typo-5.4.2 app/views/xml/_atom10_item_article.atom.builder
typo-5.4.1 app/views/xml/_atom10_item_article.atom.builder
typo-5.4 app/views/xml/_atom10_item_article.atom.builder