Bug 2965: Follow up - fixing problem with barcode field
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-collection.tmpl
index 02cceb5..2763726 100644 (file)
@@ -1,31 +1,12 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
 <title>Koha &rsaquo; Serials &rsaquo; Serial Collection information for <!-- TMPL_VAR name="bibliotitle" --></title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
 <script type="text/javascript">
 //<![CDATA[
-showlayer('<!-- TMPL_VAR NAME="yearmax"-->');
-
-function showlayer(numlayer)
-{
-       var yeardata=document.getElementsByName("yeardata");
-    for (i=0; i<yeardata.length; i++ ) {
-               ong=yeardata[i].getAttribute('id');
-        if (numlayer==ong) {
-                       yeardata[i].setAttribute("class","content_visible");
-            var tabactive=document.getElementById('link'+numlayer);
-            tabactive.removeAttribute("class");
-            tabactive.setAttribute("class","tab_active");
-               } else {
-                       yeardata[i].removeAttribute("class");
-            yeardata[i].setAttribute("class","content_hidden");
-            try {
-                var tabactive=document.getElementById('link'+ong);
-                tabactive.removeAttribute("class");
-                tabactive.setAttribute("class","tab_inactive");
-            }
-            catch(e){};
-               }
-       }
+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()
 {
@@ -53,15 +34,21 @@ 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').tabs();
+       $('#subscription_years > ul').tabs();
 });
  
 
 //]]>
 </script>
 </head>
-<body>
+<body class="yui-skin-sam">
 <!-- TMPL_INCLUDE NAME="header.inc" -->
 <!-- TMPL_INCLUDE NAME="serials-search.inc" -->
 
@@ -88,17 +75,18 @@ $(document).ready(function() {
 <caption> Subscription Summaries</caption>
 <!--/TMPL_IF-->
 <tr>
-  <th>Subs </th>
-  <th>Freq</th>
-  <th>Num pattern</th>
-  <th>Branch</th>
-  <th>Call Number</th>
+  <th>Subscription Num. </th>
+  <th>Frequency</th>
+  <th>Numbering pattern</th>
+  <th>Library</th>
+  <th>Call number</th>
   <th>Notes</th>
+  <th>Routing</th>
   <th>Renew</th>
 </tr>
 <!--TMPL_LOOP Name="subscriptions"-->
-       <tr>
-      <td><a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">#<!-- TMPL_VAR name="subscriptionid" --></a> </td>
+    <!-- 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
                 <!-- /TMPL_IF -->
@@ -159,9 +147,10 @@ $(document).ready(function() {
         <td> <!-- TMPL_VAR name="notes" -->        <!--TMPL_IF name="subscriptionexpired"--><br /><span class="problem"> Subscription Expired</span>
         <!--/TMPL_IF-->
         </td>
-        <!--TMPL_IF name="abouttoexpire"--><td class="problem"> <a onclick="popup(<!--TMPL_VAR Name="subscriptionid"-->)">Renew</a></td>
+                       <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 onclick="popup(<!--TMPL_VAR Name="subscriptionid"-->)">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-->
@@ -170,15 +159,16 @@ $(document).ready(function() {
       </tr>
 <!--/TMPL_LOOP -->
 <!--TMPL_IF Name="subscr"-->
+<!--TMPL_UNLESS Name="onesubscription"-->
 <tr ><td colspan="7">  <a href="serials-collection.pl?biblionumber=<!--TMPL_VAR Name="biblionumber" -->">See any subscription attached to this biblio</a></td>
-</tr>
+</tr><!-- /TMPL_UNLESS -->
 <!--/TMPL_IF-->
 </table>
 <!--/TMPL_IF -->
 
 
-<!-- TMPL_IF NAME="years" --><form name="edition" action="serials-edit.pl">
-<div id="subscription-years">
+<!-- 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" -->
         <!-- TMPL_IF NAME="year" -->
@@ -189,29 +179,30 @@ $(document).ready(function() {
 
  <!-- TMPL_LOOP NAME="years" -->
 <div id="subscription-year-<!-- TMPL_VAR NAME="year" -->">
-        <table width="400px">
-            <tr>
+        <table style="width:400px;">
+         <tr>
 <!--TMPL_UNLESS Name="onesubscription"-->
-                <th> # Subs.
-                </th>
+                <th># Subs</th>
 <!--/TMPL_UNLESS-->
                 <th>Date published
                 </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-->
@@ -225,7 +216,7 @@ $(document).ready(function() {
                     <!-- TMPL_VAR Name="serialseq" -->
                 </td>
                 <td>
-                    <!-- TMPL_IF Name="status1" -->Waited<!-- /TMPL_IF --><!-- TMPL_IF Name="status2" -->Arrived<!-- /TMPL_IF --><!-- TMPL_IF Name="status3" -->Late<!-- /TMPL_IF --><!-- TMPL_IF Name="status4" -->Missing<!-- /TMPL_IF --><!-- TMPL_IF Name="status5" -->Not Available<!-- /TMPL_IF --><!-- TMPL_IF Name="status7" -->Claimed<!-- /TMPL_IF -->
+                    <!-- TMPL_IF Name="status1" -->Expected<!-- /TMPL_IF --><!-- TMPL_IF Name="status2" -->Arrived<!-- /TMPL_IF --><!-- TMPL_IF Name="status3" -->Late<!-- /TMPL_IF --><!-- TMPL_IF Name="status4" -->Missing<!-- /TMPL_IF --><!-- TMPL_IF Name="status5" -->Not Available<!-- /TMPL_IF --><!-- TMPL_IF Name="status7" -->Claimed<!-- /TMPL_IF -->
                 </td>
                 <td>
                     <!-- TMPL_VAR Name="notes" -->
@@ -233,30 +224,28 @@ $(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>
-                  <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"-->
-                    <input type="checkbox" name="serialid" checked="checked" value="<!--TMPL_VAR Name="serialid"-->" />
-                    <!--TMPL_ELSE -->
-                    <!--TMPL_IF Name="status3"-->
+                  <!--TMPL_IF Name="cannotedit"-->
+                    disabled
+                  <!--TMPL_ELSE -->
+                    <!--TMPL_IF Name="subscriptionexpired"-->
+                    <input type="checkbox" name="serialid" value="<!--TMPL_VAR Name="serialid"-->" disabled="disabled" />
+                    <!--TMPL_ELSE-->
+                      <!--TMPL_IF Name="checked"-->
                     <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"-->" />
+                    <input type="checkbox" name="serialid" value="<!--TMPL_VAR Name="serialid"-->" />
                       <!--/TMPL_IF-->           
-                    <!--/TMPL_IF-->           
-                    <!--/TMPL_IF-->           
+                    <!--/TMPL_IF -->
                   <!--/TMPL_IF -->
                 </td>
             </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"-->" />