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

(-)a/C4/VirtualShelves/Page.pm (-8 / +10 lines)
Lines 57-62 sub shelfpage ($$$$$) { Link Here
57
    $query            or die "No query";
57
    $query            or die "No query";
58
    $template         or die "No template";
58
    $template         or die "No template";
59
    $template->param( { loggedinuser => $loggedinuser } );
59
    $template->param( { loggedinuser => $loggedinuser } );
60
    my $edit;
61
    my $shelves;
60
    my @paramsloop;
62
    my @paramsloop;
61
    my $totitems;
63
    my $totitems;
62
    my $shelfoff    = ( $query->param('shelfoff') ? $query->param('shelfoff') : 1 );
64
    my $shelfoff    = ( $query->param('shelfoff') ? $query->param('shelfoff') : 1 );
Lines 163-168 sub shelfpage ($$$$$) { Link Here
163
                my ( $shelfnumber2, $shelfname, $owner, $category, $sortfield ) = GetShelf($shelfnumber);
165
                my ( $shelfnumber2, $shelfname, $owner, $category, $sortfield ) = GetShelf($shelfnumber);
164
                my $member = GetMember( 'borrowernumber' => $owner );
166
                my $member = GetMember( 'borrowernumber' => $owner );
165
                my $ownername = defined($member) ? $member->{firstname} . " " . $member->{surname} : '';
167
                my $ownername = defined($member) ? $member->{firstname} . " " . $member->{surname} : '';
168
                $edit = 1;
166
                $template->param(
169
                $template->param(
167
                    edit                => 1,
170
                    edit                => 1,
168
                    shelfnumber         => $shelfnumber2,
171
                    shelfnumber         => $shelfnumber2,
Lines 312-318 sub shelfpage ($$$$$) { Link Here
312
                $stay = 0;
315
                $stay = 0;
313
            }
316
            }
314
            $showadd = 1;
317
            $showadd = 1;
315
            $stay and $template->param( shelves => 1 );
318
            $stay and $template->param( shelves => 1 ) and $shelves = 1;
316
            last SWITCH;
319
            last SWITCH;
317
        }
320
        }
318
    }
321
    }
Lines 359-365 sub shelfpage ($$$$$) { Link Here
359
        $qhash{$_} = $query->param($_) if $query->param($_);
362
        $qhash{$_} = $query->param($_) if $query->param($_);
360
    }
363
    }
361
    ( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash;
364
    ( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash;
362
    if ( $query->param('viewshelf') ) {
365
    if ( $shelfnumber ) {
363
        $template->param( { pagination_bar => pagination_bar( $url, ( int( $totitems / $shelflimit ) ) + ( ( $totitems % $shelflimit ) > 0 ? 1 : 0 ), $itemoff, "itemoff" ) } );
366
        $template->param( { pagination_bar => pagination_bar( $url, ( int( $totitems / $shelflimit ) ) + ( ( $totitems % $shelflimit ) > 0 ? 1 : 0 ), $itemoff, "itemoff" ) } );
364
    } else {
367
    } else {
365
        $template->param(
368
        $template->param(
Lines 373-385 sub shelfpage ($$$$$) { Link Here
373
        "BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1,
376
        "BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1,
374
        csv_profiles                                                       => GetCsvProfilesLoop()
377
        csv_profiles                                                       => GetCsvProfilesLoop()
375
    );
378
    );
376
    if (   $template->param('viewshelf')
379
    if (   $shelfnumber
377
        or $template->param('shelves')
380
        or $shelves
378
        or $template->param('edit') ) {
381
        or $edit ) {
379
        $template->param( vseflag => 1 );
382
        $template->param( vseflag => 1 );
380
    }
383
    }
381
    if ($template->param('shelves') or    # note: this part looks duplicative, but is intentional
384
    if ($shelves or    # note: this part looks duplicative, but is intentional
382
        $template->param('edit')
385
        $edit
383
      ) {
386
      ) {
384
        $template->param( seflag => 1 );
387
        $template->param( seflag => 1 );
385
    }
388
    }
386
- 

Return to bug 6155