Bugzilla – Attachment 18260 Details for
Bug 9032
Share a list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9032: Share a list: OPAC foundation
Bug-9032-Share-a-list-OPAC-foundation.patch (text/plain), 4.78 KB, created by
Marcel de Rooy
on 2013-05-20 16:15:11 UTC
(
hide
)
Description:
Bug 9032: Share a list: OPAC foundation
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-05-20 16:15:11 UTC
Size:
4.78 KB
patch
obsolete
>From ba3a392714f71a2083d45ec1274089bc53d211b8 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 20 May 2013 17:57:39 +0200 >Subject: [PATCH] Bug 9032: Share a list: OPAC foundation >Content-Type: text/plain; charset=utf-8 > >Adds a Share button for OPAC private lists >Adds template and script for further development > >Test plan: >Toggle the pref OpacAllowSharingPrivateList. >If enabled, you should see the Share button in OPAC/Private lists. >Click on the Share button. You should get Share a list. >Logout and try to go back to opac/opac-shareshelf.pl >It should now present you the login form. >--- > .../opac-tmpl/prog/en/modules/opac-shareshelf.tt | 28 ++++++++++++ > .../opac-tmpl/prog/en/modules/opac-shelves.tt | 7 +++ > opac/opac-shareshelf.pl | 45 ++++++++++++++++++++ > 3 files changed, 80 insertions(+), 0 deletions(-) > create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/opac-shareshelf.tt > create mode 100755 opac/opac-shareshelf.pl > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shareshelf.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shareshelf.tt >new file mode 100644 >index 0000000..7d3f817 >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shareshelf.tt >@@ -0,0 +1,28 @@ >+[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Share a list >+[% INCLUDE 'doc-head-close.inc' %] >+</head> >+<body id="opac-shareshelf"> >+<div id="doc3" class="yui-t1"> >+<div id="bd"> >+[% INCLUDE 'masthead.inc' %] >+ >+<div id="yui-main"> >+ <div class="yui-b"><div class="yui-g"> >+ <h1>Share a list</h1> >+ <p>Here follows the stuff for shelfnumber [% shelfnumber %]</p> >+</div> >+</div> >+</div> >+ >+ >+[% IF ( OpacNav ) %] >+ <div class="yui-b"> >+ <div id="opacnav" class="container"> >+ [% INCLUDE 'navigation.inc' %] >+ </div> >+ </div> >+[% END %] >+ >+</div> >+</div> >+[% INCLUDE 'opac-bottom.inc' %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >index 66ff9bc..dbb9b87 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >@@ -1,3 +1,4 @@ >+[% USE Koha %] > [% SET TagsShowEnabled = ( TagsEnabled && TagsShowOnList ) %] > [% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnList ) %] > >@@ -629,7 +630,13 @@ $(document).ready(function() { > [% ELSE %] > <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" /> > [% END %] >+ </form> >+ [% IF Koha.Preference('OpacAllowSharingPrivateLists') %] >+ <form action="opac-shareshelf.pl" method="post"> >+ <input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf %]" /> >+ <input type="submit" class="Share" value="Share" /> > </form> >+ [% END %] > [% END %] > </td> > </tr> >diff --git a/opac/opac-shareshelf.pl b/opac/opac-shareshelf.pl >new file mode 100755 >index 0000000..914fcad >--- /dev/null >+++ b/opac/opac-shareshelf.pl >@@ -0,0 +1,45 @@ >+#!/usr/bin/perl >+ >+# Copyright 2013 Rijksmuseum >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 2 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+use strict; >+use warnings; >+ >+use CGI; >+ >+use C4::Auth; >+use C4::Output; >+use C4::VirtualShelves; >+ >+my $query= new CGI; >+my $shelfno= $query->param('shelfnumber')||0; >+ >+my ($template, $loggedinuser, $cookie)= get_template_and_user({ >+ template_name => "opac-shareshelf.tmpl", >+ query => $query, >+ type => "opac", >+ authnotrequired => 0, #should be a user >+}); >+ >+#TODO Check: pref value OpacAllowSharingPrivateList >+#TODO Check: only owner can share a list >+ >+$template->param( >+ shelfnumber => $shelfno, >+); >+output_html_with_http_headers $query, $cookie, $template->output; >-- >1.7.7.6
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 9032
:
18260
|
18542
|
18543
|
18546
|
18547
|
18587
|
18619
|
18682
|
18692
|
19377
|
19378
|
19379
|
19394
|
19934
|
19935
|
25847
|
25848
|
25849
|
25850
|
25851
|
25852
|
25853
|
25862
|
25886
|
25893
|
26253
|
26291
|
26292
|
26293
|
26294
|
26295
|
26296
|
26297
|
26298
|
26299
|
26300
|
26302
|
26303
|
26351
|
26458
|
26509
|
26513
|
26577
|
26578
|
26579
|
26580
|
26581
|
26582
|
26583
|
26584
|
26585
|
26586
|
26587
|
26588