Bug 15922: Show authorized value description in staff client search results for lost...
authorOwen Leonard <oleonard@myacpl.org>
Fri, 26 Feb 2016 02:12:30 +0000 (21:12 -0500)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 20 Apr 2018 15:42:40 +0000 (12:42 -0300)
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 <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt

index d5aabea..4463b66 100644 (file)
@@ -3,6 +3,7 @@
 [% USE Biblio %]
 [% USE KohaDates %]
 [% SET footerjs = 1 %]
+[% USE AuthorisedValues %]
 [% IF BiblioDefaultViewmarc %]
     [% SET DetailPage="MARCdetail.pl" %]
 [% ELSIF BiblioDefaultViewlabeled_marc %]
                                         [% 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 ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% other_items_loo.itemcallnumber |uri %]%22">[% other_items_loo.itemcallnumber %]</a>][% 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 %]