View | Details | Raw Unified | Return to bug 24249
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-6 / +1 lines)
Lines 68-79 Link Here
68
                                        [% END %]
68
                                        [% END %]
69
                                            <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form" tabindex="-1" role="menuitem" class="listmenulink">New list</a></li>
69
                                            <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form" tabindex="-1" role="menuitem" class="listmenulink">New list</a></li>
70
                                    [% ELSE %]
70
                                    [% ELSE %]
71
                                        [% IF Koha.Preference('casAuthentication') %]
71
                                        <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>
72
                                            [%# CAS authentication is too complicated for modal window %]
73
                                            <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>
74
                                        [% ELSE %]
75
                                            <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>
76
                                        [% END %]
77
                                    [% END # / IF loggedinusername %]
72
                                    [% END # / IF loggedinusername %]
78
                                [% END # / IF opacuserlogin %]
73
                                [% END # / IF opacuserlogin %]
79
                                </ul> <!-- / .dropdown-menu -->
74
                                </ul> <!-- / .dropdown-menu -->
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-2 / +2 lines)
Lines 638-644 Link Here
638
                                <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>
638
                                <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>
639
                            [% ELSE %]
639
                            [% ELSE %]
640
                                [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
640
                                [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
641
                                    <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
641
                                    <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>
642
                                [% END %]
642
                                [% END %]
643
                            [% END %]
643
                            [% END %]
644
644
Lines 713-719 Link Here
713
                            </div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
713
                            </div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
714
                        [% ELSIF NOT loggedinusernumber %]
714
                        [% ELSIF NOT loggedinusernumber %]
715
                            [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
715
                            [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
716
                                <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
716
                                <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>
717
                            [% END %]
717
                            [% END %]
718
                        [% END  # IF loggedinusername %]
718
                        [% END  # IF loggedinusername %]
719
                </div> <!-- / #usershelves -->
719
                </div> <!-- / #usershelves -->
(-)a/opac/opac-shelves.pl (-9 / +19 lines)
Lines 50-63 if ( ! C4::Context->preference('virtualshelves') ) { Link Here
50
    exit;
50
    exit;
51
}
51
}
52
52
53
my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
53
my $op = $query->param('op') || 'list';
54
        template_name   => $template_name,
54
my ( $template, $loggedinuser, $cookie );
55
        query           => $query,
55
56
        type            => "opac",
56
if( $op eq 'view' || $op eq 'list' ){
57
        authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
57
    ( $template, $loggedinuser, $cookie ) = get_template_and_user({
58
    });
58
            template_name   => $template_name,
59
59
            query           => $query,
60
my $op       = $query->param('op')       || 'list';
60
            type            => "opac",
61
            authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
62
        });
63
} else {
64
    ( $template, $loggedinuser, $cookie ) = get_template_and_user({
65
            template_name   => $template_name,
66
            query           => $query,
67
            type            => "opac",
68
            authnotrequired => 0,
69
        });
70
}
71
61
my $referer  = $query->param('referer')  || $op;
72
my $referer  = $query->param('referer')  || $op;
62
my $category = $query->param('category') || 1;
73
my $category = $query->param('category') || 1;
63
my ( $shelf, $shelfnumber, @messages );
74
my ( $shelf, $shelfnumber, @messages );
64
- 

Return to bug 24249