osem-fcy/app/views/conferences/index.html.haml
Kushal SM 1958ac2b10 feat: Add public RSS feed for conferences
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
2026-03-18 17:50:52 +01:00

39 lines
1.5 KiB
Text

.container
.row
.col-md-12
.page-header
%h2 Upcoming Conferences
- @current.each do |conference|
= render '/conferences/conference_details', conference: conference
- if @antiquated and @antiquated.any?
.row
.col-md-12
%p.text-right
%button{ type: 'button', class: 'btn btn-link btn-sm', 'data-toggle' => 'collapse', 'data-target' => '#antiquated', 'aria-expanded' => 'true', 'aria-controls' => 'antiquated'}
Older conferences
%span.notranslate
= "(#{@antiquated.count})"
%i.fa-solid.fa-chevron-right
%i.fa-solid.fa-chevron-down{ style: 'display: none' }
#antiquated.collapse
- @antiquated.each do |conference|
= render '/conferences/conference_details', conference: conference
%p
Add the events to your calendar:
%span.btn-group
= link_to("Days only", calendar_url(protocol: 'webcal', format: 'ics'), class: 'btn btn-default')
= link_to("Detailed", calendar_url(protocol: 'webcal', format: 'ics', full: true), class: 'btn btn-default')
%p
Subscribe to the RSS feed:
= link_to("RSS Feed", feed_url(format: :rss), class: 'btn btn-default')
-content_for :script_body do
:javascript
$('#antiquated').on('hidden.bs.collapse', function () {
$( ".fa-chevron-down" ).hide();
$( ".fa-chevron-right" ).show();
})
$('#antiquated').on('shown.bs.collapse', function () {
$( ".fa-chevron-down" ).show();
$( ".fa-chevron-right" ).hide();
})