From 529bb9c2a4c906cd5c00fda294489b633cfb5853 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Wed, 3 Oct 2012 15:28:43 +0200 Subject: [PATCH] Bug 8585 follow-up Passing syspref to template Passing the syspref HoldsToPullStartDate to get the number of days displayed on the screen (instead of "two" that was hardcoded) Also s/tab/4 spaces/g --- circ/pendingreserves.pl | 61 ++++++++++--------- .../prog/en/modules/circ/pendingreserves.tt | 4 +- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index a9c317d25e..63e9c445c9 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -163,31 +163,31 @@ if ( $run_report ) { push( @reservedata, { - reservedate => format_date( $data->{l_reservedate} ), - priority => $data->{priority}, - name => $data->{l_patron}, - title => $data->{title}, - author => $data->{author}, - borrowernumber => $data->{borrowernumber}, - itemnum => $data->{itemnumber}, - phone => $data->{phone}, - email => $data->{email}, - biblionumber => $data->{biblionumber}, - statusw => ( $data->{found} eq "W" ), - statusf => ( $data->{found} eq "F" ), - holdingbranch => $data->{l_holdingbranch}, - branch => $data->{l_branch}, - itemcallnumber => $data->{l_itemcallnumber}, - enumchron => $data->{l_enumchron}, - copyno => $data->{l_copynumber}, - notes => $data->{notes}, - notificationdate => $data->{notificationdate}, - reminderdate => $data->{reminderdate}, - count => $data->{icount}, - rcount => $data->{rcount}, - pullcount => $data->{icount} <= $data->{rcount} ? $data->{icount} : $data->{rcount}, - itype => $data->{l_itype}, - location => $data->{l_location} + reservedate => format_date( $data->{l_reservedate} ), + priority => $data->{priority}, + name => $data->{l_patron}, + title => $data->{title}, + author => $data->{author}, + borrowernumber => $data->{borrowernumber}, + itemnum => $data->{itemnumber}, + phone => $data->{phone}, + email => $data->{email}, + biblionumber => $data->{biblionumber}, + statusw => ( $data->{found} eq "W" ), + statusf => ( $data->{found} eq "F" ), + holdingbranch => $data->{l_holdingbranch}, + branch => $data->{l_branch}, + itemcallnumber => $data->{l_itemcallnumber}, + enumchron => $data->{l_enumchron}, + copyno => $data->{l_copynumber}, + notes => $data->{notes}, + notificationdate=> $data->{notificationdate}, + reminderdate => $data->{reminderdate}, + count => $data->{icount}, + rcount => $data->{rcount}, + pullcount => $data->{icount} <= $data->{rcount} ? $data->{icount} : $data->{rcount}, + itype => $data->{l_itype}, + location => $data->{l_location}, } ); } @@ -195,14 +195,15 @@ if ( $run_report ) { } $template->param( - todaysdate => format_date($todaysdate), + todaysdate => format_date($todaysdate), from => $startdate, - to => $enddate, + to => $enddate, run_report => $run_report, - reserveloop => \@reservedata, + reserveloop => \@reservedata, "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, - DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), - dateformat => C4::Context->preference("dateformat"), + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), + dateformat => C4::Context->preference("dateformat"), + HoldsToPullStartDate => (C4::Context->preference('HoldsToPullStartDate')?C4::Context->preference('HoldsToPullStartDate'):2), ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index 458316c239..cdab69d245 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -153,7 +153,7 @@ $(document).ready(function() { -

(Inclusive, default is two days ago to today, set other date ranges as needed. )

+

(Inclusive, default is [% HoldsToPullStartDate %] days ago to today, set other date ranges as needed. )

@@ -161,4 +161,4 @@ $(document).ready(function() { -[% INCLUDE 'intranet-bottom.inc' %] \ No newline at end of file +[% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5