Corrected: Fix for Bug 4529, columns on circ history all screwy
authorOwen Leonard <oleonard@myacpl.org>
Wed, 19 May 2010 13:46:12 +0000 (09:46 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 24 May 2010 18:55:44 +0000 (06:55 +1200)
- fix formatting of last renew date
- Add table zebra striping
- Other markup structure changes
- Revised template assumes that issues.branchcode == checkout library and displays
  that value instead of issues.issuingbranch (which is always empty, see Bug 2806)
  issues.branchcode seems to reflect the item's holding branch *after* having
  been updated as part of the checkout transaction.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
catalogue/issuehistory.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tmpl

index a6f12c3..0d774ea 100755 (executable)
@@ -67,6 +67,7 @@ foreach (@$issues){
        $_->{date_due}   = format_date($_->{date_due});
        $_->{issuedate}  = format_date($_->{issuedate});
        $_->{returndate} = format_date($_->{returndate});
+       $_->{lastreneweddate} = format_date($_->{lastreneweddate});
 }
 $template->param(
     total        => scalar @$issues,
index 7ca6c61..13b0e07 100644 (file)
        <div id="yui-main">
        <div class="yui-b">
 
-<h1>Checkout history for <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_IF NAME="author" -->(<!-- TMPL_VAR NAME="author" -->)<!-- /TMPL_IF --> </h1>
+<h1>Checkout history for <!-- TMPL_VAR NAME="title" escape="html" --></h1>
+<!-- TMPL_IF NAME="author" --><h3>by <!-- TMPL_VAR NAME="author" --></h3><!-- /TMPL_IF -->
 
 <div class="searchresults">
     <!-- TMPL_IF NAME="issues" -->
-        <p><b>Has been checked out <!-- TMPL_VAR NAME="total" --> times</b></p>
+        <h4>Checked out <!-- TMPL_VAR NAME="total" --> times</h4>
         <table>
-            <tr>
+            <thead><tr>
             <th>Patron</th>
             <th>Barcode</th>
-            <th>Library</th>
-            <th>Issuing library</th>
+            <th>Checked out from</th>
             <th>Renewed</th>
             <th>Checkout on</th>
             <th>Due date</th>
             <th>Checkin on</th>
-            </tr>
+            </tr></thead>
+            <tbody>
         <!-- TMPL_LOOP NAME="issues" -->
-            <tr>
-                <td><!-- TMPL_IF NAME="issuedate" -->
-                        <!-- TMPL_VAR NAME="issuedate" -->
-                    <!-- TMPL_ELSE -->
-                        &nbsp;
-                    <!-- /TMPL_IF --></td>
+        <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE
+--><tr><!-- /TMPL_UNLESS -->
                 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" --><!-- TMPL_IF NAME="firstname" -->, <!-- TMPL_VAR NAME="firstname" --><!-- /TMPL_IF --></a></td>
                 <td><!-- TMPL_IF NAME="barcode" -->
                         <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->"><!-- TMPL_VAR NAME="barcode" --></a>
                     <!-- TMPL_ELSE -->
                         &nbsp;
                     <!-- /TMPL_IF --></td>
-                <td><!-- TMPL_IF NAME="issuingbranch" -->
-                        <!-- TMPL_VAR NAME="issuingbranch" -->
-                    <!-- TMPL_ELSE -->
-                        &nbsp;
-                    <!-- /TMPL_IF --></td>
                 <td><!-- TMPL_IF NAME="renewals"-->
-                        YES<br />
-                        <small>
-                            <!-- TMPL_IF NAME="lastreneweddate" -->
-                                last on: <!-- TMPL_VAR NAME="lastreneweddate" -->
+                        Yes<!-- TMPL_IF NAME="lastreneweddate" -->, <small>last on: <!-- TMPL_VAR NAME="lastreneweddate" --></small>
                             <!-- /TMPL_IF -->
-                        </small>
                     <!-- TMPL_ELSE -->
-                        NO
+                        No
+                    <!-- /TMPL_IF --></td>
+                <td><!-- TMPL_IF NAME="issuedate" -->
+                        <!-- TMPL_VAR NAME="issuedate" -->
+                    <!-- TMPL_ELSE -->
+                        &nbsp;
                     <!-- /TMPL_IF --></td>
                 <td><!-- TMPL_IF NAME="date_due" -->
                         <!-- TMPL_VAR NAME="date_due" -->
                     <!-- /TMPL_IF --></td>
            </tr>
         <!-- /TMPL_LOOP -->
+        </tbody>
                </table>
     <!-- TMPL_ELSE -->
-        <p>
-        <b><!-- TMPL_VAR NAME="title" escape="html" -->(<!-- TMPL_VAR NAME="author" -->)</b> <span class="problem">has never been checked out.</span></p>
+        <div class="dialog message"><p>
+        <b><!-- TMPL_VAR NAME="title" escape="html" --><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></b> has never been checked out.</p></div>
 
     <!-- /TMPL_IF -->
 </div>