Sha256: 78fffcc2973bf5923f97fe44c2c2b40a16641a3129433fb6b902a5321f37f31d

Contents?: true

Size: 1.82 KB

Versions: 126

Compression:

Stored size: 1.82 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('reserve.user_reserve', :login_name => @user.username)
      xml.link user_reserves_url(@user, :format => :rss)
    else
      xml.title t('reserve.library_group_reserve', :library_group_name => @library_group.display_name.localize)
      xml.link reserves_url(:format => :rss)
    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"
    if @user
      xml.tag! "atom:link", :rel => 'self', :href => user_reserves_url(@user, :format => :rss)
      xml.tag! "atom:link", :rel => 'alternate', :href => user_reserves_url(@user)
    else
      xml.tag! "atom:link", :rel => 'self', :href => reserves_url(:format => :rss)
      xml.tag! "atom:link", :rel => 'alternate', :href => reserves_url
    end
    #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", @reserves.offset + 1
      xml.tag! "opensearch:itemsPerPage", @reserves.per_page
      #xml.tag! "opensearch:Query", :role => 'request', :searchTerms => params[:query], :startPage => (params[:page] || 1)
    end
    @reserves.each do |reserve|
      xml.item do
        xml.title reserve.manifestation.original_title
        #xml.description(reserve.title)
        # rfc822
        xml.pubDate reserve.created_at.utc.rfc822
        xml.link reserve_url(reserve)
        xml.guid reserve_url(reserve), :isPermaLink => "true"
      end
    end
  }
}

Version data entries

126 entries across 126 versions & 2 rubygems

Version Path
enju_circulation-0.0.38 app/views/reserves/index.rss.builder
enju_circulation-0.0.37 app/views/reserves/index.rss.builder
enju_circulation-0.0.36 app/views/reserves/index.rss.builder
enju_circulation-0.0.35 app/views/reserves/index.rss.builder
enju_circulation-0.0.34 app/views/reserves/index.rss.builder
enju_message-0.0.19 app/views/reserves/index.rss.builder
enju_message-0.1.1 app/views/reserves/index.rss.builder
enju_circulation-0.0.33 app/views/reserves/index.rss.builder
enju_circulation-0.0.32 app/views/reserves/index.rss.builder
enju_message-0.1.0 app/views/reserves/index.rss.builder
enju_circulation-0.0.31 app/views/reserves/index.rss.builder
enju_circulation-0.0.30 app/views/reserves/index.rss.builder
enju_circulation-0.0.29 app/views/reserves/index.rss.builder
enju_message-0.0.18 app/views/reserves/index.rss.builder
enju_circulation-0.0.28 app/views/reserves/index.rss.builder
enju_message-0.0.17 app/views/reserves/index.rss.builder
enju_message-0.0.16 app/views/reserves/index.rss.builder
enju_circulation-0.0.27 app/views/reserves/index.rss.builder
enju_message-0.0.15 app/views/reserves/index.rss.builder
enju_circulation-0.0.26 app/views/reserves/index.rss.builder