Sha256: 1170ec689b26e42faeffef0c6c99ebacc42e2e142a03ff20a3bd2071f29370e1

Contents?: true

Size: 1.64 KB

Versions: 37

Compression:

Stored size: 1.64 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

37 entries across 37 versions & 1 rubygems

Version Path
enju_event-0.1.17.pre18 app/views/events/index.rss.builder
enju_event-0.1.17.pre17 app/views/events/index.rss.builder
enju_event-0.1.17.pre16 app/views/events/index.rss.builder
enju_event-0.1.17.pre15 app/views/events/index.rss.builder
enju_event-0.1.17.pre14 app/views/events/index.rss.builder
enju_event-0.1.17.pre13 app/views/events/index.rss.builder
enju_event-0.1.17.pre12 app/views/events/index.rss.builder
enju_event-0.1.17.pre11 app/views/events/index.rss.builder
enju_event-0.1.17.pre10 app/views/events/index.rss.builder
enju_event-0.1.17.pre9 app/views/events/index.rss.builder
enju_event-0.1.17.pre8 app/views/events/index.rss.builder
enju_event-0.1.17.pre7 app/views/events/index.rss.builder
enju_event-0.1.17.pre6 app/views/events/index.rss.builder
enju_event-0.1.17.pre5 app/views/events/index.rss.builder
enju_event-0.1.17.pre4 app/views/events/index.rss.builder
enju_event-0.1.17.pre3 app/views/events/index.rss.builder
enju_event-0.1.17.pre2 app/views/events/index.rss.builder
enju_event-0.1.17.pre app/views/events/index.rss.builder
enju_event-0.1.16 app/views/events/index.rss.builder
enju_event-0.1.15 app/views/events/index.rss.builder