Bug 16764

Summary: Update printers administration page
Product: Koha Reporter: Owen Leonard <oleonard>
Component: System AdministrationAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: chris, fridolin.somers, gmcharlt, jonathan.druart, kyle, nick, veron
Version: Main   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/admin/printers.pl
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17845
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 8352    
Bug Blocks:    
Attachments: Bug 16764 - Update printers administration page
Bug 16764 - Update printers administration page
Bug 16764 - Update printers administration page
Bug 16764 - Update printers administration page

Description Owen Leonard 2016-06-17 18:14:57 UTC
I hear some libraries do use it, so why not bring the printers administration page up to date? I have a patch to add DataTables, Font awesome icons, and plugin-validated forms.
Comment 1 Owen Leonard 2016-06-17 18:35:09 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-06-17 18:37:10 UTC
In case it helps with testing:

INSERT INTO `printers` (`printername`, `printqueue`, `printtype`) VALUES
('Printer 01', 'print_queue_01', 'type01'),
('Printer 02', 'print_queue_02', 'type02'),
('Printer 03', 'print_queue_03', 'type03'),
('Printer 04', 'print_queue_04', 'type04'),
('Printer 05', 'print_queue_05', 'type05'),
('Printer 06', 'print_queue_06', 'type06'),
('Printer 07', 'print_queue_07', 'type07'),
('Printer 08', 'print_queue_08', 'type08'),
('Printer 09', 'print_queue_09', 'type09'),
('Printer 10', 'print_queue_10', 'type10'),
('Printer 11', 'print_queue_11', 'type11'),
('Printer 12', 'print_queue_12', 'type12'),
('Printer 13', 'print_queue_13', 'type13'),
('Printer 14', 'print_queue_14', 'type14'),
('Printer 15', 'print_queue_15', 'type15'),
('Printer 16', 'print_queue_16', 'type16'),
('Printer 17', 'print_queue_17', 'type17'),
('Printer 18', 'print_queue_18', 'type18'),
('Printer 19', 'print_queue_19', 'type19'),
('Printer 20', 'print_queue_20', 'type20'),
('Printer 21', 'print_queue_21', 'type21'),
('Printer 22', 'print_queue_22', 'type22'),
('Printer 23', 'print_queue_23', 'type23'),
('Printer 24', 'print_queue_24', 'type24'),
('Printer 25', 'print_queue_25', 'type25');
Comment 3 Marc Véron 2016-06-18 13:17:57 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall (khall) 2016-06-24 17:54:25 UTC
Bug 8352 revamps the printer administration as well.
Comment 5 Jonathan Druart 2016-06-25 13:57:39 UTC
(In reply to Kyle M Hall from comment #4)
> Bug 8352 revamps the printer administration as well.

Yes but it is in discussion and does no longer apply. What do you suggest?
Comment 6 Kyle M Hall (khall) 2016-06-27 13:12:15 UTC
(In reply to Jonathan Druart from comment #5)
> (In reply to Kyle M Hall from comment #4)
> > Bug 8352 revamps the printer administration as well.
> 
> Yes but it is in discussion and does no longer apply. What do you suggest?

Since this is a purely cosmetic change, I would appreciate if we held off on it for bug 8352. I haven't had time to get back to that one recently, but I'm still pursuing it. The blocker on it is getting the needed Perl libs packaged for Debian. I really need s For Dummies version of getting libraries packaged, but alas, there is none ; )
Comment 7 Owen Leonard 2017-11-14 15:47:47 UTC
Created attachment 69141 [details] [review]
Bug 16764 - Update printers administration page

This patch updates the template for printers administration according to
current interface guidelines.

- 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.

To test properly you will need to add multiple printers.

- 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.

Signed-off-by: Marc Véron <veron@veron.ch>

Update: rebased and updated Bootstrap 3 classes
Comment 8 Owen Leonard 2017-11-14 15:49:39 UTC
I'd like to put this back in the queue since Bug 8352 has been idle for so long.
Comment 9 Katrin Fischer 2017-12-21 23:09:55 UTC
Created attachment 70090 [details] [review]
Bug 16764 - Update printers administration page

This patch updates the template for printers administration according to
current interface guidelines.

- 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.

To test properly you will need to add multiple printers.

- 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.

Signed-off-by: Marc Véron <veron@veron.ch>

Update: rebased and updated Bootstrap 3 classes

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=16765
Comment 10 Jonathan Druart 2017-12-22 16:16:26 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 11 Nick Clemens (kidclamp) 2018-01-15 16:46:12 UTC
Awesome work all, pushed to stable for 17.11.02
Comment 12 Fridolin Somers 2018-01-22 09:44:45 UTC
Enhancement not pushed to 17.05.x