Bug 14131 - Adding print patron cards to patron lists home page
authorLiz <wizzyrea@gmail.com>
Thu, 15 Oct 2015 04:11:39 +0000 (04:11 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Thu, 31 Dec 2015 20:24:58 +0000 (20:24 +0000)
To test:

Go to /cgi-bin/koha/patron-lists/lists.pl
Make a patron list
Click "Print patron cards"
Success: you get a pdf of cards to print.
Failure: you can't get a pdf of cards to print.

Note that you'll need to have a card layout, template, and printer profile defined. The defaults should work.

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt

index eee075e..4807796 100644 (file)
@@ -1,7 +1,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Patron lists</title>
 [% INCLUDE 'doc-head-close.inc' %]
-
+[% INCLUDE 'greybox.inc' %]
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
 [% INCLUDE 'datatables.inc' %]
 
@@ -11,7 +11,7 @@
         $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
             "autoWidth": false,
             "aoColumnDefs": [
-                { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
+                { "aTargets": [ -1, -2, -3, -4 ], "bSortable": false, "bSearchable": false },
             ],
             "sPaginationType": "four_button"
         } ));
@@ -46,6 +46,7 @@
                     <th>&nbsp;</th>
                     <th>&nbsp;</th>
                     <th>&nbsp;</th>
+                    <th>&nbsp;</th>
                 </tr>
             </thead>
 
                                 <i class="fa fa-trash"></i> Delete
                             </a>
                         </td>
+                        <td>
+                            <a class="btn btn-mini" href="#" onclick='GB_showCenter(_("Print patron cards from list"), "/cgi-bin/koha/patroncards/print.pl?patronlist_id=[% l.patron_list_id %]", 700, 800);return false;'>
+                                <i class="icon-print"></i> Print patron cards
+                            </a>
+                        </td>
                     </tr>
                 [% END %]
             </tbody>