Bugzilla – Attachment 20500 Details for
Bug 10764
Update POD of C4::Items::GetItemStatus() to use TT syntax
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10764 - Update POD of C4::Items::GetItemStatus() to use TT syntax
Bug-10764---Update-POD-of-C4ItemsGetItemStatus-to-.patch (text/plain), 1.87 KB, created by
Jonathan Druart
on 2013-08-20 11:51:51 UTC
(
hide
)
Description:
Bug 10764 - Update POD of C4::Items::GetItemStatus() to use TT syntax
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-08-20 11:51:51 UTC
Size:
1.87 KB
patch
obsolete
>From 2440b93604492ca73950a29a4f3a3b239126b266 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 19 Aug 2013 11:37:55 -0400 >Subject: [PATCH] Bug 10764 - Update POD of C4::Items::GetItemStatus() to use > TT syntax > >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. > >Signed-off-by: Magnus Enger <magnus@enger.priv.no> >This patch works as advertised (verified with "perldoc C4::Items"), >for GetItemStatus, but it does not fix a a similar example for >GetItemLocation in the same file, which still has the old template >syntax. So a followup or separate bug for that is called for. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >It seems the default option is not in used in templates. >--- > 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.10.4
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 10764
:
20482
|
20494
| 20500