New XML API
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / serials / subscription-detail.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!--
2 TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <!-- TMPL_INCLUDE NAME="menus.inc" -->
4 <!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
5
6 <script language="Javascript" type="text/javascript">
7 <!--
8 // the english words used in display purposes
9 var text = new Array('Number','Volume','Issue','Month','Week','Starting with:','Rollover at:','Choose Hemisphere:','Northern','Southern',
10 'Autumn','Winter','Spring','Summer','Fall','Season','Year');
11
12 // common pre defined number patterns
13 function num_pattern() {
14 var patternchoice = '<!--TMPL_VAR NAME='numberpattern'-->';
15         switch(patternchoice){
16         case "2":
17                 options(text[1],text[0],text[2]);
18                 irregularity();
19                 display_table(0);
20                 break;
21         case "3":
22                 options(text[1],text[0]);
23                 irregularity();
24                 display_table(0);
25                 break;
26         case "4":
27                 options(text[1],text[2]);
28                 irregularity();
29                 display_table(0);
30                 break;
31         case "5":
32                 options(text[0],text[2]);
33                 irregularity();
34                 display_table(0);
35                 break;
36         case "6":
37                 var d = new Date();
38                 var sYear = d.getFullYear();
39                 // options_seasons(text[15],sYear);
40                 irregularity();
41                 is_season = 1;
42                 display_table(0);
43                 break;
44         case "7":
45                 display_table(1);
46                 irregularity();
47                 break;
48         default:
49                 options(text[0]);
50                 irregularity();
51                 display_table(0);
52                 break;
53         }
54 }
55
56 function display_table(n) {
57         if(n==1){
58                 document.getElementById("basetable").style.display = 'block';
59         } else {
60                 document.getElementById("basetable").style.display = 'none';
61         }
62 }
63
64 // to dispaly the options section
65 function options(x,y,z){
66 var textbox = '';
67         // alert("X: "+x+"Y: "+y+"Z: "+z);
68         if(x){
69                 document.f.xfield.value = x;
70                 if(y){
71                         document.f.yfield.value = y;
72                         if(z){
73                                 document.f.zfield.value = z;
74                         }
75                 }
76         }
77 }
78
79 function irregularity(){
80         var periodicity = '<!-- TMPL_VAR NAME="periodicity"-->';
81         switch(periodicity){
82         case "1":
83                 var names = new Array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
84                 break;
85         case "2":
86                 <!-- TMPL_IF NAME="weekarrayjs" -->
87                 var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
88                 <!-- /TMPL_IF -->
89                 break;
90         case "3":
91                 <!-- TMPL_IF NAME="weekarrayjs" -->
92                 var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
93                 <!-- /TMPL_IF -->
94                 break;
95         case "4":
96                 <!-- TMPL_IF NAME="weekarrayjs" -->
97                 var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
98                 <!-- /TMPL_IF -->
99                 break;
100         case "5":
101                 var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
102                 break;
103         case "6":
104                 var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
105                 break;
106         case "7":
107                 var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
108                 break;
109         case "8":
110                 var names = new Array('Autumn','Winter','Spring','Summer','Fall');
111                 break;
112         case "9":
113                 var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
114                 break;
115         case "10":
116                 expected =1;
117                 break;
118         default:
119                 break;
120         }
121
122         <!-- TMPL_IF NAME="irregularity" -->
123         var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
124         var irregarray = irregular.split('|');
125         var irregtext = '<p>';
126         for(var i=0;i<irregarray.length;i++){
127                 irregtext += names[i]+' &nbsp;';
128         }
129         irregtext += '</p>';
130         document.getElementById("irreg").innerHTML = irregtext;
131         <!-- /TMPL_IF -->
132 }
133
134 -->
135 </script>
136
137
138 <h1>Subscription Details for biblio :  <!-- TMPL_VAR name="biblionumber" --></h1>
139 <form class="inline" method="get" action="subscription-add.pl">
140 <input type="hidden" name="op" value="mod" />
141 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
142 <input type="submit" class="submit" title="Modify subscription" value="Edit" /></form>
143
144 <form class="inline" method="get" action="serials-receive.pl">
145 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
146 <input type="submit" class="submit" value="Receive Issues" /></form>
147
148 <form class="inline" method="get" action="serial-issues.pl">
149 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
150 <input type="submit" class="submit"  title="All issues on this title" value="Issue History" /></form>
151
152 <form class="inline" method="get" action="/cgi-bin/koha/serials/serials-home.pl">
153 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
154 <input type="submit" class="submit"  title="all subscriptions on <!-- TMPL_VAR name="bibliotitle" -->" value="Subscriptions" /></form>
155
156 <form class="inline" method="get" action="/cgi-bin/koha/catalogue/MARCdetail.pl">
157 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
158 <input type="submit" class="submit"  title="go to <!-- TMPL_VAR name="bibliotitle" -->" value="View Biblio Record" /></form>
159
160 <form class="inline"><input type="submit" class="cancel" value="Delete Subscription" onclick="confirm_deletion(); return false;" /></form>
161 <!-- TMPL_IF NAME="routing" -->
162 <form class="inline" method="get" action="/cgi-bin/koha/serials/routing.pl">
163 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
164 <input type="submit"  class="submit" value="Edit Routing List"/></form>
165 <!-- TMPL_ELSE -->
166 <form class="inline" method="get" action="/cgi-bin/koha/serials/routing.pl">
167 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
168 <input type="hidden" name="op" value="new" />
169 <input type="submit"  class="submit" value="Create Routing List"/></form>
170 <!-- /TMPL_IF -->
171
172 <table>
173 <tr valign="top"><td>
174
175 <div class="bloc25">
176         <h2>Subscription information</h2>
177         <p><label class="label100">Librarian identity:</label> <!-- TMPL_VAR name="librarian" --></p><br />
178
179         <p><label class="label100">Supplier:</label> <!-- TMPL_VAR name="aqbooksellername" -->&nbsp;</p>
180
181         <p><label class="label100">Cost:</label> <!-- TMPL_VAR name="cost" -->&nbsp;</p>
182
183         <p><label class="label100">Budget:</label> <!-- TMPL_VAR name="bookfundid" -->&nbsp;</p>
184
185         <p><label class="label100">Biblio:</label> <i>(<!-- TMPL_VAR name="biblionumber" -->)</i> <!-- TMPL_VAR name="bibliotitle" --></p><br />
186         <p><label class="label100">Call Number:</label> <!-- TMPL_VAR name="callnumber" -->&nbsp;</p>
187
188         <p><label class="label100">Notes:</label> <!-- TMPL_VAR name="notes" --></p>
189 </div>
190
191 <div class="bloc25">
192         <form name="f">
193         <h2>Planning</h2>
194         <p><label class="label100">Beginning date:</label> <!-- TMPL_VAR name="publisheddate" -->
195         </p>
196         <p><label class="label100">Frequency (*):</label>
197                 <!--TMPL_IF name="periodicity1" -->
198                                 1/day
199                 <!-- /TMPL_IF -->
200                 <!--TMPL_IF name="periodicity2" -->
201                                 1/week
202                 <!-- /TMPL_IF -->
203                 <!--TMPL_IF name="periodicity3" -->
204                                 1/2 weeks
205                 <!-- /TMPL_IF -->
206                 <!--TMPL_IF name="periodicity4" -->
207                                 1/3 weeks
208                 <!-- /TMPL_IF -->
209                 <!--TMPL_IF name="periodicity5" -->
210                                 1/Month
211                 <!-- /TMPL_IF -->
212                 <!--TMPL_IF name="periodicity6" -->
213                                 1/2 Months (6/year)
214                 <!-- /TMPL_IF -->
215                 <!--TMPL_IF name="periodicity7" -->
216                                 1/quarter
217                 <!-- /TMPL_IF -->
218                 <!--TMPL_IF name="periodicity8" -->
219                                 1/quarter
220                 <!-- /TMPL_IF -->
221                 <!--TMPL_IF name="periodicity9" -->
222                                 2/year
223                 <!-- /TMPL_IF -->
224                 <!--TMPL_IF name="periodicity10" -->
225                                 1/year
226                 <!-- /TMPL_IF -->
227                 <!--TMPL_IF name="periodicity11" -->
228                                 1/2 years
229                 <!-- /TMPL_IF -->
230         </p>
231         <p><label class="label100">Number Pattern:</label>
232                 <!-- TMPL_IF name="numberpattern1" -->
233                         Number
234                 <!-- /TMPL_IF -->
235                 <!-- TMPL_IF name="numberpattern2" -->
236                         Volume, Number, Issue
237                 <!-- /TMPL_IF -->
238                 <!-- TMPL_IF name="numberpattern3" -->
239                         Volume, Number
240                 <!-- /TMPL_IF -->
241                 <!-- TMPL_IF name="numberpattern4" -->
242                         Volume, Issue
243                 <!-- /TMPL_IF -->
244                 <!-- TMPL_IF name="numberpattern5" -->
245                         Number, Issue
246                 <!-- /TMPL_IF -->
247                 <!-- TMPL_IF name="numberpattern6" -->
248                         Seasonal only
249                 <!-- /TMPL_IF -->
250                 <!-- TMPL_IF name="numberpattern7" -->
251                         None of the above
252                 <!-- /TMPL_IF -->
253         </p>
254         <table cellpadding="0" cellspacing="0">
255         <tr><td>&nbsp;</td>
256             <td align="right"><input type="text" name="xfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
257         <!--TMPL_IF NAME="lastvalue2"-->
258             <td align="right"><input type="text" name="yfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
259         <!--/TMPL_IF-->
260         <!--TMPL_IF NAME="lastvalue3"-->
261             <td align="right"><input type="text" name="zfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
262         <!--/TMPL_IF-->
263         </tr>
264         <tr><td><p><label class="label100">Starting with:</label></p></td>
265             <td align="center"><!--TMPL_VAR NAME="lastvalue1"--></td>
266         <!--TMPL_IF NAME="lastvalue2"-->
267             <td align="center">&nbsp; 
268                         <!--TMPL_VAR NAME="lastvalue2"-->
269             </td>
270         <!--/TMPL_IF-->
271         <!--TMPL_IF NAME="lastvalue3"-->
272             <td align="center">&nbsp; 
273                         <!--TMPL_VAR NAME="lastvalue3"-->
274             </td>
275         <!--/TMPL_IF-->
276         </tr>
277         <tr><td><p><label class="label100">Rollover:</label></p></td>
278             <td align="center">&nbsp;</td>
279         <!--TMPL_IF NAME="whenmorethan2"-->
280             <td align="center">&nbsp; 
281                         <!--TMPL_VAR NAME="whenmorethan2"-->
282             </td>
283         <!--/TMPL_IF-->
284         <!--TMPL_IF NAME="whenmorethan3"-->
285             <td align="center">&nbsp; 
286                         <!--TMPL_VAR NAME="whenmorethan3"-->
287             </td>
288         <!--/TMPL_IF-->
289         </tr>
290         </table>
291         <!-- TMPL_IF NAME="irregularity" -->
292         <p><label class="label100">Irregularity:</label>
293                 <div id="irreg"></div>
294         </p>
295         <!-- /TMPL_IF -->
296         <p><label class="label100">Begins on:</label>
297                 <!--TMPL_VAR name="startdate" -->
298         </p>
299         </form>
300 </div>
301 <div class="bloc25">
302         <h2>Subscription length</h2>
303         <!-- TMPL_IF name="numberlength" --><p><label>Number of issues:</label> <!-- TMPL_VAR name="numberlength" --></p><!-- /TMPL_IF -->
304         <!-- TMPL_IF name="weeklength" --><p><label>Number of weeks:</label> <!-- TMPL_VAR name="weeklength" --></p><!-- /TMPL_IF -->
305         <!-- TMPL_IF name="monthlength" --><p><label class="label100">Number of months:</label> <!-- TMPL_VAR name="monthlength" --></p><!-- /TMPL_IF -->
306
307 </div>
308 <div class="bloc25">
309         <h2>Numbering calculation</h2>
310         <p><label class="label100">Numbering formula:</label> <!-- TMPL_VAR name="numberingmethod" --></p>
311 </div>
312 <div class="bloc25" id="basetable">
313         <table cellpadding="0" cellspacing="0" border="0" class="collapse">
314                 <tr>
315                         <th class="cell-header">&nbsp;</th>
316                         <th class="cell-header">X</th>
317                         <th class="cell-header">Y</th>
318                         <th class="cell-header">Z</th>
319                         </tr>
320                         <tr>
321                                 <td class="cell">Add</td>
322                                 <td class="cell">
323                                         <!-- TMPL_VAR name="add1" -->
324                                 </td>
325                                 <td class="cell">
326                                         <!-- TMPL_VAR name="add2" -->
327                                 </td>
328                                 <td class="cell">
329                                         <!-- TMPL_VAR name="add3" -->
330                                 </td>
331                         </tr>
332                         <tr>
333                                 <td class="cell">once every</td>
334                                 <td class="cell"><!-- TMPL_VAR name="every1" --></td>
335                                 <td class="cell"><!-- TMPL_VAR name="every2" --></td>
336                                 <td class="cell"><!-- TMPL_VAR name="every3" --></td>
337                         </tr>
338                         <tr>
339                                 <td class="cell">When more than</td>
340                                 <td class="cell"><!-- TMPL_VAR name="whenmorethan1" --> <!-- TMPL_IF name="innerloop1" --><br/>
341                                         <i>(is <!-- TMPL_VAR name="innerloop1" -->)</i><!-- /TMPL_IF --></td>
342                                 <td class="cell"><!-- TMPL_VAR name="whenmorethan2" --> <!-- TMPL_IF name="innerloop2" --><br/>
343                                         <i>(is <!-- TMPL_VAR name="innerloop2" -->)</i><!-- /TMPL_IF --></td>
344                                 <td class="cell"><!-- TMPL_VAR name="whenmorethan3" --> <!-- TMPL_IF name="innerloop3" --><br/>
345                                         <i>(is <!-- TMPL_VAR name="innerloop3" -->)</i><!-- /TMPL_IF --></td>
346                         </tr>
347                         <tr>
348                                 <td class="cell">Set back to</td>
349                                 <td class="cell"><!-- TMPL_VAR name="setto1" --></td>
350                                 <td class="cell"><!-- TMPL_VAR name="setto2" --></td>
351                                 <td class="cell"><!-- TMPL_VAR name="setto3" --></td>
352                         </tr>
353                         <tr>
354                                 <td class="cell">
355                                                 Last value
356                                 </td>
357                                 <td class="cell"><!-- TMPL_VAR name="lastvalue1" --></td>
358                                 <td class="cell"><!-- TMPL_VAR name="lastvalue2" --></td>
359                                 <td class="cell"><!-- TMPL_VAR name="lastvalue3" --></td>
360                         </tr>
361                 </table>
362 </div>
363 </td><td>
364 <div class="bloc25">
365         <h2>Issues</h2>
366         <table cellpadding="0" cellspacing="0" border="0" class="collapse">
367         <tr>
368                 <th class="cell-header">Issue number</th>
369                 <th class="cell-header">Planned date</th>
370                 <th class="cell-header">Status</th>
371         </tr>
372         <!-- TMPL_LOOP name="serialslist" -->
373                 <tr>
374                         <td class="cell">
375                                 <!-- TMPL_VAR name="serialseq" -->
376                         </td>
377                         <td class="cell">
378                                 <!-- TMPL_VAR name="planneddate" -->
379                         </td>
380                         <td class="cell">
381                                         <!--TMPL_IF name="status1" -->
382                                                 Waited
383                                         <!-- /TMPL_IF -->
384                                         <!--TMPL_IF name="status2" -->
385                                                 Arrived
386                                         <!-- /TMPL_IF -->
387                                         <!--TMPL_IF name="status3" -->
388                                                 Late
389                                         <!-- /TMPL_IF -->
390                                         <!--TMPL_IF name="status4" -->
391                                                 Missing
392                                         <!-- /TMPL_IF -->
393                         </td>
394                 </tr>
395         <!-- /TMPL_LOOP -->
396         </table>
397 </div>
398 </td></tr>
399 </table>
400
401
402 <script type="text/javascript">
403 function _(s) { return s } // dummy function for gettext
404 function confirm_deletion() {
405         <!-- TMPL_IF name="totalissues" -->
406                 var is_confirmed = confirm(_('You already made <!-- TMPL_VAR name="totalissues"--> receipts. Do you confirm deletion?'));
407         <!-- TMPL_ELSE -->
408                 var is_confirmed = confirm(_('Are you sure you want to delete this subscription?'));
409         <!-- /TMPL_IF -->       
410         if (is_confirmed) {
411                 window.location="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&op=del";
412         }
413 }
414 window.onload = num_pattern();
415 </script>
416
417 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->