[Koha-patches] [PATCH] Bug 10764 - Update POD of C4::Items::GetItemStatus() to use TT syntax

Owen Leonard oleonard at myacpl.org
Mon Aug 19 17:40:18 CEST 2013


This patch updates the example template syntax in the POD for
C4::Items::GetItemStatus() to use Template Toolkit syntax.

To test, view the POD for C4::Items::GetItemStatus() and confirm that it
looks correct.
---
 C4/Items.pm |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/C4/Items.pm b/C4/Items.pm
index 212a9d3..64db262 100644
--- a/C4/Items.pm
+++ b/C4/Items.pm
@@ -751,12 +751,16 @@ Create a status selector with the following code
 
 =head3 in TEMPLATE
 
- <select name="statusloop">
-     <option value="">Default</option>
- <!-- TMPL_LOOP name="statusloop" -->
-     <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="statusname" --></option>
- <!-- /TMPL_LOOP -->
- </select>
+<select name="statusloop" id="statusloop">
+    <option value="">Default</option>
+    [% FOREACH statusloo IN statusloop %]
+        [% IF ( statusloo.selected ) %]
+            <option value="[% statusloo.value %]" selected="selected">[% statusloo.statusname %]</option>
+        [% ELSE %]
+            <option value="[% statusloo.value %]">[% statusloo.statusname %]</option>
+        [% END %]
+    [% END %]
+</select>
 
 =cut
 
-- 
1.7.9.5


More information about the Koha-patches mailing list