Bugzilla – Attachment 4226 Details for
Bug 6066
itemtype when ordering and item-level_itype=no
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch for T::TT
0001-MT5189-let-s-the-librarian-choose-the-itemtype-when-.patch (text/plain), 3.61 KB, created by
Paul Poulain
on 2011-05-23 11:47:02 UTC
(
hide
)
Description:
proposed patch for T::TT
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2011-05-23 11:47:02 UTC
Size:
3.61 KB
patch
obsolete
>From 84673874c9069293fa4737fc3ddcc1e7a61a08e0 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Tue, 5 Apr 2011 15:16:04 +0200 >Subject: [PATCH] MT5189 let's the librarian choose the itemtype when ordering > >For libraries with item-level_itype, the itemtype is in the item. >For others, it's in the biblio and should be added with the title/author when it's ordered > >This patch adds the list when applicable,and build the biblio record accordingly >--- > acqui/addorder.pl | 1 + > acqui/neworderempty.pl | 4 ++++ > .../prog/en/modules/acqui/neworderempty.tt | 17 +++++++++++++++++ > 3 files changed, 22 insertions(+), 0 deletions(-) > >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index 44623ec..e321d2c 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -204,6 +204,7 @@ if ( $orderinfo->{quantity} ne '0' ) { > "biblioitems.publishercode" => $$orderinfo{publishercode} ? $$orderinfo{publishercode} : "", > "biblioitems.publicationyear" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "", > "biblio.copyrightdate" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "", >+ "biblioitems.itemtype" => $$orderinfo{itemtype} ? $$orderinfo{itemtype} : "", > }); > > # create the record in catalogue, with framework '' >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 15a29e1..8e78933 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -324,6 +324,9 @@ if (C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber) { > > $template->param(items => \@itemloop); > } >+# Get the item types list, but only if item_level_itype is YES. Otherwise, it will be in the item, no need to display it in the biblio >+my @itemtypes = C4::ItemType->all unless C4::Context->preference('item-level_itypes'); >+ > > # fill template > $template->param( >@@ -369,6 +372,7 @@ $template->param( > isbn => $data->{'isbn'}, > seriestitle => $data->{'seriestitle'}, > collectiontitle => $data->{'collectiontitle'}, >+ itemtypeloop => \@itemtypes, > quantity => $data->{'quantity'}, > quantityrec => $data->{'quantity'}, > rrp => $data->{'rrp'}, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index 0768323..95bfa43 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -268,6 +268,23 @@ $(document).ready(function() > <input type="text" size="50" name="collectiontitle" id="collectiontitle" value="[% collectiontitle %]" /> > [% END %] > </li> >+ </li> >+ [% UNLESS ( biblionumber ) %] >+ [% IF ( itemtypeloop ) %] >+ <li> >+ <span class="label">Item type:</span> >+ <select name="itemtype" style="width:12em;"> >+ [% FOREACH itemtype IN itemtypeloop %] >+ [% IF ( itemtype.selected ) %] >+ <option value="[% itemtype.itemtype %]" selected="selected">[% itemtype.description %]</option> >+ [% ELSE %] >+ <option value="[% itemtype.itemtype %]">[% itemtype.description %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ </li> >+ [% END %] >+ [% END %] > </ol> > </fieldset> > [% IF ( items ) %] >-- >1.7.4.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 6066
:
3685
|
4226
|
4531
|
4556