Sha256: 4577ff7e7d169645b43f71c5ee2c0f9f10b3b39e9c1b89bb498f24258b0f9f57

Contents?: true

Size: 1.52 KB

Versions: 32

Compression:

Stored size: 1.52 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{
    xml.title t('page.listing', :model => t('activerecord.models.subject')) + " (#{@library_group.display_name.localize})"
    xml.link "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => nil, :only_path => true))}"
    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 => 'self', :href => "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => :rss, :only_path => true))}"
    xml.tag! "atom:link", :rel => 'alternate', :href => subjects_url
    xml.tag! "atom:link", :rel => 'search', :type => 'application/opensearchdescription+xml', :href => page_opensearch_url
    unless params[:query].blank?
      xml.tag! "opensearch:totalResults", @count[:query_result]
      xml.tag! "opensearch:startIndex", @subjects.offset + 1
      xml.tag! "opensearch:itemsPerPage", @subjects.per_page
      xml.tag! "opensearch:Query", :role => 'request', :searchTerms => h(params[:query]), :startPage => (h(params[:page]) || 1)
    end
    @subjects.each do |subject|
      xml.item do
        xml.title subject.term
        xml.pubDate subject.created_at.utc.rfc822
        xml.link subject_url(subject)
        xml.guid subject_url(subject), :isPermaLink => "true"
      end
    end
  }
}

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
enju_subject-0.1.0.pre25 app/views/subjects/index.rss.builder
enju_trunk_subject-1.0.4 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre24 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre23 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre22 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre21 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre20 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre19 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre18 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre17 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre16 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre15 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre14 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre13 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre12 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre11 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre10 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre9 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre8 app/views/subjects/index.rss.builder
enju_subject-0.1.0.pre7 app/views/subjects/index.rss.builder