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