Bugzilla – Attachment 38105 Details for
Bug 1917
Add RSS Feeds for Lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 1917 - Add RSS Feeds for Lists
Bug-1917---Add-RSS-Feeds-for-Lists.patch (text/plain), 3.38 KB, created by
Kyle M Hall (khall)
on 2015-04-17 18:08:25 UTC
(
hide
)
Description:
Bug 1917 - Add RSS Feeds for Lists
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-04-17 18:08:25 UTC
Size:
3.38 KB
patch
obsolete
>From 44376fadba6dd208206a7c60d10c4b39981b5441 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >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 | 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 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+ >+<rss version="2.0"> >+ >+<channel> >+ <title>[% shelfname %]</title> >+ <link>[% OPACBaseURL %]/cgi-bin/koha/opac-shelves.pl?rss=1&viewshelf=[% shelfnumber | html %]</link> >+ <description>RSS feed for public list [% shelfname | html %]</description> >+ >+[% FOREACH i IN itemsloop %] >+ <item> >+ <title>[% i.title %] by [% i.author %]</title> >+ <link>[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% i.biblionumber %]</link> >+ </item> >+[% END %] >+ >+</channel> >+</rss> >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 ) %]<!-- Viewing a particular shelf --> >- <h3>[% shelfname |html %]</h3> >+ <h3> >+ [% shelfname |html %] >+ <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-shelves.pl?rss=1&viewshelf=[% shelfnumber | html %]" class="rss-list-link noprint"> >+ <img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" border="0" class="rsssearchicon"/> >+ </a> >+ </h3> >+ > [% IF ( itemsloop ) %] > <div id="toolbar" class="toolbar clearfix"> > <div class="list-actions"> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 1917
:
38104
|
38105
|
38106
|
38117
|
38199
|
38200
|
38201
|
38218
|
38219
|
38263
|
38325
|
38332
|
38333
|
38334
|
38335