Bug 4199: Adds ability to print routing slip. Patch 2.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-collection.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Serials &rsaquo; Serial Collection information for <!-- TMPL_VAR name="bibliotitle" --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
5 <script type="text/javascript">
6 //<![CDATA[
7 function print_slip(subscriptionid,issue){
8     var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
9     window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
10 }
11 function addsubscriptionid()
12 {
13         var tab=new Array();
14     var serialids = document.edition.serialid;
15     for (i=0; i<serialids.length; i++){
16       if (serialids[i].checked == true){
17         var found=false;
18         for (var val in tab){
19           if (tab[val] == document.getElementsByName("subs")[i].getAttribute('val')){found = true;}
20         }
21         if (found == false){
22           tab=tab.concat((document.getElementsByName("subs")[i].getAttribute('val')));
23         }
24       }
25     }
26     var string="";
27     for (var val in tab){
28       string = string + tab[val] + ",";
29     }
30     string=string.substring(0,string.length -1);
31     document.edition.subscriptionid.value=string;
32 }
33 function popup(subscriptionid) {
34     newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
35 }
36
37 function generateNext(subscriptionid) {
38         if(confirm("Do you really want to generate next serial?")){
39                 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
40         }
41 }
42
43 $(document).ready(function() {
44         $('#subscription_years > ul').tabs();
45 });
46  
47
48 //]]>
49 </script>
50 </head>
51 <body class="yui-skin-sam">
52 <!-- TMPL_INCLUDE NAME="header.inc" -->
53 <!-- TMPL_INCLUDE NAME="serials-search.inc" -->
54
55 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Serial Collection information for  <i><!-- TMPL_VAR name="bibliotitle" --></i></div>
56
57 <div id="doc3" class="yui-t2">
58    
59    <div id="bd">
60         <div id="yui-main">
61         <div class="yui-b">
62
63
64 <!-- TMPL_UNLESS name="popup" -->
65         <!-- TMPL_INCLUDE NAME="serials-toolbar.inc" -->
66
67         <h1>Serial Collection information for  <i><!-- TMPL_VAR name="bibliotitle" --></i></h1>
68 <!-- /TMPL_UNLESS -->
69
70 <!--TMPL_IF Name="subscriptions"-->
71 <table>
72 <!--TMPL_IF Name="onesubscription"-->
73 <caption> Subscription Summary</caption>
74 <!--TMPL_ELSE-->
75 <caption> Subscription Summaries</caption>
76 <!--/TMPL_IF-->
77 <tr>
78   <th>Subscription Num. </th>
79   <th>Frequency</th>
80   <th>Numbering pattern</th>
81   <th>Library</th>
82   <th>Call number</th>
83   <th>Notes</th>
84   <th>Routing</th>
85   <th>Renew</th>
86 </tr>
87 <!--TMPL_LOOP Name="subscriptions"-->
88     <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
89       <td><a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->"># <!-- TMPL_VAR name="subscriptionid" --></a> </td>
90       <td>         <!--TMPL_IF name="periodicity1" -->
91                         1/day
92                 <!-- /TMPL_IF -->
93                 <!--TMPL_IF name="periodicity2" -->
94                         1/week
95                 <!-- /TMPL_IF -->
96                 <!--TMPL_IF name="periodicity3" -->
97                         1/2 weeks
98                 <!-- /TMPL_IF -->
99                 <!--TMPL_IF name="periodicity4" -->
100                         1/3 weeks
101                 <!-- /TMPL_IF -->
102                 <!--TMPL_IF name="periodicity5" -->
103                         1/Month
104                 <!-- /TMPL_IF -->
105                 <!--TMPL_IF name="periodicity6" -->
106                         1/2 Months (6/year)
107                 <!-- /TMPL_IF -->
108                 <!--TMPL_IF name="periodicity7" -->
109                         1/quarter
110                 <!-- /TMPL_IF -->
111                 <!--TMPL_IF name="periodicity8" -->
112                         1/quarter
113                 <!-- /TMPL_IF -->
114                 <!--TMPL_IF name="periodicity9" -->
115                         2/year
116                 <!-- /TMPL_IF -->
117                 <!--TMPL_IF name="periodicity10" -->
118                         1/year
119                 <!-- /TMPL_IF -->
120                 <!--TMPL_IF name="periodicity11" -->
121                         1/2 years
122                 <!-- /TMPL_IF --></td>
123            <td>
124                 <!-- TMPL_IF name="numberpattern1" -->
125                     Number
126                 <!-- /TMPL_IF -->
127                 <!-- TMPL_IF name="numberpattern2" -->
128                     Volume, Number, Issue
129                 <!-- /TMPL_IF -->
130                 <!-- TMPL_IF name="numberpattern3" -->
131                     Volume, Number
132                 <!-- /TMPL_IF -->
133                 <!-- TMPL_IF name="numberpattern4" -->
134                     Volume, Issue
135                 <!-- /TMPL_IF -->
136                 <!-- TMPL_IF name="numberpattern5" -->
137                     Number, Issue
138                 <!-- /TMPL_IF -->
139                 <!-- TMPL_IF name="numberpattern6" -->
140                     Seasonal only
141                 <!-- /TMPL_IF -->
142                 <!-- TMPL_IF name="numberpattern7" -->
143                     None of the above
144                 <!-- /TMPL_IF --></td>
145             <td> <!-- TMPL_VAR name="branchcode" --></td>
146             <td> <!-- TMPL_VAR name="callnumber" --></td>
147         <td> <!-- TMPL_VAR name="notes" -->        <!--TMPL_IF name="subscriptionexpired"--><br /><span class="problem"> Subscription Expired</span>
148         <!--/TMPL_IF-->
149         </td>
150                         <td><a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->">Edit Routing List</a></td>
151         <!--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>
152         <!--TMPL_ELSE-->
153         <!--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>
154         <!--TMPL_ELSE-->
155         <td> &nbsp;</td>
156         <!--/TMPL_IF-->
157         <!--/TMPL_IF-->
158
159       </tr>
160 <!--/TMPL_LOOP -->
161 <!--TMPL_IF Name="subscr"-->
162 <!--TMPL_UNLESS Name="onesubscription"-->
163 <tr ><td colspan="7">  <a href="serials-collection.pl?biblionumber=<!--TMPL_VAR Name="biblionumber" -->">See any subscription attached to this biblio</a></td>
164 </tr><!-- /TMPL_UNLESS -->
165 <!--/TMPL_IF-->
166 </table>
167 <!--/TMPL_IF -->
168
169
170 <!-- TMPL_IF NAME="years" --><form name="edition" action="serials-edit.pl" method="post">
171 <div id="subscription_years" class="toptabs numbered">
172 <ul>
173         <!-- TMPL_LOOP NAME="years" -->
174         <!-- TMPL_IF NAME="year" -->
175             <li><a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=<!--TMPL_VAR Name="subscriptionid"-->#subscription-year-<!-- TMPL_VAR NAME="year" -->"><!-- TMPL_VAR NAME="year" --></a></li>
176         <!-- /TMPL_IF -->
177     <!-- /TMPL_LOOP -->
178 </ul>
179
180  <!-- TMPL_LOOP NAME="years" -->
181 <div id="subscription-year-<!-- TMPL_VAR NAME="year" -->">
182         <table style="width:400px;">
183           <tr>
184 <!--TMPL_UNLESS Name="onesubscription"-->
185                 <th># Subs</th>
186 <!--/TMPL_UNLESS-->
187                 <th>Date published
188                 </th>
189                 <th>Date received
190                 </th>
191                 <th>Number
192                 </th>
193                 <th>Status
194                 </th>
195                 <th>Notes
196                 </th>
197                 <th>Branch
198                 </th>
199                 <th>Routing
200                 </th>
201                 <th>Edit
202                 </th>
203             </tr>
204       <!-- TMPL_LOOP Name="serials" -->
205     <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
206 <!--TMPL_UNLESS Name="onesubscription"-->
207                  <td><a href="serials-collection.pl?subscriptionid=<!--TMPL_VAR Name="subscriptionid"-->"><!--TMPL_VAR Name="subscriptionid"--></a></td>
208 <!--/TMPL_UNLESS-->
209                 <td>
210                     <!-- TMPL_VAR Name="publisheddate" -->
211                 </td>
212                 <td>
213                     <!-- TMPL_VAR Name="planneddate" -->
214                 </td>
215                 <td>
216                     <!-- TMPL_VAR Name="serialseq" -->
217                 </td>
218                 <td>
219                     <!-- 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 -->
220                 </td>
221                 <td>
222                     <!-- TMPL_VAR Name="notes" -->
223                 </td>
224                 <td>
225                     <!-- TMPL_VAR Name="branchcode" -->
226                 </td>
227                 <td>
228                    <a href="" onclick="print_slip(<!-- TMPL_VAR NAME="subscriptionid" ESCAPE="HTML" -->, '<!-- TMPL_VAR NAME="serialseq" ESCAPE="HTML" -->'); return false" >Print list</a>
229                 </td>
230                 <td>
231                   <!--TMPL_IF Name="cannotedit"-->
232                     disabled
233                   <!--TMPL_ELSE -->
234                     <!--TMPL_IF Name="subscriptionexpired"-->
235                     <input type="checkbox" name="serialid" value="<!--TMPL_VAR Name="serialid"-->" disabled="disabled" />
236                     <!--TMPL_ELSE-->
237                       <!--TMPL_IF Name="checked"-->
238                     <input type="checkbox" name="serialid" checked="checked" value="<!--TMPL_VAR Name="serialid"-->" />
239                       <!--TMPL_ELSE -->
240                     <input type="checkbox" name="serialid" value="<!--TMPL_VAR Name="serialid"-->" />
241                       <!--/TMPL_IF-->           
242                     <!--/TMPL_IF -->
243                   <!--/TMPL_IF -->
244                 </td>
245             </tr>
246       <!-- /TMPL_LOOP -->
247         </table>
248       <p><input type="submit" value="Edit serials" />&nbsp;<input type="button" value="Generate Next" onclick="javascript:generateNext(<!-- TMPL_VAR NAME="subscriptionidlist" -->)" /></p>
249     </div>
250     <!--/TMPL_LOOP -->
251   <input type="hidden" name="subscriptionid" value="<!--TMPL_VAR Name="subscriptionidlist"-->" />
252
253 </div>
254 </form>
255 <!-- /TMPL_IF -->
256
257 </div>
258 </div>
259
260 <div class="yui-b">
261 <!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
262 </div>
263 </div>
264 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->