mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Users currently have no way to be notified when new conferences are published on an OSEM instance. This adds an RSS 2.0 feed endpoint at /feed.rss that lists all conferences ordered by creation date. The feed action is excluded from CanCanCan authorization so it remains publicly accessible without authentication, similar to the existing calendar endpoint. Also adds an RSS subscribe link to the conferences index page and an auto-discovery <link> tag in the application layout so RSS readers can detect the feed automatically. Fixes #3543
18 lines
580 B
Ruby
18 lines
580 B
Ruby
xml.instruct! :xml, version: "1.0"
|
|
xml.rss version: "2.0" do
|
|
xml.channel do
|
|
xml.title "#{ENV.fetch('OSEM_NAME', 'OSEM')} - Conferences"
|
|
xml.description "Conferences from #{ENV.fetch('OSEM_NAME', 'OSEM')}"
|
|
xml.link conferences_url
|
|
|
|
@conferences.each do |conference|
|
|
xml.item do
|
|
xml.title conference.title
|
|
xml.description conference.description
|
|
xml.pubDate conference.created_at.to_fs(:rfc822)
|
|
xml.link conference_url(conference.short_title)
|
|
xml.guid conference_url(conference.short_title)
|
|
end
|
|
end
|
|
end
|
|
end
|