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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (+9 lines)
Lines 713-718 Link Here
713
                                                    [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
713
                                                    [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
714
                                                        <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber | uri %]" class="sharelist btn btn-link"><i class="fa fa-share" aria-hidden="true"></i> Share</a>
714
                                                        <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber | uri %]" class="sharelist btn btn-link"><i class="fa fa-share" aria-hidden="true"></i> Share</a>
715
                                                    [% END %]
715
                                                    [% END %]
716
                                                    [% IF s.is_shared AND s.can_be_managed( loggedinusernumber ) %]
717
                                                        <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
718
                                                            <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
719
                                                            <input type="hidden" name="public" value="0" />
720
                                                            <input type="hidden" name="op" value="transfer" />
721
                                                            <input type="hidden" name="referer" value="list" />
722
                                                            <button type="submit" class="btn btn-link transfershelf"> Transfer</button>
723
                                                        </form>
724
                                                    [% END %]
716
                                                    [% IF s.is_shared_with( loggedinusernumber ) %]
725
                                                    [% IF s.is_shared_with( loggedinusernumber ) %]
717
                                                        <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
726
                                                        <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
718
                                                            <input type="hidden" name="op" value="remove_share" />
727
                                                            <input type="hidden" name="op" value="remove_share" />
(-)a/opac/opac-shelves.pl (-4 / +6 lines)
Lines 89-94 $public = 1 if $query->param('public') && $query->param('public') == 1; Link Here
89
89
90
my ( $shelf, $shelfnumber, @messages );
90
my ( $shelf, $shelfnumber, @messages );
91
91
92
# PART 1: Perform a few actions
92
if ( $op eq 'add_form' ) {
93
if ( $op eq 'add_form' ) {
93
    # Only pass default
94
    # Only pass default
94
    $shelf = { allow_change_from_owner => 1 };
95
    $shelf = { allow_change_from_owner => 1 };
Lines 255-262 if ( $op eq 'add_form' ) { Link Here
255
        push @messages, { type => 'error', code => 'does_not_exist' };
256
        push @messages, { type => 'error', code => 'does_not_exist' };
256
    }
257
    }
257
    $op = 'view';
258
    $op = 'view';
259
} elsif( $op eq 'transfer' ) {
260
    $op = 'list'; # TODO
258
}
261
}
259
262
263
# PART 2: After a possible action, view one list or show a number of lists
260
if ( $op eq 'view' ) {
264
if ( $op eq 'view' ) {
261
    $shelfnumber ||= $query->param('shelfnumber');
265
    $shelfnumber ||= $query->param('shelfnumber');
262
    $shelf = Koha::Virtualshelves->find($shelfnumber);
266
    $shelf = Koha::Virtualshelves->find($shelfnumber);
Lines 424-432 if ( $op eq 'view' ) { Link Here
424
    } else {
428
    } else {
425
        push @messages, { type => 'error', code => 'does_not_exist' };
429
        push @messages, { type => 'error', code => 'does_not_exist' };
426
    }
430
    }
427
}
431
} elsif ( $op eq 'list' ) {
428
429
if ( $op eq 'list' ) {
430
    my $shelves;
432
    my $shelves;
431
    my ( $page, $rows ) = ( $query->param('page') || 1, 20 );
433
    my ( $page, $rows ) = ( $query->param('page') || 1, 20 );
432
    if ( !$public ) {
434
    if ( !$public ) {
Lines 444-449 if ( $op eq 'list' ) { Link Here
444
        ),
446
        ),
445
    );
447
    );
446
}
448
}
449
447
my $staffuser;
450
my $staffuser;
448
$staffuser = Koha::Patrons->find( $loggedinuser )->can_patron_change_staff_only_lists if $loggedinuser;
451
$staffuser = Koha::Patrons->find( $loggedinuser )->can_patron_change_staff_only_lists if $loggedinuser;
449
$template->param(
452
$template->param(
450
- 

Return to bug 25498