From d90b6d2ba26b3917aadfb286883de2095e68f812 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 17 Apr 2015 14:02:15 -0400 Subject: [PATCH] Bug 1917 - Add RSS Feeds for Lists MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Test Plan: 1) Apply this patch 2) Create one or more public lists 3) View the list in the opac 4) Note the new RSS icon next to the list name 5) Open the link in FireFox or an RSS reader 6) You should see an RSS feed of your list with the title and author of each item as a hyperlink to the record details Signed-off-by: Nicole Engard Followed test plan. Works as expected. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../bootstrap/en/modules/opac-shelves-rss.tt | 18 ++++++++++++++++++ .../bootstrap/en/modules/opac-shelves.tt | 8 +++++++- opac/opac-shelves.pl | 4 +++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves-rss.tt diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves-rss.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves-rss.tt new file mode 100644 index 0000000000..fe9714278f --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves-rss.tt @@ -0,0 +1,18 @@ + + + + + + [% shelfname %] + [% OPACBaseURL %]/cgi-bin/koha/opac-shelves.pl?rss=1&viewshelf=[% shelfnumber | html %] + RSS feed for public list [% shelfname | html %] + +[% FOREACH i IN itemsloop %] + + [% i.title %] by [% i.author %] + [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% i.biblionumber %] + +[% END %] + + + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index da28e97d02..ef2a32b624 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -151,7 +151,13 @@ [% END # / IF paramsloop %] [% IF ( viewshelf ) %] -

[% shelfname |html %]

+

+ [% shelfname |html %] + + Subscribe to this search + +

+ [% IF ( itemsloop ) %]
diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index 4231926c62..d22529f30e 100755 --- a/opac/opac-shelves.pl +++ b/opac/opac-shelves.pl @@ -25,8 +25,10 @@ use C4::Auth; my $query = CGI->new(); +my $template_name = $query->param('rss') ? "opac-shelves-rss.tt" : "opac-shelves.tt"; + my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ - template_name => "opac-shelves.tt", + template_name => $template_name, query => $query, type => "opac", authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ), -- 2.39.5