Bugzilla – Attachment 146289 Details for
Bug 32658
Use template wrapper in order from staged file template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32658: Use template wrapper in order from staged file template
Bug-32658-Use-template-wrapper-in-order-from-stage.patch (text/plain), 16.33 KB, created by
Owen Leonard
on 2023-02-06 16:23:29 UTC
(
hide
)
Description:
Bug 32658: Use template wrapper in order from staged file template
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-02-06 16:23:29 UTC
Size:
16.33 KB
patch
obsolete
>From 5466bf288e0063fe3c1f581577d7b5f9c009a7c7 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 17 Jan 2023 19:28:04 +0000 >Subject: [PATCH] Bug 32658: Use template wrapper in order from staged file > template > >This patch implements the template WRAPPER system (see Bug 32571) for >building tabs on the page for adding to a basket from a staged >file. > >To test you need an active vendor, at least one basket for that vendor, >and a staged MARC file. > >Apply the patch and go to Acquisitions -> Vendor -> Basket -> Add to >basket -> From a staged file. > >- Click "Add to orders" on one of your staged files. >- On the "Add orders from..." page you should see three tabs, the first > one active. >- Tabs should look correct and work correctly. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../prog/en/modules/acqui/addorderiso2709.tt | 124 +++++++++--------- > 1 file changed, 62 insertions(+), 62 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index 1337f402b0..c856d8442f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -69,17 +69,17 @@ > ([% file_name | html %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %]) > </h1> > <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform"> >- <div id="tabs" class="toptabs"> >- <ul class="nav nav-tabs" role="tablist"> >- <li role="presentation" class="active"><a href="#records_to_import" aria-controls="records_to_import" role="tab" data-toggle="tab">Select to import</a></li> >+ [% WRAPPER tabs id= "tabs" %] >+ [% WRAPPER tabs_nav %] >+ [% WRAPPER tab_item tabname= "records_to_import" active= 1 %] Select to import [% END %] > [% IF items %] >- <li role="presentation"><a href="#items_info" class="items_info" aria-controls="items_info" role="tab" data-toggle="tab">Item information</a></li> >+ [% WRAPPER tab_item tabname= "items_info" %] Item information [% END %] > [% END %] >- <li role="presentation"><a href="#accounting_details" aria-controls="accounting_details" role="tab" data-toggle="tab">Default accounting details</a></li> >- </ul> >+ [% WRAPPER tab_item tabname= "accounting_details" %] Default accounting details [% END %] >+ [% END %] > >- <div class="tab-content"> >- <div id="records_to_import" role="tabpanel" class="tab-pane active" > >+ [% WRAPPER tab_panels %] >+ [% WRAPPER tab_panel tabname= "records_to_import" active= 1 %] > <div id="searchheader" class="searchheader"> > <div> > <span class="checkall"><a id="checkAll" href="#">Select all</a></span> >@@ -368,66 +368,66 @@ > </div> <!-- /.modal-content --> > </div> <!-- /.modal-dialog --> > </div> <!-- /#dataPreview --> >- </div> <!-- /#records_to_import --> >+ [% END # /#records_to_import %] > > [% IF ( items ) %] >- <div id="items_info" role="tabpanel" class="tab-pane"> >+ [% WRAPPER tab_panel tabname= "items_info" %] > <h2>Item information</h2> > <p>Import all the checked items in the basket with the following parameters:</p> > >- <fieldset class="rows" style="float:none;"> >- <legend>Item</legend> >- [% IF ( NoACQframework ) %] >- <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div> >- [% END %] >- <div class="item_edit_form"> >- [% FOREACH item IN items %] >- <div id="outeritemblock"> >- <div id="itemblock"> >- <ol> >- [% FOREACH iteminformatio IN item.iteminformation %] >- <li style="[% iteminformatio.hidden | html %];"> >- <div class="subfield_line" id="subfield[% iteminformatio.serialid | html %][% iteminformatio.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]"> >- [% IF (iteminformatio.mandatory) %] >- <label class="required">[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label> >- [% ELSE %] >- <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label> >- [% END %] >+ <fieldset class="rows" style="float:none;"> >+ <legend>Item</legend> >+ [% IF ( NoACQframework ) %] >+ <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div> >+ [% END %] >+ <div class="item_edit_form"> >+ [% FOREACH item IN items %] >+ <div id="outeritemblock"> >+ <div id="itemblock"> >+ <ol> >+ [% FOREACH iteminformatio IN item.iteminformation %] >+ <li style="[% iteminformatio.hidden | html %];"> >+ <div class="subfield_line" id="subfield[% iteminformatio.serialid | html %][% iteminformatio.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]"> >+ [% IF (iteminformatio.mandatory) %] >+ <label class="required">[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label> >+ [% ELSE %] >+ <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label> >+ [% END %] > >- [% IF ( iteminformatio.marc_value.type == 'select' ) %] >- <select name="field_value" class="input_marceditor"> >- [% FOREACH value IN iteminformatio.marc_value.values %] >- [% IF ( value == iteminformatio.marc_value.default ) %] >- <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option> >- [% ELSE %] >- <option value="[% value | html %]">[% iteminformatio.marc_value.labels.$value | html %]</option> >- [% END %] >- [% END %] >- </select> >- [% ELSE %] >- [% iteminformatio.marc_value | $raw %] >- [% END %] >- <input type="hidden" name="itemid" value="1" /> >- <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield | html %]" /> >- <input type="hidden" name="tag" value="[% iteminformatio.tag | html %]" /> >- <input type="hidden" name="subfield" value="[% iteminformatio.subfield | html %]" /> >- <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory | html %]" /> >- [% IF ( iteminformatio.mandatory ) %] >- <span class="required">Required</span> >+ [% IF ( iteminformatio.marc_value.type == 'select' ) %] >+ <select name="field_value" class="input_marceditor"> >+ [% FOREACH value IN iteminformatio.marc_value.values %] >+ [% IF ( value == iteminformatio.marc_value.default ) %] >+ <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option> >+ [% ELSE %] >+ <option value="[% value | html %]">[% iteminformatio.marc_value.labels.$value | html %]</option> >+ [% END %] > [% END %] >- </div> >- </li> >- [% END %] >- </ol> >- </div><!-- /#itemblock --> >- </div> <!-- /#outeritemblock --> >- [% END #/FOREACH item %] >- </div> <!-- /.item_edit_form --> >- </fieldset> >- </div> <!-- /#items_info --> >+ </select> >+ [% ELSE %] >+ [% iteminformatio.marc_value | $raw %] >+ [% END %] >+ <input type="hidden" name="itemid" value="1" /> >+ <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield | html %]" /> >+ <input type="hidden" name="tag" value="[% iteminformatio.tag | html %]" /> >+ <input type="hidden" name="subfield" value="[% iteminformatio.subfield | html %]" /> >+ <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory | html %]" /> >+ [% IF ( iteminformatio.mandatory ) %] >+ <span class="required">Required</span> >+ [% END %] >+ </div> >+ </li> >+ [% END %] >+ </ol> >+ </div><!-- /#itemblock --> >+ </div> <!-- /#outeritemblock --> >+ [% END #/FOREACH item %] >+ </div> <!-- /.item_edit_form --> >+ </fieldset> >+ [% END # /#items_info %] > [% END # /IF items %] > >- <div id="accounting_details" role="tabpanel" class="tab-pane"> >+ [% WRAPPER tab_panel tabname= "accounting_details" %] > <p>Import all the checked items in the basket with the following accounting details (used only if no information is filled for the item):</p> > <fieldset class="rows" style="float:none;"> > <legend>Accounting details</legend> >@@ -491,9 +491,9 @@ > </li> > </ol> > </fieldset> <!-- /.rows --> >- </div> <!-- /#accounting_details --> >- </div> <!-- /#tabs --> >- >+ [% END # /#accounting_details %] >+ [% END #/WRAPPER tab_panels %] >+ [% END # /WRAPPER tabs %] > <fieldset class="action"> > <input type="submit" id="add_order" class="btn btn-primary" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a> > </fieldset> >-- >2.20.1
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 32658
:
145369
|
145537
|
145568
|
145569
|
146289
|
146290
|
147371
|
147372