From 9ff19d7c2839b33b6a3f4dba62c85dc6c7c833e4 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=UTF-8 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 --- .../bootstrap/en/modules/opac-shelves-rss.tt | 18 ++++++++++++++++++ .../opac-tmpl/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 0000000..fe97142 --- /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 da28e97..ef2a32b 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 4231926..d22529f 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 ), -- 1.7.10.4