Bug 2965: Follow up - fixing problem with barcode field
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-collection.tmpl
index e4beeeb..2763726 100644 (file)
@@ -4,6 +4,10 @@
 
 <script type="text/javascript">
 //<![CDATA[
+function print_slip(subscriptionid,issue){
+    var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
+    window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
+}
 function addsubscriptionid()
 {
        var tab=new Array();
@@ -30,6 +34,12 @@ function popup(subscriptionid) {
     newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
 }
 
+function generateNext(subscriptionid) {
+       if(confirm("Do you really want to generate next serial?")){
+               document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
+       }
+}
+
 $(document).ready(function() {
        $('#subscription_years > ul').tabs();
 });
@@ -69,13 +79,13 @@ $(document).ready(function() {
   <th>Frequency</th>
   <th>Numbering pattern</th>
   <th>Library</th>
-  <th>Call Number</th>
+  <th>Call number</th>
   <th>Notes</th>
   <th>Routing</th>
   <th>Renew</th>
 </tr>
 <!--TMPL_LOOP Name="subscriptions"-->
-       <tr>
+    <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
       <td><a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->"># <!-- TMPL_VAR name="subscriptionid" --></a> </td>
       <td>         <!--TMPL_IF name="periodicity1" -->
                         1/day
@@ -140,7 +150,7 @@ $(document).ready(function() {
                        <td><a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->">Edit Routing List</a></td>
         <!--TMPL_IF name="abouttoexpire"--><td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" onclick="popup(<!--TMPL_VAR Name="subscriptionid"-->); return false;">Renew</a></td>
         <!--TMPL_ELSE-->
-        <!--TMPL_IF name="subscriptionexpired"--><td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" onclick="popup(<!--TMPL_VAR Name="subscriptionid"-->) return false;">Renew</a></td>
+        <!--TMPL_IF name="subscriptionexpired"--><td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" onclick="popup(<!--TMPL_VAR Name="subscriptionid"-->); return false;">Renew</a></td>
         <!--TMPL_ELSE-->
         <td> &nbsp;</td>
         <!--/TMPL_IF-->
@@ -157,7 +167,7 @@ $(document).ready(function() {
 <!--/TMPL_IF -->
 
 
-<!-- TMPL_IF NAME="years" --><form name="edition" action="serials-edit.pl">
+<!-- TMPL_IF NAME="years" --><form name="edition" action="serials-edit.pl" method="post">
 <div id="subscription_years" class="toptabs numbered">
 <ul>
        <!-- TMPL_LOOP NAME="years" -->
@@ -170,7 +180,7 @@ $(document).ready(function() {
  <!-- TMPL_LOOP NAME="years" -->
 <div id="subscription-year-<!-- TMPL_VAR NAME="year" -->">
         <table style="width:400px;">
-            <tr>
+         <tr>
 <!--TMPL_UNLESS Name="onesubscription"-->
                 <th># Subs</th>
 <!--/TMPL_UNLESS-->
@@ -178,19 +188,21 @@ $(document).ready(function() {
                 </th>
                 <th>Date received
                 </th>
-                <th> Number
+                <th>Number
                 </th>
-                <th> Status
+                <th>Status
                 </th>
-                <th> Notes
+                <th>Notes
                 </th>
-                <th>branch
+                <th>Branch
                 </th>
+               <th>Routing
+               </th>
                 <th>Edit
                 </th>
             </tr>
       <!-- TMPL_LOOP Name="serials" -->
-            <tr>
+    <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
 <!--TMPL_UNLESS Name="onesubscription"-->
                  <td><a href="serials-collection.pl?subscriptionid=<!--TMPL_VAR Name="subscriptionid"-->"><!--TMPL_VAR Name="subscriptionid"--></a></td>
 <!--/TMPL_UNLESS-->
@@ -212,26 +224,20 @@ $(document).ready(function() {
                 <td>
                     <!-- TMPL_VAR Name="branchcode" -->
                 </td>
+               <td>
+                  <a href="" onclick="print_slip(<!-- TMPL_VAR NAME="subscriptionid" ESCAPE="HTML" -->, '<!-- TMPL_VAR NAME="serialseq" ESCAPE="HTML" -->'); return false" >Print list</a>
+               </td>
                 <td>
                   <!--TMPL_IF Name="cannotedit"-->
                     disabled
                   <!--TMPL_ELSE -->
-                    <input type="hidden" name="subs" value="<!--TMPL_VAR Name="subscriptionid"-->" />
                     <!--TMPL_IF Name="subscriptionexpired"-->
                     <input type="checkbox" name="serialid" value="<!--TMPL_VAR Name="serialid"-->" disabled="disabled" />
                     <!--TMPL_ELSE-->
-                      <!--TMPL_IF Name="status1"-->
+                      <!--TMPL_IF Name="checked"-->
                     <input type="checkbox" name="serialid" checked="checked" value="<!--TMPL_VAR Name="serialid"-->" />
                       <!--TMPL_ELSE -->
-                      <!--TMPL_IF Name="status3"-->
-                    <input type="checkbox" name="serialid" checked="checked" value="<!--TMPL_VAR Name="serialid"-->" />
-                      <!--TMPL_ELSE -->
-                        <!--TMPL_IF Name="status4"-->
-                    <input type="checkbox" name="serialid" checked="checked" value="<!--TMPL_VAR Name="serialid"-->" />
-                        <!--TMPL_ELSE -->
                     <input type="checkbox" name="serialid" value="<!--TMPL_VAR Name="serialid"-->" />
-                        <!--/TMPL_IF-->           
-                      <!--/TMPL_IF-->           
                       <!--/TMPL_IF-->           
                     <!--/TMPL_IF -->
                   <!--/TMPL_IF -->
@@ -239,7 +245,7 @@ $(document).ready(function() {
             </tr>
       <!-- /TMPL_LOOP -->
         </table>
-      <p><input type="submit" value="Edit serials" /></p>
+      <p><input type="submit" value="Edit serials" />&nbsp;<input type="button" value="Generate Next" onclick="javascript:generateNext(<!-- TMPL_VAR NAME="subscriptionidlist" -->)" /></p>
     </div>
     <!--/TMPL_LOOP -->
   <input type="hidden" name="subscriptionid" value="<!--TMPL_VAR Name="subscriptionidlist"-->" />