[Koha-patches] [PATCH] Revised: New system preference UseTablesortForCirc

Owen Leonard oleonard at myacpl.org
Wed Sep 8 16:35:06 CEST 2010


This system preference allows the librarian to toggle on or off whether the JQuery tablesort is used on the
circ/circulation.pl page.  For patrons with many checkouts, this sort may cause very slow page loading (and
therefore slow circulation transaction time), depending on the browser and local machine used.  Staff can
still see a sortable list of current checkouts on the members/moremember.pl page.

My revision prevents the template from including *any* tablesorter code if the
preference is feature is turned off: both the circulation list and
the holds list will have no jQuery tablesorter.
---
 circ/circulation.pl                                |    4 +
 installer/data/mysql/en/mandatory/sysprefs.sql     |    1 +
 installer/data/mysql/updatedatabase.pl             |    7 +
 .../en/modules/admin/preferences/circulation.pref  |    6 +
 .../prog/en/modules/circ/circulation.tmpl          |  340 ++++++++++----------
 5 files changed, 188 insertions(+), 170 deletions(-)

diff --git a/circ/circulation.pl b/circ/circulation.pl
index 4b67920..4b16462 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -109,6 +109,10 @@ if (C4::Context->preference("DisplayClearScreenButton")) {
     $template->param(DisplayClearScreenButton => 1);
 }
 
+if (C4::Context->preference("UseTablesortForCirc")) {
+    $template->param(UseTablesortForCirc => 1);
+}
+
 my $barcode        = $query->param('barcode') || '';
 $barcode =~  s/^\s*|\s*$//g; # remove leading/trailing whitespace
 
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
index 8bfed37..9cbc923 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -281,6 +281,7 @@ INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('A
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckID','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','','free');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckPass','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','','free');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('soundon','0','Enable circulation sounds during checkin and checkout in the staff interface.  Not supported by all web browsers yet.','','YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseTablesortForCirc','0','If on, use the JQuery tablesort function on the list of current borrower checkouts on the circulation page.  Note that the use of this function may slow down circ for patrons with may checkouts.','','YesNo');
 INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'PrintNoticesMaxLines', '0', '', 'If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.', 'Integer' );
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ILS-DI','0','Enables ILS-DI services at OPAC.','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ILS-DI:Authorized_IPs','','.','Restricts usage of ILS-DI to some IPs','Free');
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index a0b5c4a..6c6b9e3 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3701,6 +3701,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
+$DBversion = "3.01.00.XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseTablesortForCirc','0','If on, use the JQuery tablesort function on the list of current borrower checkouts on the circulation page. Note that the use of this function may slow down circ for patrons with may checkouts.','','YesNo');");
+    print "Upgrade to $DBversion done (Add UseTablesortForCirc syspref)\n";
+    SetVersion ($DBversion);
+}
+
 =item DropAllForeignKeys($table)
 
   Drop all foreign keys of the table $table
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
index ab92915..c60afbe 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
@@ -32,6 +32,12 @@ Circulation:
                   desc: latest to earliest
             - due date.
         -
+            - pref: UseTablesortForCirc
+              choices:
+                  yes: "Enable"
+                  no: "Don't enable"
+            - "the sorting of current patron checkouts on the circulation screen. <br/>NOTE: Enabling this function may slow down circulation time for patrons with many checkouts."
+        -
             - pref: soundon
               choices: 
                  yes: "Enable"
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
index 980d195..c8f4e6a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
@@ -5,33 +5,33 @@
 (<!-- TMPL_VAR NAME="cardnumber" -->)
 <!-- /TMPL_IF --></title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+<!-- TMPL_IF NAME="UseTablesortForCirc" --><script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script><!-- /TMPL_IF -->
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
 <script type="text/javascript">
 //<![CDATA[
-$.tablesorter.addParser({
+<!-- TMPL_IF NAME="UseTablesortForCirc" -->$.tablesorter.addParser({
     id: 'articles',
     is: function(s) {return false;  },
     format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
     type: 'text'
-});
+});<!-- /TMPL_IF -->
 <!-- TMPL_UNLESS NAME="borrowernumber" --><!-- TMPL_UNLESS NAME="CGIselectborrower" -->window.onload=function(){ $('#findborrower').focus(); };<!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS -->
-	 $(document).ready(function() {
- 		$('#patronlists > ul').tabs();
-		$.tablesorter.defaults.widgets = ['zebra'];
-		$("#issuest").tablesorter({<!-- TMPL_IF NAME="dateformat_metric" -->
-		dateFormat: 'uk',<!-- /TMPL_IF -->
-		headers: { 1: { sorter: 'articles' },5: { sorter: false },6:{sorter:false},7:{sorter:false},8:{sorter:false}}
-		});
-		$("#issuest").bind("sortEnd",function() {
-        	$("#previous").parents("tr").remove();  // 'previous checkouts' header chokes table sorter
-	    });
-		$("#holdst").tablesorter({<!-- TMPL_IF NAME="dateformat_metric" -->
-		dateFormat: 'uk',<!-- /TMPL_IF -->
-			sortList: [[0,0]],
-			headers: { 1: { sorter: 'articles' }}
-		});
-
+     $(document).ready(function() {
+        $('#patronlists > ul').tabs();
+        <!-- TMPL_IF NAME="UseTablesortForCirc" -->$.tablesorter.defaults.widgets = ['zebra'];
+        $("#issuest").tablesorter({<!-- TMPL_IF NAME="dateformat_metric" -->
+        dateFormat: 'uk',<!-- /TMPL_IF -->
+        headers: { 1: { sorter: 'articles' },5: { sorter: false },6:{sorter:false},7:{sorter:false},8:{sorter:false}}
+        });
+        $("#issuest").bind("sortEnd",function() {
+            $("#previous").parents("tr").remove();  // 'previous checkouts' header chokes table sorter
+        });
+
+        $("#holdst").tablesorter({<!-- TMPL_IF NAME="dateformat_metric" -->
+        dateFormat: 'uk',<!-- /TMPL_IF -->
+            sortList: [[0,0]],
+            headers: { 1: { sorter: 'articles' }}
+        });<!-- /TMPL_IF -->
         <!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
         $( '#override_limit' ).click( function () {
             if ( this.checked ) {
@@ -43,24 +43,24 @@ $.tablesorter.addParser({
         <!-- /TMPL_IF -->
 
 var allcheckboxes = $(".checkboxed");
-	$("#renew_all").click(function(){
-		$(allcheckboxes).checkCheckboxes(":input[name*=items]"); 
-		$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]");
-	});
-	$("#CheckAllitems").click(function(){
-		$(allcheckboxes).checkCheckboxes(":input[name*=items]");
-		$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false;
-	});
+    $("#renew_all").click(function(){
+        $(allcheckboxes).checkCheckboxes(":input[name*=items]"); 
+        $(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]");
+    });
+    $("#CheckAllitems").click(function(){
+        $(allcheckboxes).checkCheckboxes(":input[name*=items]");
+        $(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false;
+    });
     $("#CheckNoitems").click(function(){
-		$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false;
-	});
-	$("#CheckAllreturns").click(function(){
-		$(allcheckboxes).checkCheckboxes(":input[name*=barcodes]");
-		$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false;
-	});
+        $(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false;
+    });
+    $("#CheckAllreturns").click(function(){
+        $(allcheckboxes).checkCheckboxes(":input[name*=barcodes]");
+        $(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false;
+    });
     $("#CheckNoreturns" ).click(function(){
-		$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false;
-	});
+        $(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false;
+    });
 
     <!-- TMPL_IF NAME="CAN_user_circulate_override_renewals" -->
     <!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
@@ -73,27 +73,27 @@ var allcheckboxes = $(".checkboxed");
     } ).attr( 'checked', false );
     <!-- /TMPL_IF -->
     <!-- /TMPL_IF -->
-	$("td").click(function(e){
-		if(e.target.tagName.toLowerCase() == 'td'){
+    $("td").click(function(e){
+        if(e.target.tagName.toLowerCase() == 'td'){
            $(this).find("input:checkbox").each( function() {
                $(this).attr('checked', !$(this).attr('checked'));
-			   if($(this).attr('checked')){
+               if($(this).attr('checked')){
                     $(this).parent().siblings().find("input:checkbox").each(function(){
                        if($(this).attr('checked')){ $(this).attr('checked',''); }
                    });
-			   }
+               }
            });
-		}
-	});
-	$("#messages ul").after("<a href=\"#\" id=\"addmessage\">"+_("Add a new message")+"</a>");
-	$("#borrower_messages .cancel").click(function(){
-		$("#add_message_form").hide();
+        }
+    });
+    $("#messages ul").after("<a href=\"#\" id=\"addmessage\">"+_("Add a new message")+"</a>");
+    $("#borrower_messages .cancel").click(function(){
+        $("#add_message_form").hide();
         $("#addmessage").show();
-	});
-	$("#addmessage").click(function (){
+    });
+    $("#addmessage").click(function (){
         $(this).hide();
-		$("#add_message_form").show();
-	 });
+        $("#add_message_form").show();
+     });
  });
 function uncheck_sibling(me){
 nodename=me.getAttribute("name");
@@ -147,14 +147,14 @@ function refocus(calendar) {
 <div id="doc" class="yui-t7">
 
    <div id="bd">
-	<div id="yui-main">
-	<div class="yui-g">
+    <div id="yui-main">
+    <div class="yui-g">
 <!-- TMPL_ELSE -->
 <div id="doc3" class="yui-t2">
 
    <div id="bd">
-	<div id="yui-main">
-	<div class="yui-b">
+    <div id="yui-main">
+    <div class="yui-b">
 <!-- /TMPL_IF -->
 
 <!-- TMPL_IF NAME="borrowernumber" -->
@@ -166,7 +166,7 @@ function refocus(calendar) {
 <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
 <fieldset id="borrower_messages" class="brief">
 <legend>Leave a message</legend>
-	<ol>
+    <ol>
     <li>
             <label for="message_type">Add a message for:</label>
           <select name="message_type" id="message_type">
@@ -188,7 +188,7 @@ function refocus(calendar) {
     <li>
         <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
     </li>
-	</ol>
+    </ol>
     <fieldset class="action">
         <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
     </fieldset>
@@ -344,8 +344,8 @@ function refocus(calendar) {
         <!-- TMPL_IF NAME="USERBLOCKEDREMAINING" -->
             <li>Patron has had overdue items and is blocked for <!-- TMPL_VAR NAME="USERBLOCKEDREMAINING" --> day(s).</li>
         <!-- /TMPL_IF -->
-	
-	    <!-- TMPL_IF NAME="USERBLOCKEDOVERDUE" -->
+    
+        <!-- TMPL_IF NAME="USERBLOCKEDOVERDUE" -->
             <li>Patron has <!-- TMPL_VAR NAME="USERBLOCKEDOVERDUE" --> overdue item(s).  Check out anyway?</li>
         <!-- /TMPL_IF -->
         </ul>
@@ -411,26 +411,26 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" name="mainform">
 <fieldset id="circ_circulation_issue">
     <!-- TMPL_IF NAME="DisplayClearScreenButton" -->
-	    <input type=button value="Clear Screen" onClick="window.location = '/cgi-bin/koha/circ/circulation.pl'">
+        <input type=button value="Clear Screen" onClick="window.location = '/cgi-bin/koha/circ/circulation.pl'">
     <!-- /TMPL_IF -->
 
     <label for="barcode">Checking out to <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->) </label>
-	<div class="hint">Enter item barcode:</div>
+    <div class="hint">Enter item barcode:</div>
 
     <!-- TMPL_IF NAME="NEEDSCONFIRMATION" -->
-	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
+        <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
     <!-- TMPL_ELSE -->
-	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
+        <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
     <!-- /TMPL_IF -->
     <input type="submit" value="Check Out" />
 
     <!-- TMPL_IF NAME="SpecifyDueDate" --><div class="date-select">
         <div class="hint">Specify Due Date <!-- TMPL_INCLUDE NAME="date-format.inc" -->: </div>
-		<!-- TMPL_IF NAME="duedatespec" --><input type="text" size="10" id="duedatespec" name="duedatespec" value="<!-- TMPL_VAR NAME="duedatespec" -->" /><!-- TMPL_ELSE --><input type="text" size="10" id="duedatespec" name="duedatespec" value="" />
+        <!-- TMPL_IF NAME="duedatespec" --><input type="text" size="10" id="duedatespec" name="duedatespec" value="<!-- TMPL_VAR NAME="duedatespec" -->" /><!-- TMPL_ELSE --><input type="text" size="10" id="duedatespec" name="duedatespec" value="" />
 <!-- /TMPL_IF -->
-		<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar"  border="0" id="CalendarDueDate" style="cursor: pointer;" />
+        <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar"  border="0" id="CalendarDueDate" style="cursor: pointer;" />
              <script language="JavaScript" type="text/javascript">
-			 //<![CDATA[
+             //<![CDATA[
                    function validate1(date) {
                          var today = new Date();
                          if ( date < today ) {
@@ -443,7 +443,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
                         $('#barcode').focus();
                         calendar.hide();
                      };
-				//#TODO - ADD syspref (AllowPostDatedCheckouts).
+                //#TODO - ADD syspref (AllowPostDatedCheckouts).
                      Calendar.setup(
                           {
                              inputField : "duedatespec",
@@ -454,7 +454,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
                              onClose : refocus
                            }
                         );
-				//]]>
+                //]]>
                  </script>
 
           <label for="stickyduedate"> Remember for Session:</label>
@@ -480,127 +480,127 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
 <!-- TMPL_IF NAME="noissues" --><div><!-- TMPL_ELSE --><div class="yui-u"><!-- /TMPL_IF -->
 
     <!-- TMPL_IF NAME="flagged" -->
-		<!-- TMPL_IF NAME="noissues" -->
-		 <h4>Checking out to <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h4>
+        <!-- TMPL_IF NAME="noissues" -->
+         <h4>Checking out to <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h4>
         <div id="circmessages" class="circmessage warning">
-		<!-- TMPL_ELSE -->
+        <!-- TMPL_ELSE -->
         <div id="circmessages" class="circmessage attention">
-		<!-- /TMPL_IF -->
+        <!-- /TMPL_IF -->
 
-		<h3><!-- TMPL_IF NAME="noissues" -->Cannot Check Out!<!-- TMPL_ELSE -->Attention:<!-- /TMPL_IF --></h3>
-		<ul>
+        <h3><!-- TMPL_IF NAME="noissues" -->Cannot Check Out!<!-- TMPL_ELSE -->Attention:<!-- /TMPL_IF --></h3>
+        <ul>
 
-			<!-- TMPL_IF NAME = "warndeparture" -->
-			<li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
-			Patron's card expires on <!-- TMPL_VAR NAME="expiry" --> <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Edit Details</a>
+            <!-- TMPL_IF NAME = "warndeparture" -->
+            <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
+            Patron's card expires on <!-- TMPL_VAR NAME="expiry" --> <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Edit Details</a>
 
-			</li>
-			<!-- /TMPL_IF -->
+            </li>
+            <!-- /TMPL_IF -->
 
-			<!-- TMPL_IF NAME="returnbeforeexpiry" -->
-			 <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
-			 expiry date is before the date due, the date due will be set to the expiry date
-			 </li>
-			<!-- /TMPL_IF -->
+            <!-- TMPL_IF NAME="returnbeforeexpiry" -->
+             <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
+             expiry date is before the date due, the date due will be set to the expiry date
+             </li>
+            <!-- /TMPL_IF -->
 
-			<!-- TMPL_IF NAME = "expired" -->
-			<li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
-			Patron's card expired on <!-- TMPL_VAR NAME="expiry" --> <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Edit Details</a>
+            <!-- TMPL_IF NAME = "expired" -->
+            <li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
+            Patron's card expired on <!-- TMPL_VAR NAME="expiry" --> <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Edit Details</a>
 
-			</li>
-			<!-- /TMPL_IF -->
+            </li>
+            <!-- /TMPL_IF -->
 
             <!-- TMPL_IF NAME="gna" -->
-			<li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
-			<!-- /TMPL_IF -->
+            <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
+            <!-- /TMPL_IF -->
 
             <!-- TMPL_IF NAME="lost" -->
-			<li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
-			<!-- /TMPL_IF -->
+            <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
+            <!-- /TMPL_IF -->
 
             <!-- TMPL_IF NAME="dbarred" --><li class="blocker">
                <span class="circ-hlt"> Restricted:</span> Patron's account is restricted <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&amp;destination=circ&amp;status=0">Lift restriction</a>
 </li><!-- /TMPL_IF -->
 
-        	<!-- TMPL_IF name="odues" --><li><!-- TMPL_IF name="nonreturns" --><span class="circ-hlt">Overdues:</span> Patron has <span class="circ-hlt">ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a><!-- /TMPL_IF --></li>
+            <!-- TMPL_IF name="odues" --><li><!-- TMPL_IF name="nonreturns" --><span class="circ-hlt">Overdues:</span> Patron has <span class="circ-hlt">ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a><!-- /TMPL_IF --></li>
             <!-- /TMPL_IF -->
 
-        	<!-- TMPL_IF NAME="charges" -->
+            <!-- TMPL_IF NAME="charges" -->
                 <!-- TMPL_IF NAME="charges_is_blocker" -->
-			        <li class="blocker">
+                    <li class="blocker">
                 <!-- TMPL_ELSE -->
-			        <li>
+                    <li>
                 <!-- /TMPL_IF -->
             <span class="circ-hlt">Fines:</span> Patron has  <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->">Outstanding fines<!-- TMPL_IF NAME="chargesamount" --> of <!-- TMPL_VAR NAME="chargesamount" --><!-- /TMPL_IF --></a>.
                 <!-- TMPL_IF NAME="charges_is_blocker" -->
                     Checkouts are blocked because fine balance is over the limit.
                 <!-- /TMPL_IF -->
             Make <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->">Payment</a></li>
-			<!-- /TMPL_IF -->
+            <!-- /TMPL_IF -->
 
-        	<!-- TMPL_IF NAME="credits" -->
-			<li>
+            <!-- TMPL_IF NAME="credits" -->
+            <li>
                 <span class="circ-hlt">Credits:</span> Patron has a credit<!-- TMPL_IF NAME="creditsamount" --> of <!-- TMPL_VAR name="creditsamount" --><!-- /TMPL_IF -->
             </li>
-			<!-- /TMPL_IF -->
+            <!-- /TMPL_IF -->
 
 
 
-			</ul>
+            </ul>
         </div>
 
-			<!-- TMPL_IF NAME="WaitingReserveLoop" -->
-			<div id="holdswaiting" class="circmessage">
-		    <h4>Holds waiting:</h4>
-			        <!-- TMPL_LOOP NAME="WaitingReserveLoop" -->
-			            <ul>
-			                <li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a> (<!-- TMPL_VAR NAME="itemtype"-->), <!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author"--><!-- /TMPL_IF --> Hold placed on <!-- TMPL_VAR NAME="reservedate"-->.
-			            <!-- TMPL_IF NAME="waitingat" -->
-			                <br /><!-- TMPL_IF NAME="waitinghere" --><strong class="waitinghere"><!-- TMPL_ELSE --><strong><!-- /TMPL_IF -->Waiting at <!-- TMPL_VAR NAME="waitingat" --></strong>
-			            <!-- /TMPL_IF -->
-			                </li>
-			            </ul>
-			    <!-- /TMPL_LOOP -->
-			</div>
-			<!-- /If WaitingReserveLoop --><!-- /TMPL_IF -->
-	<!-- TMPL_IF name="notes" -->
-			<div id="circnotes" class="circmessage">
-			<h4>Notes:</h4>
+            <!-- TMPL_IF NAME="WaitingReserveLoop" -->
+            <div id="holdswaiting" class="circmessage">
+            <h4>Holds waiting:</h4>
+                    <!-- TMPL_LOOP NAME="WaitingReserveLoop" -->
+                        <ul>
+                            <li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a> (<!-- TMPL_VAR NAME="itemtype"-->), <!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author"--><!-- /TMPL_IF --> Hold placed on <!-- TMPL_VAR NAME="reservedate"-->.
+                        <!-- TMPL_IF NAME="waitingat" -->
+                            <br /><!-- TMPL_IF NAME="waitinghere" --><strong class="waitinghere"><!-- TMPL_ELSE --><strong><!-- /TMPL_IF -->Waiting at <!-- TMPL_VAR NAME="waitingat" --></strong>
+                        <!-- /TMPL_IF -->
+                            </li>
+                        </ul>
+                <!-- /TMPL_LOOP -->
+            </div>
+            <!-- /If WaitingReserveLoop --><!-- /TMPL_IF -->
+    <!-- TMPL_IF name="notes" -->
+            <div id="circnotes" class="circmessage">
+            <h4>Notes:</h4>
             <p><span class="circ-hlt"><!-- TMPL_VAR name="notesmsg" --></span></p>
-			</div>
+            </div>
 
 
     <!-- /If notes --><!-- /TMPL_IF -->
 
-	<div id="messages" class="circmessage">
-		<h4>Messages:</h4>
-		<ul>
-			<!--TMPL_LOOP NAME="lib_messages_loop" -->
-				<li>
-					<span class="circ-hlt">
-						<!--TMPL_VAR NAME="message_date_formatted"-->
-						<!--TMPL_VAR NAME="branchcode"-->
-						<i>"<!--TMPL_VAR NAME="message"-->"</i>
-					</span>
-					<!-- TMPL_IF NAME="can_delete" -->
-						<a href="/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&amp;borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->">[Delete]</a>
-					<!-- TMPL_ELSE -->
-						<!-- TMPL_IF NAME="all_messages_del" -->
-							<a href="/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&amp;borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->">[Delete]</a>
-						<!-- /TMPL_IF -->
-					<!-- /TMPL_IF -->
-				</li>
-			<!-- /TMPL_LOOP -->
-			<!--TMPL_LOOP NAME="bor_messages_loop" -->
-				<li><span class=""><!--TMPL_VAR NAME="message_date_formatted"--> <!--TMPL_VAR NAME="branchcode"--> <i>"<!--TMPL_VAR NAME="message"-->"</i></span> <!-- TMPL_IF NAME="can_delete" --><a href="/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&amp;borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->">[Delete]</a><!-- /TMPL_IF --></li>
-			<!-- /TMPL_LOOP -->
-
-		</ul>
-	</div>	
-	
+    <div id="messages" class="circmessage">
+        <h4>Messages:</h4>
+        <ul>
+            <!--TMPL_LOOP NAME="lib_messages_loop" -->
+                <li>
+                    <span class="circ-hlt">
+                        <!--TMPL_VAR NAME="message_date_formatted"-->
+                        <!--TMPL_VAR NAME="branchcode"-->
+                        <i>"<!--TMPL_VAR NAME="message"-->"</i>
+                    </span>
+                    <!-- TMPL_IF NAME="can_delete" -->
+                        <a href="/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&amp;borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->">[Delete]</a>
+                    <!-- TMPL_ELSE -->
+                        <!-- TMPL_IF NAME="all_messages_del" -->
+                            <a href="/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&amp;borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->">[Delete]</a>
+                        <!-- /TMPL_IF -->
+                    <!-- /TMPL_IF -->
+                </li>
+            <!-- /TMPL_LOOP -->
+            <!--TMPL_LOOP NAME="bor_messages_loop" -->
+                <li><span class=""><!--TMPL_VAR NAME="message_date_formatted"--> <!--TMPL_VAR NAME="branchcode"--> <i>"<!--TMPL_VAR NAME="message"-->"</i></span> <!-- TMPL_IF NAME="can_delete" --><a href="/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&amp;borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->">[Delete]</a><!-- /TMPL_IF --></li>
+            <!-- /TMPL_LOOP -->
+
+        </ul>
+    </div>  
+    
      <!-- /If flagged --><!-- /TMPL_IF -->
 
-	
+    
 
 </div>
 </div>
@@ -643,16 +643,16 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
     </tr>
 <!-- TMPL_IF NAME="todayissues" --></thead>
 <tfoot>
-		<tr>
+        <tr>
             <td colspan="5" style="text-align: right; font-weight:bold;">Totals:</td>
-			<td><!-- TMPL_VAR NAME="totaldue" --></td>
+            <td><!-- TMPL_VAR NAME="totaldue" --></td>
             <td><!-- TMPL_VAR NAME="totalprice" --></td>
             <td colspan="2">      
                 <p>
                     Renewal due date: <input type="text" size="8" id="newduedate" name="newduedate" value="<!-- TMPL_VAR Name="newduedate" -->" />
                     <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" />
  <script type="text/javascript"> //<![CDATA[
-				//#TODO - ADD syspref (AllowPostDatedCheckouts).
+                //#TODO - ADD syspref (AllowPostDatedCheckouts).
                      Calendar.setup(
                           {
                              inputField : "newduedate",
@@ -663,16 +663,16 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
                              onClose : refocus
                            }
                         );
-				//]]>
-				 </script>
+                //]]>
+                 </script>
                 </p>
                 <p>
                     <label>Forgive fines on return: <input type="checkbox" name="exemptfine" value="1" /></label>
                 </p>
             </td>
         </tr>
-		</tfoot>
-	<tbody>
+        </tfoot>
+    <tbody>
 
     <!-- TMPL_LOOP NAME="todayissues" -->
     <!-- TMPL_IF NAME="__odd__" -->
@@ -709,11 +709,11 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
                 </span>
                 <span class="renewals-disabled">
             <!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="renew_error_on_reserve" -->
-			On Hold
-		<!-- /TMPL_IF -->
+        <!-- TMPL_IF NAME="renew_error_on_reserve" -->
+            On Hold
+        <!-- /TMPL_IF -->
                 <!-- TMPL_IF NAME="renew_error_too_many" -->
-			Not Renewable
+            Not Renewable
                 <!-- /TMPL_IF -->
             <!-- TMPL_IF NAME="can_confirm" -->
                 </span>
@@ -734,7 +734,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
 <!-- TMPL_IF NAME="previssues" -->
 <!-- TMPL_IF NAME="todayissues" --><tr><th colspan="10"><a name="previous" id="previous"></a>Previous checkouts</th></tr><!-- TMPL_ELSE -->
 <tr><th class="{sorter: false}" colspan="10"><a name="previous" id="previous"></a>Previous checkouts</th></tr></thead>
-	<tbody>
+    <tbody>
 <!-- /TMPL_IF -->
     <!-- TMPL_LOOP NAME="previssues" -->
     <!-- TMPL_IF NAME="__odd__" -->
@@ -775,11 +775,11 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
                 </span>
                 <span class="renewals-disabled">
             <!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="renew_error_on_reserve" -->
-			On Hold
-		<!-- /TMPL_IF -->
+        <!-- TMPL_IF NAME="renew_error_on_reserve" -->
+            On Hold
+        <!-- /TMPL_IF -->
                 <!-- TMPL_IF NAME="renew_error_too_many" -->
-			Not Renewable
+            Not Renewable
                 <!-- /TMPL_IF -->
             <!-- TMPL_IF NAME="can_confirm" -->
                 </span>
@@ -787,7 +787,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
         <!-- /TMPL_IF -->
         </td>
         <!-- /TMPL_IF -->
-		  <!-- TMPL_IF NAME="return_failed" -->
+          <!-- TMPL_IF NAME="return_failed" -->
             <td class="problem">Checkin Failed</td>
         <!--TMPL_ELSE-->
             <td><input type="checkbox" name="barcodes[]"  value="<!-- TMPL_VAR NAME="barcode" -->" onclick="uncheck_sibling(this);" />
@@ -821,23 +821,23 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
 <div id="reserves">
 <!-- TMPL_IF NAME="reservloop" -->
 <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
-	<input type="hidden" name="from" value="circ" />
+    <input type="hidden" name="from" value="circ" />
     <table id="holdst">
         <thead><tr>
             <th>Hold date</th>
             <th>Title</th>
             <th>Call Number</th>
-			<th>Barcode</th>
+            <th>Barcode</th>
             <th>Priority</th>
-			<th>Delete?</th>
+            <th>Delete?</th>
         </tr></thead>
-		<tbody>
+        <tbody>
         <!-- TMPL_LOOP NAME="reservloop" -->
         <tr class="<!-- TMPL_VAR NAME="color" -->">
                     <td><!-- TMPL_VAR NAME="reservedate" --></td>
                     <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><strong><!-- TMPL_VAR NAME="title" escape="html" --></strong></a><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></td>
                     <td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
-					<td><em><!-- TMPL_IF name="barcodereserv" -->Item <!-- TMPL_VAR NAME="barcodereserv" -->
+                    <td><em><!-- TMPL_IF name="barcodereserv" -->Item <!-- TMPL_VAR NAME="barcodereserv" -->
                         <!-- /TMPL_IF --><!-- TMPL_IF name="waiting" --> <strong>waiting at <!-- TMPL_VAR NAME="waitingat" --></strong>
                         <!-- /TMPL_IF -->
                         <!-- TMPL_IF name="transfered" --> <strong>in transit</strong> from
@@ -848,7 +848,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
                     <td>
                         <!-- TMPL_IF NAME="waitingposition" --><b> <!-- TMPL_VAR NAME="waitingposition" --> </b><!-- /TMPL_IF -->
                     </td>
-				<td><select name="rank-request">
+                <td><select name="rank-request">
                     <option value="n">No</option>
                     <option value="del">Yes</option>
                 </select>
@@ -858,10 +858,10 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
             </tr>
         <!-- /TMPL_LOOP --></tbody>
     </table>
-	        <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel Marked Requests" /></fieldset>
+            <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel Marked Requests" /></fieldset>
     </form>
-	<!-- TMPL_ELSE -->
-	<p>Patron has nothing on hold.</p>
+    <!-- TMPL_ELSE -->
+    <p>Patron has nothing on hold.</p>
 <!-- /TMPL_IF -->
 </div> <!-- reservesloop -->
 
-- 
1.7.0.4



More information about the Koha-patches mailing list