Summary: | Display of item availability broken on OPAC detail screen | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | OPAC | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Bugs List <koha-bugs> |
Severity: | normal | ||
Priority: | PATCH-Sent (DO NOT USE) | CC: | chris, f.demians, magnus |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 5917 | ||
Attachments: |
Proposed fix
Signed-off patch with improvement |
Description
Owen Leonard
2011-05-18 14:57:20 UTC
Created attachment 4166 [details] [review] Proposed fix 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. Created attachment 4213 [details] [review] Signed-off patch with improvement I confirm the bug. I propose a alternative solution which solve the bug and keep its versatility-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 temporally masking any existing variable. Thanks Frédéric, your solution is the correct one. I knew I could pass an individual variable using that method but I didn't realize a whole loop could be passed the same way. T::T Bug, pushed please test E.g. opac-detail.pl?biblionumber=4 shows the correct mix of "Checked out" and "Available". |