Merge remote-tracking branch 'origin/new/bug_7548'
[koha_gimpoz] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-collection.tt
index 93c4fdc..414cf3b 100644 (file)
@@ -48,7 +48,7 @@ $(document).ready(function() {
 //]]>
 </script>
 </head>
-<body class="yui-skin-sam">
+<body id="ser_serials-collection" class="yui-skin-sam ser">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'serials-search.inc' %]
 
@@ -64,26 +64,26 @@ $(document).ready(function() {
 [% UNLESS ( popup ) %]
        [% INCLUDE 'serials-toolbar.inc' %]
 
-       <h1>Serial Collection information for  <i>[% bibliotitle %]</i>
+       <h1>Serial collection information for  <i>[% bibliotitle %]</i>
         [% IF location %] ([% location %] ) [% END %]
                [% IF ( callnumber ) %]callnumber: [% callnumber %][% END %]</h1>
 [% END %]
 
 [% IF ( subscriptions ) %]
 <table>
-[% IF ( onesubscription ) %]
-<caption> Subscription Summary</caption>
+[% IF ( subscriptions.size == 1 ) %]
+<caption> Subscription summary</caption>
 [% ELSE %]
-<caption> Subscription Summaries</caption>
+<caption> Subscription summaries</caption>
 [% END %]
 <tr>
-  <th>Subscription Num. </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>
+  [% IF ( routing && CAN_user_serials_routing ) %]<th>Routing</th>[% END %]
   <th>Renew</th>
 </tr>
 [% FOREACH subscription IN subscriptions %]
@@ -146,10 +146,14 @@ $(document).ready(function() {
                 [% END %]</td>
             <td> [% subscription.branchcode %]</td>
             <td> [% subscription.callnumber %]</td>
-        <td> [% subscription.notes %]        [% IF ( subscription.subscriptionexpired ) %]<br /><span class="problem"> Subscription Expired</span>
+        <td> [% subscription.notes %]        [% IF ( subscription.subscriptionexpired ) %]<br /><span class="problem"> Subscription expired</span>
         [% END %]
         </td>
-                       <td><a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit Routing List</a></td>
+        [% IF ( routing && CAN_user_serials_routing ) %]
+        <td>
+            <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit routing list</a>
+        </td>
+        [% END %]
         [% IF ( subscription.abouttoexpire ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
         [% ELSE %]
         [% IF ( subscription.subscriptionexpired ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
@@ -161,9 +165,10 @@ $(document).ready(function() {
       </tr>
 [% END %]
 [% IF ( subscr ) %]
-[% UNLESS ( onesubscription ) %]
-<tr ><td colspan="7">  <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
-</tr>[% END %]
+[% IF ( subscriptioncount > 1 ) %]
+<tr ><td colspan="8">  <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
+</tr>
+[% END %]
 [% END %]
 </table>
 [% END %]
@@ -181,9 +186,16 @@ $(document).ready(function() {
 
  [% FOREACH year IN years %]
 <div id="subscription-year-[% year.year %]">
+    [% IF ( CAN_user_serials_receive_serials ) %]
+        <p>
+            <input type="submit" value="Edit serials" />&nbsp;
+            <input type="button" value="Generate Next" onclick="javascript:generateNext([% subscriptionidlist %])" />
+        </p>
+    [% END %]
+
         <table>
          <tr>
-[% UNLESS ( year.onesubscription ) %]
+[% IF ( subscriptions.size > 1 ) %]
                 <th># Subs</th>
 [% END %]
                 <th>Date published
@@ -196,16 +208,14 @@ $(document).ready(function() {
                 </th>
                 <th>Notes
                 </th>
-                <th>Branch
-                </th>
-               <th>Routing
-               </th>
-                <th>Edit
+                <th>Library
                 </th>
+                [% IF ( routing ) %]<th>Routing</th>[% END %]
+                [% IF ( CAN_user_serials_receive_serials ) %]<th>Edit</th>[% END %]
             </tr>
       [% FOREACH serial IN year.serials %]
     [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
-[% UNLESS ( serial.onesubscription ) %]
+[% IF ( subscriptions.size > 1 ) %]
                  <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid %]">[% serial.subscriptionid %]</a></td>
 [% END %]
                 <td>
@@ -226,9 +236,12 @@ $(document).ready(function() {
                 <td>
                     [% serial.branchcode %]
                 </td>
-               <td>
-                  <a href="" onclick="print_slip([% serial.subscriptionid |html %], '[% serial.serialseq |html %]'); return false" >Print list</a>
-               </td>
+                [% IF ( routing ) %]
+                <td>
+                    <a href="" onclick="print_slip([% serial.subscriptionid |html %], '[% serial.serialseq |html %] ([% serial.planneddate %])'); return false" >Print list</a>
+                </td>
+                [% END %]
+            [% IF ( CAN_user_serials_receive_serials ) %]
                 <td>
                   [% IF ( serial.cannotedit ) %]
                     disabled
@@ -244,10 +257,10 @@ $(document).ready(function() {
                     [% END %]
                   [% END %]
                 </td>
+            [% END %]
             </tr>
       [% END %]
         </table>
-      <p><input type="submit" value="Edit serials" />&nbsp;<input type="button" value="Generate Next" onclick="javascript:generateNext([% subscriptionidlist %])" /></p>
     </div>
     [% END %]
   <input type="hidden" name="subscriptionid" value="[% subscriptionidlist %]" />