Sha256: e33084152a8b8608fda5178fd2d9faab4b0dd5319053a2902ccb153f327c7f59

Contents?: true

Size: 1.92 KB

Versions: 65

Compression:

Stored size: 1.92 KB

Contents

xml.instruct! :xml, :version=>"1.0"
xml.rss('version' => "2.0",
  'xmlns:opensearch' => "http://a9.com/-/spec/opensearch/1.1/",
  'xmlns:atom' => "http://www.w3.org/2005/Atom"){
  xml.channel{
    if @user
      xml.title t('checkout.user_checkout', :login_name => @user.username)
      xml.link user_checkouts_url(@user)
      xml.tag! "atom:link", :rel => 'self', :href => "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => :rss, :only_path => true))}"
      xml.tag! "atom:link", :rel => 'alternate', :href => user_checkouts_url(@user)
    else
      xml.title t('checkout.library_group_checkout', :library_group_name => @library_group.display_name.localize)
      xml.link checkouts_url
      xml.tag! "atom:link", :rel => 'self', :href => "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => :rss, :only_path => true))}"
      xml.tag! "atom:link", :rel => 'alternate', :href => checkouts_url
    end
    xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
    xml.language @locale.to_s
    xml.ttl "60"
    #xml.tag! "atom:link", :rel => 'search', :type => 'application/opensearchdescription+xml', :href => "http://#{request.host_with_port}/page/opensearch"
    unless params[:query].blank?
      xml.tag! "opensearch:totalResults", @count[:query_result]
      xml.tag! "opensearch:startIndex", @checkouts.offset + 1
      xml.tag! "opensearch:itemsPerPage", @checkouts.per_page
      #xml.tag! "opensearch:Query", :role => 'request', :searchTerms => params[:query], :startPage => (params[:page] || 1)
    end
    @checkouts.each do |checkout|
      xml.item do
        xml.title checkout.item.manifestation.original_title
        #xml.description(checkout.title)
        # rfc822
        xml.pubDate checkout.created_at.utc.rfc822
        xml.link checkout_url(checkout)
        xml.guid checkout_url(checkout), :isPermaLink => "true"
      end
    end
  }
}

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
enju_circulation-0.1.0.pre36 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre35 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre34 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre33 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre32 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre31 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre30 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre29 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre28 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre27 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre26 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre25 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre24 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre23 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre22 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre21 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre20 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre19 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre18 app/views/checkouts/index.rss.builder
enju_circulation-0.1.0.pre17 app/views/checkouts/index.rss.builder