Sha256: a04727cbd9150143c3deb7e34666ac87594adcea92ae15be32fcceaf5ab56e16

Contents?: true

Size: 1.58 KB

Versions: 18

Compression:

Stored size: 1.58 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('agent.library_group_agent', library_group_name: @library_group.display_name.localize)
    xml.link "#{request.protocol}#{request.host_with_port}#{url_for(filtered_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(filtered_params.merge(format: :rss, only_path: true))}"
    xml.tag! "atom:link", rel: 'alternate', href: agents_url
    xml.tag! "atom:link", rel: 'search', type: 'application/opensearchdescription+xml', href: page_opensearch_url
    if params[:query].present?
      xml.tag! "opensearch:totalResults", @count[:query_result]
      xml.tag! "opensearch:startIndex", @agents.offset + 1
      xml.tag! "opensearch:itemsPerPage", @agents.per_page
      xml.tag! "opensearch:Query", role: 'request', searchTerms: h(params[:query]), startPage: (h(params[:page]) || 1)
    end
    @agents.each do |agent|
      xml.item do
        xml.title agent.full_name
        #xml.description(agent.title)
        # rfc822
        xml.pubDate agent.created_at.utc.rfc822
        xml.link agent_url(agent)
        xml.guid agent_url(agent), isPermaLink: "true"
        #agent.tags.each do |tag|
        #  xml.category tag
        #end
      end
    end
  }
}

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
enju_biblio-0.3.12 app/views/agents/index.rss.builder
enju_biblio-0.3.11 app/views/agents/index.rss.builder
enju_biblio-0.3.10 app/views/agents/index.rss.builder
enju_biblio-0.3.10.rc.3 app/views/agents/index.rss.builder
enju_biblio-0.3.10.rc.2 app/views/agents/index.rss.builder
enju_biblio-0.3.10.rc.1 app/views/agents/index.rss.builder
enju_biblio-0.3.9 app/views/agents/index.rss.builder
enju_biblio-0.3.8 app/views/agents/index.rss.builder
enju_biblio-0.3.7 app/views/agents/index.rss.builder
enju_biblio-0.3.6 app/views/agents/index.rss.builder
enju_biblio-0.3.5 app/views/agents/index.rss.builder
enju_biblio-0.3.4 app/views/agents/index.rss.builder
enju_biblio-0.3.3 app/views/agents/index.rss.builder
enju_biblio-0.3.2 app/views/agents/index.rss.builder
enju_biblio-0.3.1 app/views/agents/index.rss.builder
enju_biblio-0.3.0 app/views/agents/index.rss.builder
enju_biblio-0.3.0.rc.1 app/views/agents/index.rss.builder
enju_biblio-0.3.0.beta.2 app/views/agents/index.rss.builder