Fifth installment Patron card generation feature
authorChris Nighswonger <cnighswonger@foundations.edu>
Mon, 17 Mar 2008 14:43:55 +0000 (10:43 -0400)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 18 Mar 2008 01:43:07 +0000 (20:43 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manager.tmpl
labels/label-manager.pl

index 24b011f..e07b8cd 100644 (file)
@@ -1,4 +1,4 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha &rsaquo;  Labels</title>
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha &rsaquo; <!-- TMPL_IF EXPR="(batch_type eq 'labels')" -->Labels<!-- TMPL_ELSIF EXPR="(batch_type eq 'patroncards')" -->Patron Cards<!-- /TMPL_IF --></title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <script type="text/javascript">
 function Plugin(batch_id) {
@@ -23,7 +23,52 @@ function Plugin(batch_id) {
 <!-- /TMPL_IF -->
 
 <!-- TMPL_INCLUDE NAME="tools-labels-toolbar.inc" -->
-<!-- TMPL_UNLESS NAME="batch_id" -->
+<!-- TMPL_IF NAME="batch_id" -->
+<!-- TMPL_IF EXPR="(batch_type eq 'labels')" -->
+    <h2>Items to be Printed for Batch <!-- TMPL_VAR NAME="batch_id" -->  (<!-- TMPL_VAR NAME="batch_count" -->  items)</h2>
+    <table>
+        <tr>
+            <th>Label<br />Num.</th>
+            <th>Summary</th>
+            <th>Item<br />Type</th>
+            <th>Barcode</th>
+            <th>Delete</th>
+        </tr>
+        <!-- TMPL_LOOP NAME="resultsloop" -->
+        <tr>
+            <td><!-- TMPL_VAR NAME="labelno" --></td>
+            <td><b><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"> <!-- TMPL_VAR NAME="title" --></a></b> : <!-- TMPL_VAR NAME="author" --> : <!-- TMPL_VAR NAME="isbn" --></td>
+            <td><!-- TMPL_VAR NAME="itemtype" --></td>
+            <td><!-- TMPL_VAR NAME="barcode" --></td>
+            <td><a href="/cgi-bin/koha/labels/label-manager.pl?op=delete&amp;labelid=<!-- TMPL_VAR NAME="labelid" -->&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=labels">Delete</a></td>
+                           <!-- FIXME: should use POST to change server state, not GET -->
+        </tr>
+        <!-- /TMPL_LOOP -->
+    </table>
+<!-- TMPL_ELSIF EXPR="(batch_type eq 'patroncards')" -->
+    <h2>Patron Cards to be Printed for Batch <!-- TMPL_VAR NAME="batch_id" -->  (<!-- TMPL_VAR NAME="batch_count" -->  items)</h2>
+    <table>
+        <tr>
+            <th>Card<br />Num.</th>
+            <th>Patron Name</th>
+            <th>Borrower Number</th>
+            <th>Card Number</th>
+            <th>Delete</th>
+        </tr>
+        <!-- TMPL_LOOP NAME="resultsloop" -->
+        <tr>
+            <td><!-- TMPL_VAR NAME="cardno" --></td>
+            <td><b><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"> <!-- TMPL_VAR NAME="title" -->. <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a></b></td>
+            <td><!-- TMPL_VAR NAME="borrowernumber" --></td>
+            <td><!-- TMPL_VAR NAME="cardnumber" --></td>
+            <td><a href="/cgi-bin/koha/labels/label-manager.pl?op=delete&amp;cardid=<!-- TMPL_VAR NAME="cardid" -->&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=patroncards">Delete</a></td>
+                           <!-- FIXME: should use POST to change server state, not GET -->
+        </tr>
+        <!-- /TMPL_LOOP -->
+    </table>
+<!-- TMPL_ELSIF EXPR="(batch_type eq 'patroncards')" -->
+<!-- /TMPL_IF --><!-- /batch_type -->
+<!-- TMPL_ELSE -->
 <!-- TMPL_IF EXPR="(batch_type eq 'labels')" -->
 <!-- TMPL_IF NAME="batches" -->
     <div class="yui-g">
@@ -101,52 +146,7 @@ function Plugin(batch_id) {
     </div>
 <!-- /TMPL_IF --><!-- /batches -->
 <!-- /TMPL_IF --><!-- /batch_type -->
-<!-- /TMPL_UNLESS --><!-- batch_id -->
-<!-- if no batch_id do this -->
-<!-- TMPL_IF EXPR="(batch_type eq 'labels')" -->
-    <h2>Items to be Printed for Batch <!-- TMPL_VAR NAME="batch_id" -->  (<!-- TMPL_VAR NAME="batch_count" -->  items)</h2>
-    <table>
-        <tr>
-            <th>Label<br />Num.</th>
-            <th>Summary</th>
-            <th>Item<br />Type</th>
-            <th>Barcode</th>
-            <th>Delete</th>
-        </tr>
-        <!-- TMPL_LOOP NAME="resultsloop" -->
-        <tr>
-            <td><!-- TMPL_VAR NAME="labelno" --></td>
-            <td><b><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"> <!-- TMPL_VAR NAME="title" --></a></b> : <!-- TMPL_VAR NAME="author" --> : <!-- TMPL_VAR NAME="isbn" --></td>
-            <td><!-- TMPL_VAR NAME="itemtype" --></td>
-            <td><!-- TMPL_VAR NAME="barcode" --></td>
-            <td><a href="/cgi-bin/koha/labels/label-manager.pl?op=delete&amp;labelid=<!-- TMPL_VAR NAME="labelid" -->&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=labels">Delete</a></td>
-                           <!-- FIXME: should use POST to change server state, not GET -->
-        </tr>
-        <!-- /TMPL_LOOP -->
-    </table>
-<!-- TMPL_ELSIF EXPR="(batch_type eq 'patroncards')" -->
-    <h2>Patron Cards to be Printed for Batch <!-- TMPL_VAR NAME="batch_id" -->  (<!-- TMPL_VAR NAME="batch_count" -->  items)</h2>
-    <table>
-        <tr>
-            <th>Card<br />Num.</th>
-            <th>Patron Name</th>
-            <th>Borrower Number</th>
-            <th>Card Number</th>
-            <th>Delete</th>
-        </tr>
-        <!-- TMPL_LOOP NAME="resultsloop" -->
-        <tr>
-            <td><!-- TMPL_VAR NAME="cardno" --></td>
-            <td><b><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"> <!-- TMPL_VAR NAME="title" -->. <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a></b></td>
-            <td><!-- TMPL_VAR NAME="borrowernumber" --></td>
-            <td><!-- TMPL_VAR NAME="cardnumber" --></td>
-            <td><a href="/cgi-bin/koha/labels/label-manager.pl?op=delete&amp;cardid=<!-- TMPL_VAR NAME="cardid" -->&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=patroncards">Delete</a></td>
-                           <!-- FIXME: should use POST to change server state, not GET -->
-        </tr>
-        <!-- /TMPL_LOOP -->
-    </table>
-<!-- TMPL_ELSIF EXPR="(batch_type eq 'patroncards')" -->
-<!-- /TMPL_IF --><!-- /batch_type -->
+<!-- /TMPL_IF --><!-- batch_id -->
 </div>
 </div>
 <div class="yui-b">
index af8ce00..2e74cd3 100755 (executable)
@@ -135,7 +135,7 @@ elsif ( $op eq 'delete' ) {
 }
 elsif ( $op eq 'delete_batch' ) {
        delete_batch($batch_id, $batch_type);
-       print $query->redirect("label-manager.pl?batch_id=");
+       print $query->redirect("label-manager.pl");
        exit;
 }
 elsif ( $op eq 'add_batch' ) {