Bug 18541 - Patron card creator: Add a grid to support layout design
authorMarc Véron <veron@veron.ch>
Thu, 4 May 2017 15:36:24 +0000 (17:36 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 19 Sep 2017 14:47:32 +0000 (11:47 -0300)
commit45aea7ae1df815d241e7a34fbb5c42e9475f6d04
tree9bb4e276b6618dfa994064ebe7d724d049c648a9
parent9355e5204074349c232c58caa678a8ab40c18efe
Bug 18541 - Patron card creator: Add a grid to support layout design

Add a layout grid to patron card creator to figure out the positions of text
fields, barcode and images.

To test:
- Apply on top of patch 18465
- Go to Home > Tools > Patron card creator
- Edit or create a layout
- Turn on new choice 'Guide grid' in section 'General settings'
- Leave 'Units' unchanged
- Crate a PDF using 'Card batches'
- Notice that card is printed with a layout grid that reflects selected unit
  with each 5th and 10th line in different color, unit description displayed
  bottom left, card dimensions displayed top right in small print inside the
  layout grid
- Print PDF. Set printer settings in Adobe Reader or other PDF printing
  software to 'Actual size' to prevent scaling to printer's printable
  region
- Mesure out printed PDF and verify that grid corresponds to selecte unit.
- Go back to layout definition and choose an other unit, repeat steps
  to verify that grid respects selected unit.
- Go back to layout definition, turn grid off, create PDF, verify that grid
  does not display in PDF

Note for testers / QAers: Position of card elements (text, image...) do not
respect the unit, this will be fixed in Bug 18550

Followed test plan and it worked as intended
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Patroncards/Patroncard.pm
koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tt
patroncards/create-pdf.pl
patroncards/edit-layout.pl