Sha256: 841f166c37c2968739f5f3d51277cb3c93bad4aa80f0fe56046da62c93dce4d2

Contents?: true

Size: 1.61 KB

Versions: 12

Compression:

Stored size: 1.61 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('event.library_group_event', library_group_name: @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: events_url
    #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", @events.offset + 1
      xml.tag! "opensearch:itemsPerPage", @events.per_page
      #xml.tag! "opensearch:Query", :role => 'request', :searchTerms => params[:query], :startPage => (params[:page] || 1)
    end
    @events.each do |event|
      xml.item do
        xml.title event.display_name.localize
        xml.description event.note
        # rfc822
        xml.pubDate event.created_at.rfc2822
        xml.link event_url(event)
        xml.guid event_url(event), :isPermaLink => "true"
        #event.tags.each do |tag|
        #  xml.category tag.name
        #end
      end
    end
  }
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
enju_event-0.1.19 app/views/events/index.rss.builder
enju_event-0.1.18 app/views/events/index.rss.builder
enju_event-0.1.17 app/views/events/index.rss.builder
enju_event-0.1.17.pre27 app/views/events/index.rss.builder
enju_event-0.1.17.pre26 app/views/events/index.rss.builder
enju_event-0.1.17.pre25 app/views/events/index.rss.builder
enju_event-0.1.17.pre24 app/views/events/index.rss.builder
enju_event-0.1.17.pre23 app/views/events/index.rss.builder
enju_event-0.1.17.pre22 app/views/events/index.rss.builder
enju_event-0.1.17.pre21 app/views/events/index.rss.builder
enju_event-0.1.17.pre20 app/views/events/index.rss.builder
enju_event-0.1.17.pre19 app/views/events/index.rss.builder