From 0c15f18391c58664a5d92a2b3fbd59afa1dd4bdb Mon Sep 17 00:00:00 2001 From: Owen Leonard 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 Signed-off-by: Jonathan Druart --- 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 1b33f75..aa23799 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -139,6 +139,7 @@ foreach my $item (@items){ $item->{object} = Koha::Items->find( $item->{itemnumber} ); $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 bde296d..552b516 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -162,25 +162,41 @@ [% END %] [% END %] -
  • Withdrawn?:[% IF ( ITEM_DAT.withdrawn ) %]Yes[% ELSE %]No[% END %] - [% IF ( CAN_user_circulate ) %] -
    - - - - - - [% IF ( ITEM_DAT.withdrawn ) %] - [% ELSE %] - [% END %] - [% IF ( ITEM_DAT.withdrawn ) %] - [% ELSE %] - [% END %] -
    + [% IF ( ITEM_DAT.itemwithdrawnloop ) %] +
  • Withdrawn status: + [% IF ( CAN_user_circulate ) %] +
    + + + + + + +
    + [% ELSE %] + [% FOREACH itemwithdrawn IN ITEM_DAT.itemwithdrawnloop %] + [% IF ( itemwithdrawn.selected ) %] + [% itemwithdrawn.lib %] + [% END %] + [% END %] +   + [% END %] +
  • + [% IF ITEM_DAT.withdrawn != "" && ITEM_DAT.withdrawn_on %] +
  • Withdrawn on:[% ITEM_DAT.withdrawn_on | $KohaDates %]  
  • [% END %] - - [% IF ITEM_DAT.withdrawn_on %]
  • Withdrawn on:[% ITEM_DAT.withdrawn_on | $KohaDates %]  
  • [% END %] + [% END %] +

    History

      -- 2.1.0