Bugzilla – Attachment 20492 Details for
Bug 8670
Update POD of C4::Branch::GetBranches() to use TT syntax
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8670 - Update POD of C4::Branch::GetBranches() to use TT syntax
Bug-8670---Update-POD-of-C4BranchGetBranches-to-us.patch (text/plain), 1.77 KB, created by
Magnus Enger
on 2013-08-20 08:07:09 UTC
(
hide
)
Description:
Bug 8670 - Update POD of C4::Branch::GetBranches() to use TT syntax
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2013-08-20 08:07:09 UTC
Size:
1.77 KB
patch
obsolete
>From 57148a417114510881bdf2e182379994f7101d97 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 19 Aug 2013 10:55:52 -0400 >Subject: [PATCH] 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. >--- > C4/Branch.pm | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > >diff --git a/C4/Branch.pm b/C4/Branch.pm >index 8b76771..108f24f 100644 >--- a/C4/Branch.pm >+++ b/C4/Branch.pm >@@ -90,11 +90,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. >-- >1.8.1.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8670
:
20470
|
20492
|
20498