@@ -, +, @@ - Custom JavaScript form validation is removed in favor of the built-in form validation plugin. - Printer-specific header search form is removed, along with server-side pagination code. The functionality of both is now taken care of the adding DataTables sorting and pagination to the table. - Edit and delete links are styled as Boostrap buttons with Font Awesome icons. - Confirmation dialogs are updated to use Font Awesome icons. - Apply the patch and open /cgi-bin/koha/admin/printers.pl (there is no menu link for the page). - When no printers exist you should see a message dialog saying so. - Add a new printer. Confirm that printer name and queue are required fields. - After adding multiple printers, confirm that the table of printers is correctly sorted and searched by the DataTables plugin. - Delete a printer and verify that the confirmation dialog is correctly styled. --- admin/printers.pl | 16 +- .../prog/en/includes/printers-admin-search.inc | 28 ---- .../prog/en/modules/admin/printers.tt | 162 +++++++++----------- 3 files changed, 71 insertions(+), 135 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/printers-admin-search.inc --- a/admin/printers.pl +++ a/admin/printers.pl @@ -60,10 +60,8 @@ sub StringSearch { my $input = new CGI; my $searchfield=$input->param('searchfield'); #my $branchcode=$input->param('branchcode'); -my $offset=$input->param('offset') || 0; my $script_name="/cgi-bin/koha/admin/printers.pl"; -my $pagesize=20; my $op = $input->param('op'); $searchfield=~ s/\,//g; @@ -132,19 +130,7 @@ if ($op eq 'add_form') { } else { # DEFAULT $template->param(else => 1); my ($count,$results)=StringSearch($searchfield,'web'); - my $max = ($offset+$pagesize < $count) ? $offset+$pagesize : $count; - my @loop = (@$results)[$offset..$max]; - - $template->param(loop => \@loop); - - if ($offset>0) { - $template->param(offsetgtzero => 1, - prevpage => $offset-$pagesize); - } - if ($offset+$pagesize<$count) { - $template->param(ltcount => 1, - nextpage => $offset+$pagesize); - } + $template->param(loop => $results); } #---- END $OP eq DEFAULT --- a/koha-tmpl/intranet-tmpl/prog/en/includes/printers-admin-search.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/printers-admin-search.inc @@ -1,28 +0,0 @@ -
-

[% LibraryName %]

- -
- --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt @@ -6,53 +6,27 @@ [% IF ( delete_confirmed ) %] Printers › Printer deleted[% END %] [% IF ( else ) %]Printers[% END %] [% INCLUDE 'doc-head-close.inc' %] -[% IF ( add_form ) %] - [% END %] +[% END %] [% INCLUDE 'header.inc' %] -[% INCLUDE 'printers-admin-search.inc' %] +[% INCLUDE 'cat-search.inc' %] --