[% END %]
<li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form" tabindex="-1" role="menuitem" class="listmenulink">New list</a></li>
[% ELSE %]
- [% IF Koha.Preference('casAuthentication') %]
- [%# CAS authentication is too complicated for modal window %]
- <li role="presentation"><a href="/cgi-bin/koha/opac-user.pl" tabindex="-1" class="menu-inactive" role="menuitem">Log in to create your own lists</a></li>
- [% ELSE %]
- <li role="presentation"><a href="/cgi-bin/koha/opac-user.pl" tabindex="-1" class="menu-inactive loginModal-trigger" role="menuitem">Log in to create your own lists</a></li>
- [% END %]
+ <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form" tabindex="-1" class="menu-inactive" role="menuitem">Log in to create your own lists</a></li>
[% END # / IF loggedinusername %]
[% END # / IF opacuserlogin %]
</ul> <!-- / .dropdown-menu -->
<div id="toolbar" class="toolbar"><a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-plus"></i> New list</a></div>
[% ELSE %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
- <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
+ <div class="alert alert-info"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form">Log in to create a new list</a></div>
[% END %]
[% END %]
</div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
[% ELSIF NOT loggedinusernumber %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
- <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
+ <div class="alert alert-info"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form">Log in to create a new list</a></div>
[% END %]
[% END # IF loggedinusername %]
</div> <!-- / #usershelves -->
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 );