Bug 13986: Printing a list only prints the results of the page you are viewing
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / virtualshelves / shelves.tt
index a51f6b2..30bd124 100644 (file)
@@ -4,6 +4,16 @@
 <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>
@@ -54,6 +64,8 @@ $(document).ready(function(){
             { 'mDataProp': 'dt_count' },
             { 'mDataProp': 'dt_owner' },
             { 'mDataProp': 'dt_sortby' },
+            { 'mDataProp': 'dt_created_on' },
+            { 'mDataProp': 'dt_modification_time' },
             { 'mDataProp': 'dt_action', 'bSortable': false }
         ],
         "aoColumnDefs": [
@@ -354,7 +366,7 @@ function placeHold () {
     [% 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>
@@ -474,7 +486,7 @@ function placeHold () {
 [% 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>
@@ -603,6 +615,8 @@ function placeHold () {
                         <th>Contents</th>
                         <th>Owner</th>
                         <th>Sort by</th>
+                        <th>Creation date</th>
+                        <th>Modification date</th>
                         <th>Actions</th>
                     </tr>
                     <tr class="filters_row">
@@ -620,6 +634,8 @@ function placeHold () {
                             </select>
                         </th>
                         <th></th>
+                        <th></th>
+                        <th></th>
                     </tr>
                 </thead>
                 <tbody></tbody>