@@ -, +, @@ results of the page you are viewing --- C4/VirtualShelves/Page.pm | 15 +++++++++------ koha-tmpl/intranet-tmpl/prog/en/css/print.css | 2 +- .../prog/en/includes/virtualshelves-toolbar.inc | 6 +----- .../prog/en/modules/virtualshelves/shelves.tt | 14 ++++++++++++-- virtualshelves/shelves.pl | 1 + 5 files changed, 24 insertions(+), 14 deletions(-) --- a/C4/VirtualShelves/Page.pm +++ a/C4/VirtualShelves/Page.pm @@ -76,12 +76,14 @@ sub shelfpage { my ( $shelflimit, $shelfoffset, $shelveslimit, $shelvesoffset ); my $marcflavour = C4::Context->preference("marcflavour"); - $shelflimit = ( $type eq 'opac' ? C4::Context->preference('OPACnumSearchResults') : C4::Context->preference('numSearchResults') ); - $shelflimit = $shelflimit || ShelvesMax('MGRPAGE'); - $shelflimit = undef if $query->param('rss'); - $shelfoffset = ( $itemoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving items at - $shelveslimit = $shelflimit; # Limits number of shelves returned for a given query (row_count) - $shelvesoffset = ( $shelfoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving shelves at (offset) + unless ( $query->param('print') ) { + $shelflimit = ( $type eq 'opac' ? C4::Context->preference('OPACnumSearchResults') : C4::Context->preference('numSearchResults') ); + $shelflimit = $shelflimit || ShelvesMax('MGRPAGE'); + $shelflimit = undef if $query->param('rss'); + $shelfoffset = ( $itemoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving items at + $shelveslimit = $shelflimit; # Limits number of shelves returned for a given query (row_count) + $shelvesoffset = ( $shelfoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving shelves at (offset) + } # getting the Shelves list my $category = ( ( $displaymode eq 'privateshelves' ) ? 1 : 2 ); @@ -469,6 +471,7 @@ sub shelfpage { pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" ) ); } } + $template->param( shelveslooppriv => \@shelveslooppriv, shelvesloop => \@shelvesloop, --- a/koha-tmpl/intranet-tmpl/prog/en/css/print.css +++ a/koha-tmpl/intranet-tmpl/prog/en/css/print.css @@ -322,4 +322,4 @@ fieldset { } #cataloguing_additem_itemlist { overflow : visible !important; -} +} --- a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc @@ -12,10 +12,6 @@ sendList(); return false; }); - $("#printlist").click(function(){ - print(); - return false; - }); $("#deleteshelf").click(function(e){ if(confirmDelete(_("Are you sure you want to delete this list?"))){ return true; @@ -60,6 +56,6 @@
Send list
-
Print list
+
Print list
[% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -4,6 +4,16 @@ [% INCLUDE 'datatables.inc' %] + +[% IF print %] + +[% END %] + [% IF ( viewshelf ) %] @@ -354,7 +364,7 @@ function placeHold () { [% SET new_direction = 'asc' %] [% END %] -
+
[% IF ( itemsloop ) %]
| @@ -474,7 +484,7 @@ function placeHold () { [% IF ( allowaddingitem ) %]
-
+
Add an item to [% shelfname | html %]
  1. --- a/virtualshelves/shelves.pl +++ a/virtualshelves/shelves.pl @@ -35,4 +35,5 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( flagsrequired => { catalogue => 1 }, } ); +$template->param( print => $query->param('print') ); shelfpage('intranet', $query, $template, $loggedinuser, $cookie); --