Bugzilla – Attachment 46014 Details for
Bug 11280
Change Withdrawn toggle to drop down selection of authorized values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11280 - Change Withdrawn toggle to drop down selection of authorized values
Bug-11280---Change-Withdrawn-toggle-to-drop-down-s.patch (text/plain), 6.18 KB, created by
Aleisha Amohia
on 2015-12-28 22:53:05 UTC
(
hide
)
Description:
Bug 11280 - Change Withdrawn toggle to drop down selection of authorized values
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2015-12-28 22:53:05 UTC
Size:
6.18 KB
patch
obsolete
>From b8c88bc5dd70d7e936fcf8a40b3e558b5bc04968 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 7 Dec 2015 14:41:29 -0500 >Subject: [PATCH] Bug 11280 - Change Withdrawn toggle to drop down selection > of authorized values > >'Withdrawn' is an authorised value just like 'Lost' and 'Damaged,' so >the item detail screen should offer the same means of selecting one of >multiple values. > >This patch re-uses the same template markup and code 'Lost' and 'Damage' >use to make it possible to select a specific withdrawn value. > >To test you should have multiple values entered for the authorised value >category 'WITHDRAWN'. > >1. Apply the patch and locate any record in the catalog. >2. From the detail screen, click the barcode in the items table to go to > the item detail page. >3. Confirm that there is a dropdown list of choices for 'Withdrawn > status.' >4. Try both setting and unsetting various withdrawn statuses. >5. Confirm that setting Lost or Damaged statuses. > >Signed-off-by: Aleisha <aleishaamohia@hotmail.com> >--- > catalogue/moredetail.pl | 1 + > .../prog/en/modules/catalogue/moredetail.tt | 50 +++++++++++++------- > 2 files changed, 34 insertions(+), 17 deletions(-) > >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index 70378d0..d2b8776 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -137,6 +137,7 @@ foreach ( keys %{$data} ) { > foreach my $item (@items){ > $item->{itemlostloop}= GetAuthorisedValues(GetAuthValCode('items.itemlost',$fw),$item->{itemlost}) if GetAuthValCode('items.itemlost',$fw); > $item->{itemdamagedloop}= GetAuthorisedValues(GetAuthValCode('items.damaged',$fw),$item->{damaged}) if GetAuthValCode('items.damaged',$fw); >+ $item->{itemwithdrawnloop}= GetAuthorisedValues(GetAuthValCode('items.withdrawn',$fw),$item->{withdrawn}) if GetAuthValCode('items.withdrawn',$fw); > $item->{'collection'} = $ccodes->{ $item->{ccode} } if ($ccodes); > $item->{'itype'} = $itemtypes->{ $item->{'itype'} }->{'translated_description'}; > $item->{'replacementprice'} = sprintf( "%.2f", $item->{'replacementprice'} ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index 1ddc952..dd703ab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -161,25 +161,41 @@ > [% END %] > </li> > [% END %] >- <li><span class="label">Withdrawn?:</span>[% IF ( ITEM_DAT.withdrawn ) %]Yes[% ELSE %]No[% END %] >- [% IF ( CAN_user_circulate ) %] >- <form action="updateitem.pl" method="post"> >- <input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" /> >- <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /> >- <input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" /> >- <input type="hidden" name="itemlost" value="[% ITEM_DAT.itemlost %]" /> >- <input type="hidden" name="damaged" value="[% ITEM_DAT.damaged %]" /> > >- [% IF ( ITEM_DAT.withdrawn ) %] >- <input type="hidden" name="withdrawn" value="0" />[% ELSE %]<input type="hidden" name="withdrawn" value="1" /> >- [% END %] >- [% IF ( ITEM_DAT.withdrawn ) %] >- <input type="submit" name="submit" class="submit" value="Restore" />[% ELSE %]<input type="submit" name="submit" class="submit" value="Withdraw" /> >- [% END %] >- </form> >+ [% IF ( ITEM_DAT.itemwithdrawnloop ) %] >+ <li><span class="label">Withdrawn status:</span> >+ [% IF ( CAN_user_circulate ) %] >+ <form action="updateitem.pl" method="post"> >+ <input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" /> >+ <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /> >+ <input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" /> >+ <select name="withdrawn" > >+ <option value="">Choose</option> >+ [% FOREACH itemwithdrawn IN ITEM_DAT.itemwithdrawnloop %] >+ [% IF ( itemwithdrawn.selected ) %] >+ <option value="[% itemwithdrawn.authorised_value %]" selected="selected">[% itemwithdrawn.lib %]</option> >+ [% ELSE %] >+ <option value="[% itemwithdrawn.authorised_value %]">[% itemwithdrawn.lib %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ <input type="hidden" name="itemlost" value="[% ITEM_DAT.itemlost %]" /> >+ <input type="hidden" name="damaged" value="[% ITEM_DAT.damaged %]" /> >+ <input type="submit" name="submit" class="submit" value="Set status" /></form> >+ [% ELSE %] >+ [% FOREACH itemwithdrawn IN ITEM_DAT.itemwithdrawnloop %] >+ [% IF ( itemwithdrawn.selected ) %] >+ [% itemwithdrawn.lib %] >+ [% END %] >+ [% END %] >+ >+ [% END %] >+ </li> >+ [% IF ITEM_DAT.withdrawn != "" && ITEM_DAT.withdrawn_on %] >+ <li><span class="label">Withdrawn on:</span>[% ITEM_DAT.withdrawn_on | $KohaDates %] </li> > [% END %] >- </li> >- [% IF ITEM_DAT.withdrawn_on %]<li><span class="label">Withdrawn on:</span>[% ITEM_DAT.withdrawn_on | $KohaDates %] </li>[% END %] >+ [% END %] >+ > </ol></div> > <div class="listgroup"><h4>History</h4> > <ol class="bibliodetails"> >-- >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 11280
:
45471
|
46014
|
46854