From 75ef22ddf1932f506f19bf2cd234afb3749efa35 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 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 --- .../bootstrap/en/modules/opac-shelves-rss.tt | 21 ++++++++++++++++++++ .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 8 ++++++- opac/opac-shelves.pl | 4 ++- 3 files changed, 31 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..ae2fc04 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves-rss.tt @@ -0,0 +1,21 @@ + + + + + + + + [% 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 fe13b7d..e3410e2 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.2.5