Fix for Bug 6364 - Display of item availability broken on OPAC detail screen
authorOwen Leonard <oleonard@myacpl.org>
Wed, 18 May 2011 15:01:20 +0000 (11:01 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 29 May 2011 03:49:50 +0000 (15:49 +1200)
commit559091c5589887adc774e2f217c64de390270d4e
treeb94c7591c252cc45967f430805d5a2eeac6f1562
parent481ffe7474fa9d0a972dd4be70ac2cad62e315a6
Fix for Bug 6364 - Display of item availability broken on OPAC detail screen

Owen:

The markup for showing item availability has been moved to an include
file. The include lacked the scope declaration for the item results
loop. Adding the scope declaration to the include file means it can't
be used by other template unless within the same scope, but I'm not
aware of a better way to do it given the number of variables in use.

Frédéric:

I confirm the bug.

I propose a alternative solution which solve the bug and keep its
versability-reusability to the include file. With this solution, when including
item-status.inc, the foreach loop variable name, which can change from template
to template, is renamed by using a local variable definition: ie a variable
name specified after file name in the INCLUDE directive, this variable
temporalily masking any existing variable.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt