From bf25e6e1e66b0a007dfed4e9ec32fb1434eb0e13 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=UTF-8 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 --- koha-tmpl/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 65f35f1..7eacc02 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -1,4 +1,5 @@ [% USE Koha %] +[% USE AuthorisedValues %] [% INCLUDE 'doc-head-open.inc' %] Koha › Catalog › [% IF ( searchdesc ) %]Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %][% ELSE %]You did not specify any search criteria[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -646,9 +647,9 @@ var holdForPatron = function () { [% 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 %] -- 1.7.10.4