From 5a5af02be9eda69c77146184fe8392ca9c4067f3 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 28 Dec 2016 15:08:42 +0100 Subject: [PATCH] Bug 17821 - due date in intranet search results should use TT date plugin Intranet search results displays due date from item onloan. This should use the TT date plugin. Test plan : - set syspref dateformat not on yyyy-mm-dd, for example dd/mm/yyyy - checkout an item - at intranet, perform a search where you see the item => You must see : "date due : dd/mm/yyyy" Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall (cherry picked from commit 7df47b48ba8a7241f062d14fb9f32770b80694d9) Signed-off-by: Katrin Fischer --- C4/Search.pm | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 998e8e3504..7275b4049b 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2093,7 +2093,7 @@ sub searchResults { { $onloan_count++; my $key = $prefix . $item->{onloan} . $item->{barcode}; - $onloan_items->{$key}->{due_date} = output_pref( { str => $item->{onloan}, dateonly => 1 } ); + $onloan_items->{$key}->{due_date} = $item->{onloan}; $onloan_items->{$key}->{count}++ if $item->{$hbranch}; $onloan_items->{$key}->{branchname} = $item->{branchname}; $onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} }; 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 031c1f8edb..5f801149bc 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 KohaDates %] [% 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' %] @@ -668,7 +669,7 @@ var holdForPatron = function () { [% IF ( onloan_items_loo.branchname ) %][% onloan_items_loo.branchname %][% END %] [% IF ( onloan_items_loo.location ) %][% onloan_items_loo.location %][% END %] [% IF ( onloan_items_loo.itemcallnumber ) %][[% onloan_items_loo.itemcallnumber %]][% END %] - ([% onloan_items_loo.count %][% IF ( onloan_items_loo.longoverdue ) %], [% onloan_items_loo.longoverdue %] long overdue[% END %]) date due: [% onloan_items_loo.due_date %] + ([% onloan_items_loo.count %][% IF ( onloan_items_loo.longoverdue ) %], [% onloan_items_loo.longoverdue %] long overdue[% END %]) date due: [% onloan_items_loo.due_date | $KohaDates %] [% IF item_level_itypes && onloan_items_loo.description %]
[% onloan_items_loo.description %] [% END %] -- 2.39.5