koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/koha-tmpl/intranet-tmpl/ccfls/en/circ circ... [dev_week]


From: Kyle Hall
Subject: [Koha-cvs] koha/koha-tmpl/intranet-tmpl/ccfls/en/circ circ... [dev_week]
Date: Fri, 31 Aug 2007 11:40:43 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Kyle Hall <kylemhall>   07/08/31 11:40:43

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

Log message:
        Added the same features recently added to moremember.pl. Check/Uncheck 
all checkbox, renew & return checked items buttons.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/ccfls/en/circ/circulation.tmpl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.1.2.20&r2=1.1.2.1.2.21

Patches:
Index: circulation.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/ccfls/en/circ/Attic/circulation.tmpl,v
retrieving revision 1.1.2.1.2.20
retrieving revision 1.1.2.1.2.21
diff -u -b -r1.1.2.1.2.20 -r1.1.2.1.2.21
--- circulation.tmpl    28 Aug 2007 11:56:26 -0000      1.1.2.1.2.20
+++ circulation.tmpl    31 Aug 2007 11:40:43 -0000      1.1.2.1.2.21
@@ -336,7 +336,7 @@
 
 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
 <!-- TMPL_IF NAME="borrowernumber" -->
-<div class="table"><form class="inline" action="/cgi-bin/koha/renewscript.pl" 
method="post"><input type="hidden" value="circ" name="destination" /><input 
type="hidden" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" 
/><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="borrowernumber" 
-->" />
+<div class="table"><form class="inline" action="/cgi-bin/koha/renewscript.pl" 
method="post" name="issuesForm" id="issuesForm"><input type="hidden" 
value="circ" name="destination" /><input type="hidden" name="cardnumber" 
value="<!-- TMPL_VAR NAME="cardnumber" -->" /><input type="hidden" 
name="bornum" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
        <table>
                <caption>Checkouts <span class="print"><a 
href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR 
NAME="borrowernumber" -->&amp;print=page">(Print Detailed Account Summary)</a> 
<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR 
NAME="borrowernumber" -->&amp;print=slip">(Print Slip)</a></span></caption>
                <tr>
@@ -346,9 +346,13 @@
                        <th>Call No</th>
                        <th>Barcode</th>
                        <th>Library</th>
-<!-- HIDE              <th>Renew?</th> -->
-                       <th>&nbsp;</th>
+<!-- HIDE FOR CCFLS
+                       <th>Renew?</th> 
+END HIDE FOR CCFLS -->
+                       <th><input style="border:inset 1px;" name="allbox" 
type="checkbox" value="Check All" onclick="CheckAll(document.issuesForm);" 
/></th>
+<!-- HIDE FOR CCFLS
                        <th>&nbsp;</th>
+END HIDE FOR CCFLS -->
                </tr>
        <!-- TMPL_IF NAME="todayissues" -->
                <!-- TMPL_LOOP NAME="todayissues" -->
@@ -359,16 +363,16 @@
                        <td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
                        <td><!-- TMPL_VAR NAME="barcode" --></td>
                        <td><!-- TMPL_VAR NAME="holdingbranch" --></td>
-<!-- HIDE              <td><input type="checkbox" name="renew_item_<!-- 
TMPL_VAR NAME="itemnumber" -->" value="y"<!-- TMPL_IF NAME="od" --> 
checked="checked"<!-- /TMPL_IF --> /></td>
--->
-                       <td>&nbsp;</td>
+                       <td><input type="checkbox" name="renew_item_<!-- 
TMPL_VAR NAME="itemnumber" -->" value="y"<!-- TMPL_IF NAME="od" --> 
checked="checked"<!-- /TMPL_IF --> /></td>
+<!-- HIDE FOR CCFLS
                        <td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- 
TMPL_VAR name="barcode" -->">Return</a></td>
+END HIDE FOR CCFLS -->
                </tr>
                <!-- /TMPL_LOOP -->
 <!-- /TMPL_IF -->
 
 <!-- TMPL_IF NAME="previssues" -->
-               <tr><th colspan="8"><a name="previous" id="previous">Previous 
Checkouts</a></th></tr>
+               <tr><th colspan="7"><a name="previous" id="previous">Previous 
Checkouts</a></th></tr>
                <!-- TMPL_LOOP NAME="previssues" -->
                        <!-- TMPL_IF NAME="togglecolor" --><tr><!-- TMPL_ELSE 
--><tr class="highlight"><!-- /TMPL_IF -->
                        <td>
@@ -384,19 +388,80 @@
                        <td><!-- TMPL_VAR NAME="barcode" --></td>
                        <td><!-- TMPL_VAR NAME="holdingbranch" --></td>
                        <td><input type="checkbox" name="renew_item_<!-- 
TMPL_VAR NAME="itemnumber" -->" value="y"<!-- TMPL_IF NAME="od" --> 
checked="checked"<!-- /TMPL_IF --> /></td>
-                       <td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- 
TMPL_VAR name="barcode" -->">Return</a></td></tr>
+<!-- HIDE FOR CCFLS
+                       <td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- 
TMPL_VAR name="barcode" -->">Return</a></td>
+END HIDE FOR CCFLS -->
+                       </tr>
                <!-- /TMPL_LOOP -->
        </table>
        
-       <p><input type="submit" class="submit" value="Renew Checked Items" 
/></p>
+    <p>
+      <input type="submit" class="submit" value="Renew Checked Items"  
onclick="document.issuesForm.action='/cgi-bin/koha/renewscript.pl';"/>
+    </p>
+    <p>
+      <input type="submit" class="submit" value="Return Checked Items" 
onclick="document.issuesForm.action='/cgi-bin/koha/returnscript.pl';"/>
+    </p>
+
 </form>
 
-<!-- TMPL_IF name="previssues" --><form class="inline" 
action="/cgi-bin/koha/renewscript.pl" method="post"><input type="hidden" 
value="circ" name="destination" /><input type="hidden" name="cardnumber" 
value="<!-- TMPL_VAR NAME="cardnumber" -->" /><input type="hidden" 
name="bornum" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /><!-- TMPL_LOOP 
NAME="previssues" --><input type="hidden" name="renew_item_<!-- TMPL_VAR 
NAME="itemnumber" -->" value="y" /><!-- /TMPL_LOOP --><input type="submit" 
class="submit" value="Renew All" /></form><!-- /TMPL_IF -->
+<!-- HIDE FOR CCFLS
+<!-- TMPL_IF name="previssues" -->
+  <form class="inline" action="/cgi-bin/koha/renewscript.pl" method="post">
+    <input type="hidden" value="circ" name="destination" />
+    <input type="hidden" name="cardnumber" value="<!-- TMPL_VAR 
NAME="cardnumber" -->" />
+    <input type="hidden" name="bornum" value="<!-- TMPL_VAR 
NAME="borrowernumber" -->" />
+    
+    <!-- TMPL_LOOP NAME="previssues" -->
+      <input type="hidden" name="renew_item_<!-- TMPL_VAR NAME="itemnumber" 
-->" value="y" />
+    <!-- /TMPL_LOOP -->
+    <input type="submit" class="submit" value="Renew All" />
+  </form>
+<!-- /TMPL_IF -->
+END HIDE FOR CCFLS -->
        
 </div>
 <!-- /TMPL_IF -->
 <!-- /TMPL_IF -->
 </div>
+
+<script language="JavaScript" type="text/javascript">
+//==========================================
+// Check All boxes
+//==========================================
+function CheckAll(fmobj) {
+  for (var i=0;i<fmobj.elements.length;i++) {
+    var e = fmobj.elements[i];
+    if ( (e.name != 'allbox') && (e.type=='checkbox') && (!e.disabled) ) {
+      e.checked = fmobj.allbox.checked;
+    }
+  }
+}
+
+//==========================================
+// Check all or uncheck all?
+//==========================================
+function CheckCheckAll(fmobj) {
+  var TotalBoxes = 0;
+  var TotalOn = 0;
+  for (var i=0;i<fmobj.elements.length;i++) {
+    var e = fmobj.elements[i];
+    if ((e.name != 'allbox') && (e.type=='checkbox')) {
+      TotalBoxes++;
+      if (e.checked) {
+       TotalOn++;
+      }
+    }
+  }
+  if (TotalBoxes==TotalOn) {
+    fmobj.allbox.checked=true;
+  }
+  else {
+   fmobj.allbox.checked=false;
+  }
+}
+</script>
+
+
 </dd>
 </dl>
 </body>




reply via email to

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