Bugzilla – Attachment 26584 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: Follow-up for bootstrap theme
Bug-9032-Follow-up-for-bootstrap-theme.patch (text/plain), 13.12 KB, created by
Jonathan Druart
on 2014-03-26 14:52:59 UTC
(
hide
)
Description:
Bug 9032: Follow-up for bootstrap theme
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-03-26 14:52:59 UTC
Size:
13.12 KB
patch
obsolete
>From aa7253cd8af860cd5716103b3aba337b1df4f3fc Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 6 Mar 2014 11:44:15 +0100 >Subject: [PATCH] Bug 9032: Follow-up for bootstrap theme > >Adds new template opac-shareshelf.tt. >Modifies template opac-shelves.tt: Share button, Remove Share button, label >"Your lists" instead of "Your private lists", list category Shared. > >Test plan: >Verify if the Share a list-features work in bootstrap by: >[1] Switch to bootstrap. Go to Lists. >[2] Share one of your private lists. >[3] Login as another user and accept the invitation. >[4] Remove the share again. >[5] Check if Share and Remove share do not popup for public lists. > >Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > .../bootstrap/en/modules/opac-shareshelf.tt | 90 ++++++++++++++++++++ > .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 31 +++++-- > 2 files changed, 116 insertions(+), 5 deletions(-) > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt >new file mode 100644 >index 0000000..433b17a >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt >@@ -0,0 +1,90 @@ >+[% USE Koha %] >+[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Share a list >+[% INCLUDE 'doc-head-close.inc' %] >+[% BLOCK cssinclude %][% END %] >+</head> >+ >+<body id="opac-shareshelf" class="scrollto"> >+[% INCLUDE 'masthead.inc' %] >+<div class="main"> >+ <ul class="breadcrumb"> >+ <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >+ [% IF ( loggedinusername ) %] >+ <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">›</span></li> >+ [% END %] >+ <li>Share a list</li> >+ </ul> <!-- / .breadcrumb --> >+ >+ <div class="container-fluid"> >+ <div class="row-fluid"> >+ [% IF ( OpacNav ) %] >+ <div class="span2"> >+ <div id="navigation"> >+ [% INCLUDE 'navigation.inc' IsPatronPage=1 %] >+ </div> >+ </div> >+ [% END %] >+ >+[%# This section contains the essential code for error messages and three operations: invite, confirm_invite and accept. %] >+ <h2>Share a list with another patron</h2> >+ <div class="span10"> >+ <div id="shareshelf" class="maincontent"> >+ >+ [% IF errcode %] >+ [% IF errcode==1 && op %]<div class="alert">The operation [% op %] is not supported.</div>[% END %] >+ [% IF errcode==1 && !op %]<div class="alert">No operation parameter has been passed.</div>[% END %] >+ [% IF errcode==2 %]<div class="alert">Invalid shelf number.</div>[% END %] >+ [% IF errcode==3 %]<div class="alert">The feature of sharing lists is not in use in this library.</div>[% END %] >+ [% IF errcode==4 %]<div class="alert">You can only share a list if you are the owner.</div>[% END %] >+ [% IF errcode==5 %]<div class="alert">You cannot share a public list.</div>[% END %] >+ [% IF errcode==6 %]<div class="alert">Sorry, but you did not enter any valid email address.</div>[% END %] >+ [% IF errcode==7 %]<div class="alert">Sorry, but we could not accept this key. The invitation may have expired. Contact the patron who sent you the invitation.</div>[% END %] >+ [% IF errcode==8 %]<div class="alert">As owner of a list you cannot accept an invitation for sharing it.</div>[% END %] >+ >+ [% ELSIF op=='invite' %] >+ <div id="invite"> >+ <form method="post" onsubmit="return $('#invite_address').val().trim()!='';"> >+ <fieldset class="rows"> >+ <ol> >+ <input type="hidden" name="op" value="conf_invite"/> >+ <input type="hidden" name="shelfnumber" value="[% shelfnumber %]"/> >+ <li><label for="name">List name:</label> [% shelfname %]</li> >+ <li> >+ <label for="invite_address">Email address:</label> >+ <input id="invite_address" name="invite_address"/> >+ </li> >+ </ol> >+ </fieldset> >+ <fieldset class="action"> >+ <input type="submit" value="Send" class="btn" /> >+ </fieldset> >+ </form> >+ </div> >+ >+ [% ELSIF op=='conf_invite' %] >+ <div id="conf_invite"> >+ [% IF approvedaddress %] >+ <p>An invitation to share list <i>[% shelfname %]</i> has been sent to [% approvedaddress %].</p> >+ [% END %] >+ [% IF failaddress %] >+ <p>Something went wrong while processing the following addresses. Please check them. These are: [% failaddress %]</p> >+ [% END %] >+ [% IF approvedaddress %] >+ <p>You will receive an email notification if someone accepts your share within two weeks.</p> >+ [% END %] >+ <p><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Return to your lists</a></p> >+ </div> >+ >+ [% ELSIF op=='accept' %] >+ [%# Nothing to do: we already display an error or we redirect. %] >+ [% END %] >+ >+ </div> <!-- / .span10 --> >+ </div> <!-- / .maincontent --> >+[%# End of essential part %] >+ >+ </div> <!-- / .row-fluid --> >+ </div> <!-- / .container-fluid --> >+</div> <!-- / .main --> >+[% INCLUDE 'opac-bottom.inc' %] >+[% BLOCK jsinclude %][% 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 eb9f65b..d5ce5d7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -33,6 +33,13 @@ > <span>anyone to remove other contributed entries.</span> > </li> > [% END %] >+[% BLOCK remove_share %] >+ [%# Use: add parameter shelfnumber and add end form tag %] >+ <form action="opac-shelves.pl" method="post" class="form-inline"> >+ <input type="hidden" name="shelves" value="1" /> >+ <input type="hidden" name="display" value="privateshelves" /> >+ <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" /> >+[% END %] > > [% INCLUDE 'masthead.inc' %] > <div class="main"> >@@ -173,6 +180,13 @@ > [% END %] > <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/> > </form> >+ [% IF showprivateshelves && Koha.Preference('OpacAllowSharingPrivateLists') %] >+ <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelfnumber %]" class="">Share list</a> >+ [% END %] >+ [% ELSIF showprivateshelves # not manageshelf and private means shared %] >+ [% INCLUDE remove_share %] >+ <input type="hidden" name="REMSHR-[% shelfnumber %]" value="1" /> >+ </form> > [% END # / IF manageshelf %] > </div> > >@@ -584,9 +598,9 @@ > <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> > [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] > [% IF ( showprivateshelves ) %] >- <li id="privateshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your private lists</a></li> >+ <li id="privateshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your lists</a></li> > [% ELSE %] >- <li id="privateshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your private lists</a></li> >+ <li id="privateshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your lists</a></li> > [% END %] > [% END %] > [% IF ( showpublicshelves ) %] >@@ -618,8 +632,7 @@ > <td><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves&viewshelf=[% shelveslooppri.shelf %]&sortfield=[% shelveslooppri.sortfield %]">[% shelveslooppri.shelfname |html %]</a></td> > <td>[% IF ( shelveslooppri.count ) %][% shelveslooppri.count %] [% IF ( shelveslooppri.single ) %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td> > <td> >- [% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %] >- [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %] >+ [% IF ( shelveslooppri.viewcategory1 ) %][% IF !shelveslooppri.shares %]Private[% ELSE %]Shared[% END %][% END %] > </td> > <td> > [% IF ( shelveslooppri.mine ) %] >@@ -641,6 +654,14 @@ > <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" /> > [% END %] > </form> >+ [% IF Koha.Preference('OpacAllowSharingPrivateLists') %] >+ <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelveslooppri.shelf %]" class="">Share</a> >+ [% END %] >+ [% ELSE # not shelveslooppri.mine, so shared %] >+ [% INCLUDE remove_share # if pref is off, you should still be able to remove shares %] >+ <input type="hidden" name="shelfoff" value="[% shelfoff %]" /> >+ <input type="hidden" name="REMSHR-[% shelveslooppri.shelf %]" value="1" /> >+ </form> > [% END %] > </td> > </tr> >@@ -685,7 +706,6 @@ > <td><a class="title" href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelvesloo.shelf %]&sortfield=[% shelvesloo.sortfield %]">[% shelvesloo.shelfname |html %]</a></td> > <td>[% shelvesloo.count %] [% IF ( shelvesloo.single ) %]item[% ELSE %]item(s)[% END %]</td> > <td> >- [% IF ( shelvesloo.viewcategory1 ) %]Private[% END %] > [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %] > </td> > <td> >@@ -787,6 +807,7 @@ > var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?"); > var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?"); > var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?"); >+var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?"); > > [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %] > function holdSelections() { >-- >1.7.10.4
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