[Koha-patches] [PATCH] Bug 8078 - my summary showing contents of incorrect tab

Owen Leonard oleonard at myacpl.org
Fri May 11 21:30:31 CEST 2012


This patch moves the holdings tab content to the correct
position sequentially with regard to the order of the
tabs themselves. My guess is that the jQuery upgrade has
something to do with this change but I'm not sure why
(probably something in our aging tabs plugin which works
differently with the new jQuery version).

Making the sequence of the tab contents match the sequence
of the tabs seems to fix the problem.
---
 .../prog/en/modules/members/moremember.tt          |   64 ++++----
 koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt   |  165 ++++++++++----------
 2 files changed, 114 insertions(+), 115 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
index 326de06..d2717ef 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -288,7 +288,7 @@ function validate1(date) {
 [% FOREACH attribute IN attributes_loop %]
     [% IF attribute.class %]
         <h4>[% attribute.lib %]</h4>
-        <table id=aai_[% attribute.class %]>
+        <table id="aai_[% attribute.class %]">
     [% ELSE %]
         <table id="aai">
     [% END %]
@@ -407,36 +407,14 @@ function validate1(date) {
 </div>
 </div>
 
-<div id="finesholdsissues" class="toptabs">
-	<ul>
-		<li><a href="/cgi-bin/koha/members/moremember.pl#checkedout">[% issueloop.size %] Checkout(s)</a></li>
-    [% IF relissueloop.size %]
-        <li><a href="/cgi-bin/koha/members/moremember.pl#relissues">Relatives' Checkouts</a></li>
-    [% END %]
-		<li><a href="/cgi-bin/koha/members/moremember.pl#finesandcharges">Fines &amp; Charges</a></li>
-		<li>[% IF ( countreserv ) %]
-            <a href="/cgi-bin/koha/members/moremember.pl#onhold">[% countreserv %] Hold(s)</a>
-    [% ELSE %]
-            <a href="/cgi-bin/koha/members/moremember.pl#onhold">0 Holds</a>
-    [% END %]</li>
-	</ul>
-	
-<div id="finesandcharges">
-    [% IF ( totaldue_raw ) %]
-        <p>Total due: [% totaldue %]</p>
-    [% ELSE %]
-        <p>No outstanding charges</p>
-    [% END %]
-</div>
-
     <form action="/cgi-bin/koha/reserve/renewscript.pl" method="post" class="checkboxed">
     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
-	<input type="hidden" name="branch" value="[% branch %]" />
+    <input type="hidden" name="branch" value="[% branch %]" />
 <div id="checkedout">
     [% IF ( issueloop ) %]
     <table id="issuest">
     <thead>
-		<tr>
+        <tr>
             <th scope="col">Due date</th>
             <th scope="col">Title</th>
             <th scope="col">Item type</th>
@@ -458,7 +436,7 @@ function validate1(date) {
           <tr>
           [% END %]
           [% IF ( issueloo.red ) %]
-		      <td class="od">
+              <td class="od">
           [% ELSE %]
             <td>
           [% END %]
@@ -474,7 +452,7 @@ function validate1(date) {
 <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( issueloo.itemtype_image ) %]<img src="[% issueloo.itemtype_image %]" alt="" />[% END %][% END %][% issueloo.itemtype_description %]</td>
             <td>[% issueloo.issuedate %]</td>
             <td>[% issueloo.issuingbranchname %]</td>
-	        <td>[% issueloo.itemcallnumber %]</td>
+            <td>[% issueloo.itemcallnumber %]</td>
             <td>[% issueloo.charge %]</td>
             <td>[% issueloo.replacementprice %]</td>
       [% IF ( issueloo.renew_failed ) %]
@@ -495,9 +473,9 @@ function validate1(date) {
                 [% IF ( issueloo.norenew_reason_on_reserve ) %]
                 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% issueloo.biblionumber %]">On Hold</a>
                 [% END %]
-				    [% IF ( issueloo.norenew_reason_too_many ) %]
+                    [% IF ( issueloo.norenew_reason_too_many ) %]
                         Not renewable
-				    [% END %]
+                    [% END %]
                 [% IF ( issueloo.can_confirm ) %]
                     </span>
                 [% END %]
@@ -545,7 +523,7 @@ function validate1(date) {
 <div id="relissues">
  <table id="relissuest">
     <thead>
-	<tr>
+    <tr>
             <th scope="col">Due date</th>
             <th scope="col">Title</th>
             <th scope="col">Item type</th>
@@ -585,15 +563,37 @@ function validate1(date) {
         <td>[% relissueloo.itemcallnumber %]</td>
         <td>[% relissueloo.charge %]</td>
         <td>[% relissueloo.replacementprice %]</td>
-	    <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissueloo.borrowernumber %]">[% relissueloo.firstname %] [% relissueloo.surname %] ([% relissueloo.cardnumber %])</a></td>
+        <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissueloo.borrowernumber %]">[% relissueloo.firstname %] [% relissueloo.surname %] ([% relissueloo.cardnumber %])</a></td>
         </tr>
   [% END %]
         </tbody>
        </table>
-	</div>
+    </div>
 [% END %]
     </form>
+
+<div id="finesholdsissues" class="toptabs">
+	<ul>
+		<li><a href="/cgi-bin/koha/members/moremember.pl#checkedout">[% issueloop.size %] Checkout(s)</a></li>
+    [% IF relissueloop.size %]
+        <li><a href="/cgi-bin/koha/members/moremember.pl#relissues">Relatives' Checkouts</a></li>
+    [% END %]
+		<li><a href="/cgi-bin/koha/members/moremember.pl#finesandcharges">Fines &amp; Charges</a></li>
+		<li>[% IF ( countreserv ) %]
+            <a href="/cgi-bin/koha/members/moremember.pl#onhold">[% countreserv %] Hold(s)</a>
+    [% ELSE %]
+            <a href="/cgi-bin/koha/members/moremember.pl#onhold">0 Holds</a>
+    [% END %]</li>
+	</ul>
 	
+<div id="finesandcharges">
+    [% IF ( totaldue_raw ) %]
+        <p>Total due: [% totaldue %]</p>
+    [% ELSE %]
+        <p>No outstanding charges</p>
+    [% END %]
+</div>
+
 <div id="onhold">
 [% IF ( reservloop ) %]
 <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
index b635aec..2b88c7a 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
@@ -120,77 +120,15 @@ $.tablesorter.addParser({
             [% IF ( waiting_count ) %][% IF ( BORROWER_INF.atdestination ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-waiting">Waiting</a></li>[% END %][% END %]
             [% IF ( reserves_count ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-holds">Holds</a></li>[% END %]
         </ul>
-        
-[% IF ( OPACFinesTab ) %]
-        <!-- FINES BOX -->
-        [% IF ( BORROWER_INF.amountoverfive ) %]
-            <div id="opac-user-fines"> <h3>Fines and charges</h3>
-            <table>
-                <tr><th colspan="2">Amount</th></tr>
-                <tr>
-                    <td>You currently owe fines and charges amounting to:</td>
-                    <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
-                </tr>
-            </table></div>
-        [% END %]
-
-        [% IF ( BORROWER_INF.amountoverzero ) %]
-           <div id="opac-user-fines"> <h3>Fines and charges</h3>
-            <table>
-                <tr><th colspan="2">Amount</th></tr>
-                <tr><td>You currently owe fines and charges amounting to:</td>
-                <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td></tr>
-            </table></div>
-        [% END %]
-
-        [% IF ( BORROWER_INF.amountlessthanzero ) %]
-          <div id="opac-user-fines">  <h3>Credits</h3>
-            <table>
-            <tr><th colspan="2">Amount</th></tr>
-            <tr><td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td></tr>
-            </table></div>
-        [% END %]
-[% END %]
-    
-    [% END %]
-
-    [% IF ( waiting_count ) %]
-    [% IF ( atdestination ) %]
-    <div id="opac-user-waiting">
-        <table id="waitingt">
-            <caption>Holds waiting</caption>
-           <thead> <tr>
-                <th colspan="2" class="{sorter:'articles'}">Title</th>
-                <th>Hold date</th>
-                <th>Pick up library</th>
-            </tr></thead>
-            <tbody>[% FOREACH WAITIN IN WAITING %]
-                <tr>
-                    <td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td>
-                    <td><a href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]">
-                            [% WAITIN.waiting_title %]
-                        </a><span class="item-details">
-                            [% WAITIN.author %]
-                        </span></td>
-                    <td>[% WAITIN.reservedate | $KohaDates %]</td>
-                    <td>[% IF ( WAITIN.atdestination ) %]<strong>Waiting</strong> at [% WAITIN.branch %]
-                        [% ELSE %]
-                        In transit from [% WAITIN.holdingbranch %] to [% WAITIN.branch %]
-                        [% END %]</td>
-                </tr>
-            [% END %]</tbody>
-        </table></div>
-        [% END %]
-    [% END %]
 
     <div id="opac-user-checkouts">[% IF ( issues_count ) %]
         <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
-	<input type="hidden" name="borrowernumber" value="[% borrowernumber %]">
-	<input type="hidden" name="from" value="opac_user" />
+    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]">
+    <input type="hidden" name="from" value="opac_user" />
         <table id="checkoutst">
         <caption>[% issues_count %] Item(s) checked out</caption>
        <thead><tr>
-		[% IF ( JacketImages ) %]<th class="{sorter: false}">&nbsp;</th>[% END %]
+        [% IF ( JacketImages ) %]<th class="{sorter: false}">&nbsp;</th>[% END %]
         <th class="{sorter:'articles'}">Title</th>
         <th>Due</th>
         [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
@@ -207,15 +145,15 @@ $.tablesorter.addParser({
         [% END %]
         </tr></thead>
         <tbody>
-		<!-- FIXME: the styling for highlight overrides the overdue red background,
-				so currently we don't use this conditional as the first thing inside the LOOP:
+        <!-- FIXME: the styling for highlight overrides the overdue red background,
+                so currently we don't use this conditional as the first thing inside the LOOP:
         [% UNLESS ( __odd__ ) %]
            <tr[% IF ( overdue ) %] class="overdue"[% END %]>
         [% ELSE %]
            <tr class="[% IF ( overdue ) %]overdue [% END %]highlight">
         [% END %]
-		-->
-		[% FOREACH ISSUE IN ISSUES %]
+        -->
+        [% FOREACH ISSUE IN ISSUES %]
         [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
 
 [% IF ( JacketImages ) %]<td class="jacketcell">
@@ -259,27 +197,88 @@ $.tablesorter.addParser({
             </tr>
         [% END %]</tbody>
         </table>
-	   [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
-		<input type="submit" value="Renew Selected" />
-		[% END %]
-		</form>
+       [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
+        <input type="submit" value="Renew Selected" />
+        [% END %]
+        </form>
         [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
-		<form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
-			<input type="hidden" name="from" value="opac_user" />
-			<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
-			[% FOREACH ISSUE IN ISSUES %]
-			<input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
-			[% END %]
-			<input type="submit" value="Renew All" />
-		</form>
-		[% END %]
+        <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
+            <input type="hidden" name="from" value="opac_user" />
+            <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+            [% FOREACH ISSUE IN ISSUES %]
+            <input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
+            [% END %]
+            <input type="submit" value="Renew All" />
+        </form>
+        [% END %]
     [% ELSE %]
         <table>
             <tr><td>You have nothing checked out</td></tr>
         </table>
     [% END %]</div>
+
+[% IF ( OPACFinesTab ) %]
+        <!-- FINES BOX -->
+        [% IF ( BORROWER_INF.amountoverfive ) %]
+            <div id="opac-user-fines"> <h3>Fines and charges</h3>
+            <table>
+                <tr><th colspan="2">Amount</th></tr>
+                <tr>
+                    <td>You currently owe fines and charges amounting to:</td>
+                    <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
+                </tr>
+            </table></div>
+        [% END %]
+
+        [% IF ( BORROWER_INF.amountoverzero ) %]
+           <div id="opac-user-fines"> <h3>Fines and charges</h3>
+            <table>
+                <tr><th colspan="2">Amount</th></tr>
+                <tr><td>You currently owe fines and charges amounting to:</td>
+                <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td></tr>
+            </table></div>
+        [% END %]
+
+        [% IF ( BORROWER_INF.amountlessthanzero ) %]
+          <div id="opac-user-fines">  <h3>Credits</h3>
+            <table>
+            <tr><th colspan="2">Amount</th></tr>
+            <tr><td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td></tr>
+            </table></div>
+        [% END %]
+[% END %]
     
-    
+    [% END %]
+
+    [% IF ( waiting_count ) %]
+    [% IF ( atdestination ) %]
+    <div id="opac-user-waiting">
+        <table id="waitingt">
+            <caption>Holds waiting</caption>
+           <thead> <tr>
+                <th colspan="2" class="{sorter:'articles'}">Title</th>
+                <th>Hold date</th>
+                <th>Pick up library</th>
+            </tr></thead>
+            <tbody>[% FOREACH WAITIN IN WAITING %]
+                <tr>
+                    <td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td>
+                    <td><a href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]">
+                            [% WAITIN.waiting_title %]
+                        </a><span class="item-details">
+                            [% WAITIN.author %]
+                        </span></td>
+                    <td>[% WAITIN.reservedate | $KohaDates %]</td>
+                    <td>[% IF ( WAITIN.atdestination ) %]<strong>Waiting</strong> at [% WAITIN.branch %]
+                        [% ELSE %]
+                        In transit from [% WAITIN.holdingbranch %] to [% WAITIN.branch %]
+                        [% END %]</td>
+                </tr>
+            [% END %]</tbody>
+        </table></div>
+        [% END %]
+    [% END %]
+
 [% IF ( overdues_count ) %]
 <div id="opac-user-overdues"><table id="overduest">
 <caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
-- 
1.7.9.5



More information about the Koha-patches mailing list