Bug 8670 - Update POD of C4::Branch::GetBranches() to use TT syntax

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

To test, view the POD for C4::Branch::GetBranches() and confirm that it
looks correct.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Checked the POD with "perldoc C4/Branch.pm" before and after applying
the patch. The example now uses TT syntax, and looks sensible.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7ae3ea6857)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 66b214899f)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 66b214899f)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit 8c6c5509a5)
This commit is contained in:
Owen Leonard 2013-08-19 10:55:52 -04:00 committed by Chris Hall
parent 3698e204a1
commit bcd691d9dd
1 changed files with 9 additions and 5 deletions

View File

@ -89,11 +89,15 @@ Create a branch selector with the following code.
=head3 in TEMPLATE
<select name="branch">
<option value="">Default</option>
<!-- TMPL_LOOP name="branchloop" -->
<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
<!-- /TMPL_LOOP -->
<select name="branch" id="branch">
<option value=""></option>
[% FOREACH branchloo IN branchloop %]
[% IF ( branchloo.selected ) %]
<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
[% ELSE %]
<option value="[% branchloo.value %]" >[% branchloo.branchname %]</option>
[% END %]
[% END %]
</select>
=head4 Note that you often will want to just use GetBranchesLoop, for exactly the example above.