Bug 7636 - error when trying to email cart when opacuserlogin set to don't allow

This patch hides the "send cart" link if the opacuserlogin
preference is set to disallow. Other similar changes included:

- hide the "send list" link
- hide the "your lists" tab
- hide the "log in to create your own lists" link
- hide the "recent comments" link

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Tested with opacuserlogin set to both "Allow" and "Don't allow." With
opacuserlogin set to "Allow," the links showed up, and with opacuserlogin
set to "Don't allow," the links did not.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
Owen Leonard 2012-03-01 15:06:25 -05:00 committed by Jared Camins-Esakov
parent 96b41d4fbf
commit 6095d3cb83
3 changed files with 8 additions and 6 deletions

View File

@ -112,7 +112,7 @@
<a href="/cgi-bin/koha/opac-search.pl">Advanced Search</a>
[% IF ( OpacBrowser ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-browser.pl">Browse by Hierarchy</a>[% END %]
[% IF ( OpacAuthorities ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-authorities-home.pl">Browse by author or subject</a>[% END %]
[% IF ( OpacShowRecentComments ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-showreviews.pl">Recent Comments</a>[% END %]
[% IF ( opacuserlogin && reviewson && OpacShowRecentComments ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-showreviews.pl">Recent Comments</a>[% END %]
[% IF ( TagsEnabled ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-tags.pl">Tag Cloud</a>[% END %]
[% IF ( OpacCloud ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-tags_subject.pl">Subject Cloud</a>[% END %]
[% IF ( OpacTopissue ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-topissues.pl">Most Popular</a>[% END %]

View File

@ -124,7 +124,7 @@ function tagAdded() {
<div id="toolbar">
<ul>
<li>[% IF ( verbose ) %]<a href="opac-basket.pl" class="brief" onclick="showLess(); return false;">Brief Display</a>[% ELSE %]<a href="opac-basket.pl" class="detail" onclick="showMore(); return false;">More Details</a>[% END %]</li>
<li><a class="send" href="opac-basket.pl" onclick="sendBasket(); return false;">Send</a></li>
[% IF ( opacuserlogin ) %]<li><a class="send" href="opac-basket.pl" onclick="sendBasket(); return false;">Send</a></li>[% END %]
<li><a class="download" href="opac-basket.pl" onclick="downloadBasket(); return false;">Download</a></li>
<li><a class="print" href="opac-basket.pl" onclick="printBasket(); return false;">Print</a></li>
<li><a class="empty" href="opac-basket.pl" onclick="delBasket(); return false;">Empty and Close</a></li>

View File

@ -205,7 +205,7 @@ $(function() {
<a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfid=[% shelfnumber %]" class="download tag_hides" onclick="open(CGIBIN+'opac-downloadshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false;">Download List</a>
<span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber %]" class="send tag_hides" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send List</a></span>
[% IF ( opacuserlogin ) %]<span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber %]" class="send tag_hides" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send List</a></span>[% END %]
<a class="print tag_hides" href="opac-shelves.pl" onclick="print(); return false;">Print List</a>
@ -352,7 +352,7 @@ $(function() {
</div>
[% IF ( pagination_bar ) %]<div class="pages">[% pagination_bar %]</div>[% END %]
[% ELSE %]
<div class="dialog message">This List is empty. You can add to your lists from the results of any <a href="opac-main.pl">search</a>!</div>
<div class="dialog message">This List is empty. [% IF ( opacuserlogin ) %]You can add to your lists from the results of any <a href="opac-main.pl">search</a>![% END %]</div>
[% END %]<!-- /itemsloop -->
[% END %]<!-- /viewshelf -->
@ -410,11 +410,13 @@ $(function() {
[% UNLESS ( shelves ) %]
<h2>Lists</h2>
<ul class="link-tabs">
[% IF ( opacuserlogin ) %]
[% IF ( showprivateshelves ) %]
<li id="privateshelves_tab" class="on"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your private lists</a></li>
[% ELSE %]
<li id="privateshelves_tab" class="off"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your private lists</a></li>
[% END %]
[% END %]
[% IF ( showpublicshelves ) %]
<li id="publicshelves_tab" class="on"><a href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves">Public lists</a></li>
[% ELSE %]
@ -483,7 +485,7 @@ $(function() {
[% END %]<!-- /shelveslooppriv -->
[% END %]<!-- /showprivateshelves -->
[% ELSE %]<!-- /loggedinusername -->
<div><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new Lists.</div>
[% IF ( opacuserlogin ) %]<div><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new Lists.</div>[% END %]
[% END %]<!-- /loggedinusername -->
@ -497,7 +499,7 @@ $(function() {
[% IF ( loggedinusername ) %]
<div id="toolbar"> <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?shelves=1">New List</a></div>
[% ELSE %]
<div><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new Lists.</div>
[% IF ( opacuserlogin ) %]<div><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new Lists.</div>[% END %]
[% END %]
[% IF ( shelvesloop ) %]
<table>