Bug 13268 - biblioitems.size value not correctly displayed (more)
commit1a22fc87db69c6fe7c94fe820e1e0964c1596772
authorFridolin Somers <fridolin.somers@biblibre.com>
Mon, 17 Nov 2014 15:32:20 +0000 (17 16:32 +0100)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 9 Feb 2015 20:51:38 +0000 (10 09:51 +1300)
tree4f7c8e247889aa2fe507d394ad41263b069b9fbc
parent6801a2de20243601b9f8d6d863352b80021aee80
Bug 13268 - biblioitems.size value not correctly displayed (more)

Bug partially corrected by Bug 11357.

The size column in biblioitems is a bit problematic when used in TT, because instead of the size value from the biblio column it will give you the size of the variable or current loop.

It's currently used in the templates like opac-topissues.tt :
[% IF results_loo.size %][% results_loo.size %][% END %]

This patch corrects by using item() TT method.
See http://stackoverflow.com/questions/2311303/how-can-i-handle-hash-keys-containing-illegal-identifier-characters-in-template.

Test plan :
- Be sure there is a mapping between a MARC field and biblioitems.size
- Create a record A with biblioitems.size defined : like "10x12"
- Create a record B with no value in biblioitems.size
- Check each modified page :
=> Without this patch : you see a number (loop size) for both records
=> With this patch : you only see the correct value for A and nothing for B

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f27d454048bca9d9ebdc1f781a688c2311952786)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt