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 );
pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" ) );
}
}
+
$template->param(
shelveslooppriv => \@shelveslooppriv,
shelvesloop => \@shelvesloop,
}
#cataloguing_additem_itemlist {
overflow : visible !important;
-}
\ No newline at end of file
+}
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;
</ul>
</div>
<div class="btn-group"><a class="btn btn-small" href="#" id="sendlist"><i class="icon-envelope"></i> Send list</a></div>
- <div class="btn-group"><a class="btn btn-small" id="printlist" href="#"><i class="icon-print"></i> Print list</a></div>
+ <div class="btn-group"><a class="btn btn-small" id="printlist" target="_blank" href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&print=1"><i class="icon-print"></i> Print list</a></div>
[% END %]
</div>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
+
+[% IF print %]
+<script type="text/javascript">
+ $( document ).ready(function() {
+ window.print();
+ setTimeout('window.close()', 1);
+ });
+</script>
+[% END %]
+
[% IF ( viewshelf ) %]
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
[% SET new_direction = 'asc' %]
[% END %]
-<div id="searchheader">
+<div id="searchheader" class="noprint">
[% IF ( itemsloop ) %]
<div id="selection_ops"><span class="checkall"></span> |
<span class="clearall"></span>
[% IF ( allowaddingitem ) %]
<div class="yui-g">
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
- <fieldset class="brief">
+ <fieldset class="brief noprint">
<legend>Add an item to <i>[% shelfname | html %]</i></legend>
<ol>
<li>
flagsrequired => { catalogue => 1 },
}
);
+$template->param( print => $query->param('print') );
shelfpage('intranet', $query, $template, $loggedinuser, $cookie);