From fdea02efce857153bd34aab1a7fe600c765c4ad9 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 25 Feb 2016 21:12:30 -0500 Subject: [PATCH] Bug 15922: Show authorized value description in staff client search results for lost, withdrawn, and damaged MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If an item in the staff client search results list is lost, withdrawn, or damaged, the actual authorized value description for each of those statuses should be displayed rather than the generic term. This patch adds use of the AuthorisedValues template plugin to output the correct description. To test, apply the patch and perform a catalog search in the staff client which will return results with various values for lost, damaged, and withdrawn. Confirm that the correct lost, damaged, or withdrawn status appears for each item rather than the generic term. Followed test plan, statuses appear as expected. Signed-off-by: Marc Véron Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/modules/catalogue/results.tt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index d5aabeab18..4463b66ea3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -3,6 +3,7 @@ [% USE Biblio %] [% USE KohaDates %] [% SET footerjs = 1 %] +[% USE AuthorisedValues %] [% IF BiblioDefaultViewmarc %] [% SET DetailPage="MARCdetail.pl" %] [% ELSIF BiblioDefaultViewlabeled_marc %] @@ -543,9 +544,9 @@ [% IF ( other_items_loo.branchname ) %][% other_items_loo.branchname %][% END %] [% IF ( other_items_loo.location ) %][% other_items_loo.location %][% END %] [% IF ( other_items_loo.itemcallnumber ) %][[% other_items_loo.itemcallnumber %]][% END %] - [% IF ( other_items_loo.withdrawn ) %](Withdrawn)[% END %] - [% IF ( other_items_loo.itemlost ) %](Lost)[% END %] - [% IF ( other_items_loo.damaged ) %](Damaged)[% END %] + [% IF ( other_items_loo.withdrawn ) %]([% AuthorisedValues.GetByCode( 'WITHDRAWN', other_items_loo.withdrawn ) %])[% END %] + [% IF ( other_items_loo.itemlost ) %]([% AuthorisedValues.GetByCode( 'LOST', other_items_loo.itemlost ) %])[% END %] + [% IF ( other_items_loo.damaged ) %]([% AuthorisedValues.GetByCode( 'DAMAGED', other_items_loo.damaged ) %])[% END %] [% IF ( other_items_loo.intransit ) %](In transit)[% END %] [% IF ( other_items_loo.onhold ) %](On hold)[% END %] [% IF ( other_items_loo.notforloan ) %][% other_items_loo.notforloan %][% END %] -- 2.39.5