@@ -, +, @@
login-dependent operations
- Click the "Log in to create a new list" link.
- Log in.
- You should be taken to the "Create a new list" form.
- Also test the "New list" link shown in the toolbar when you're
viewing the contents of a list.
- When not logged in click the "Lists" menu in the page's header menu.
Clicking "Log in to create a new list" should take you to the login
form and then to the list creation form.
---
.../opac-tmpl/bootstrap/en/includes/masthead.inc | 7 +-----
.../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 4 ++--
opac/opac-shelves.pl | 27 +++++++++++++++-------
3 files changed, 22 insertions(+), 16 deletions(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
@@ -68,12 +68,7 @@
[% END %]
[% ELSE %]
- [% IF Koha.Preference('casAuthentication') %]
- [%# CAS authentication is too complicated for modal window %]
-
- [% ELSE %]
-
- [% END %]
+
[% END # / IF loggedinusername %]
[% END # / IF opacuserlogin %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
@@ -638,7 +638,7 @@
[% ELSE %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
-
+
[% END %]
[% END %]
@@ -713,7 +713,7 @@
[%# %]
[% ELSIF NOT loggedinusernumber %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
-
+
[% END %]
[% END # IF loggedinusername %]
--- a/opac/opac-shelves.pl
+++ a/opac/opac-shelves.pl
@@ -50,14 +50,25 @@ if ( ! C4::Context->preference('virtualshelves') ) {
exit;
}
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
- template_name => $template_name,
- query => $query,
- type => "opac",
- authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
- });
-
-my $op = $query->param('op') || 'list';
+my $op = $query->param('op') || 'list';
+my ( $template, $loggedinuser, $cookie );
+
+if( $op eq 'view' || $op eq 'list' ){
+ ( $template, $loggedinuser, $cookie ) = get_template_and_user({
+ template_name => $template_name,
+ query => $query,
+ type => "opac",
+ authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
+ });
+} else {
+ ( $template, $loggedinuser, $cookie ) = get_template_and_user({
+ template_name => $template_name,
+ query => $query,
+ type => "opac",
+ authnotrequired => 0,
+ });
+}
+
my $referer = $query->param('referer') || $op;
my $category = $query->param('category') || 1;
my ( $shelf, $shelfnumber, @messages );
--