Bug 8585 follow-up Passing syspref to template
authorPaul Poulain <paul.poulain@biblibre.com>
Wed, 3 Oct 2012 13:28:43 +0000 (15:28 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 3 Oct 2012 13:28:43 +0000 (15:28 +0200)
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
koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt

index a9c317d..63e9c44 100755 (executable)
@@ -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;
index 458316c..cdab69d 100644 (file)
@@ -153,7 +153,7 @@ $(document).ready(function() {
 <input type="text" size="10" id="to" name="to" value="[% to %]" class="datepickerto" />
 </li>
 </ol>
-<p><i>(Inclusive, default is two days ago to today, set other date ranges as needed. )</i></p>
+<p><i>(Inclusive, default is [% HoldsToPullStartDate %] days ago to today, set other date ranges as needed. )</i></p>
 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
 </fieldset>
 </form>
@@ -161,4 +161,4 @@ $(document).ready(function() {
 </div>
 </div>
 </div>
-[% INCLUDE 'intranet-bottom.inc' %]
\ No newline at end of file
+[% INCLUDE 'intranet-bottom.inc' %]