koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha circ/returns.pl koha-tmpl/intranet-tmpl/cc... [dev_week]


From: Kyle Hall
Subject: [Koha-cvs] koha circ/returns.pl koha-tmpl/intranet-tmpl/cc... [dev_week]
Date: Mon, 07 May 2007 13:53:01 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Kyle Hall <kylemhall>   07/05/07 13:53:01

Modified files:
        circ           : returns.pl 
        koha-tmpl/intranet-tmpl/ccfls/en/circ: returns.tmpl 

Log message:
        Added highlighting on date for overdue returns in CCFLS template.
        New var in riloop, OVERDUE. 1 if overdue, nonexistant otherwise.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/circ/returns.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.37.2.6.2.7&r2=1.37.2.6.2.8
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/ccfls/en/circ/returns.tmpl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.1.2.6&r2=1.1.2.1.2.7

Patches:
Index: circ/returns.pl
===================================================================
RCS file: /sources/koha/koha/circ/returns.pl,v
retrieving revision 1.37.2.6.2.7
retrieving revision 1.37.2.6.2.8
diff -u -b -r1.37.2.6.2.7 -r1.37.2.6.2.8
--- circ/returns.pl     23 Apr 2007 14:54:54 -0000      1.37.2.6.2.7
+++ circ/returns.pl     7 May 2007 13:53:01 -0000       1.37.2.6.2.8
@@ -68,6 +68,17 @@
 my $branch  = getbranch( $query,  $branches );
 my $printer = getprinter( $query, $printers );
 
+
+#
+# Today's date in format YYYY-MM-DD
+#
+my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = 
localtime(time);
+$year += 1900;
+$mon++;
+if ( $mon < 10 ) { $mon = '0' . $mon; }
+if ( $mday < 10 ) { $mday = '0' . $mday; }
+my $today = "$year-$mon-$mday";
+
 #
 # Some code to handle the error if there is no branch or printer setting.....
 #
@@ -159,6 +170,7 @@
         $returneditems{0}    = $barcode;
         $riborrowernumber{0} = $borrower->{'borrowernumber'};
         $riduedate{0}        = $iteminformation->{'date_due'};
+        
         my %input;
         $input{counter} = 0;
         $input{first}   = 1;
@@ -428,6 +440,10 @@
         $ri{color} = $color;
         my $barcode = $returneditems{$_};
         my $duedate = $riduedate{$_};
+        if ( $duedate lt $today ) {
+          $ri{overdue} = 1;
+        }
+
         my $overduetext;
         my $borrowerinfo;
         if ($duedate) {

Index: koha-tmpl/intranet-tmpl/ccfls/en/circ/returns.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/ccfls/en/circ/Attic/returns.tmpl,v
retrieving revision 1.1.2.1.2.6
retrieving revision 1.1.2.1.2.7
diff -u -b -r1.1.2.1.2.6 -r1.1.2.1.2.7
--- koha-tmpl/intranet-tmpl/ccfls/en/circ/returns.tmpl  23 Apr 2007 17:50:09 
-0000      1.1.2.1.2.6
+++ koha-tmpl/intranet-tmpl/ccfls/en/circ/returns.tmpl  7 May 2007 13:53:01 
-0000       1.1.2.1.2.7
@@ -32,6 +32,10 @@
        <br />
 
 <div id="main">
+<!-- TMPL_IF NAME="collectionItemNeedsTransferred" -->
+  <h3 class="alert">This item is part of a Rotating Collection and needs to be 
Transferred to <!-- TMPL_VAR NAME="collectionBranch" --></h3>
+<!-- /TMPL_IF -->
+
 <!-- TMPL_IF Name="found" -->
                <h3 class="alert">Reserve Found<!-- TMPL_IF Name="waiting" --> 
(item is already <em>consigned</em>) <!-- /TMPL_IF --></h3>
                <!-- TMPL_IF Name="waiting" -->
@@ -181,7 +185,16 @@
                   <th>Notes</th>
                 </tr>
                <!-- TMPL_LOOP Name="riloop" -->
-                       <tr><td><!-- TMPL_IF Name="duedate" --><!-- TMPL_IF 
Name="early" --><span class="error"><!-- /TMPL_IF --><!-- TMPL_VAR 
NAME="duedate" --><!-- TMPL_IF Name="early" --></span><!-- /TMPL_IF --><!-- 
TMPL_ELSE -->Not on Checked Out.<!-- /TMPL_IF --></td>
+                       <tr>
+                          <td>
+                            <!-- TMPL_IF Name="duedate" -->
+                              <!-- TMPL_IF Name="early" --><span 
class="error"><!-- /TMPL_IF -->
+                              <!-- TMPL_IF Name="overdue" --><span 
class="error"><!-- /TMPL_IF -->
+                                <!-- TMPL_VAR NAME="duedate" -->
+                              <!-- TMPL_IF Name="overdue" --></span><!-- 
/TMPL_IF -->
+                              <!-- TMPL_IF Name="early" --></span><!-- 
/TMPL_IF -->
+                            <!-- TMPL_ELSE -->Not on Checked Out.<!-- /TMPL_IF 
-->
+                          </td>
                        <td>
                        <a href="/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR 
Name="itembiblionumber" -->&type=intra"><!-- TMPL_VAR Name="barcode" 
--></a></td>
                        <td><!-- TMPL_VAR Name="itemtitle" --><br /></td>
@@ -196,7 +209,7 @@
                        Not on Checked Out.
                        <!-- /TMPL_IF -->
                        </td>
-                        <td><font color="red"><!-- TMPL_VAR name="itemnotes" 
--></font></td>
+                        <td><font color="red" size="-1"><!-- TMPL_VAR 
name="itemnotes" --></font></td>
                         </tr>
                <!-- /TMPL_LOOP -->
                </table>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]