From b8c88bc5dd70d7e936fcf8a40b3e558b5bc04968 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 --- 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 %] [% 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

      -- 1.7.10.4