]> git.koha-community.org Git - koha.git/commit
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 Nighswonger <chris.nighswonger@gmail.com>
Mon, 30 May 2011 03:13:26 +0000 (23:13 -0400)
commit5da7fb70210922b7e20284954974b311fd1f104a
treed65393de4e6c536a2ef3c5a24440a06d3a51457c
parent4d5460ec854fe46530deddb6ca2cc8cb72e9b14f
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>
(cherry picked from commit 559091c5589887adc774e2f217c64de390270d4e)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt