Various tweaks to menus and labels, including adding virtual shelves link to global...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-edit.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Serials &rsaquo; Serial Edition <!-- TMPL_VAR name="bibliotitle" --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script language="JavaScript" type="text/javascript">
5 //<![CDATA[
6 function popup(subscriptionid) {
7         window.open("subscription-renew.pl?subscriptionid="+subscriptionid,"subscription_renewal",'width=700,height=400,toolbar=false,scrollbars=yes');
8 }
9
10 function barcode_check(){
11     <!-- TMPL_IF NAME="count" -->
12     var count = <!-- TMPL_VAR NAME="count" -->;
13     for(var i=1;i<=count;i++){
14
15         var barcodenum = "barcode"+i;
16         var statusnum = "status"+i;
17         var elembarcode = "document.getElementById('"+barcodenum+"')";
18         var elemstatus = "document.getElementById('"+statusnum+"')";
19 // alert(elembarcode+"\n"+eval(elembarcode+".value));
20 // alert(elemstatus+"\n"+eval(elemstatus+".value"));
21         if(eval(elembarcode+".value") =='' && eval(elemstatus+".value") == 2){
22             var answer = confirm("Leave barcode blank?\n - Note: unable to change this later");
23             if (answer){
24                 document.f.submit();
25             } else {
26                 return false;
27             }
28         }
29         if(eval(elembarcode+".value".indexOf('TEMP')) > 0 && eval(elemstatus+".value") == 2){
30             var answer = confirm("A barcode was not entered.\nDo you want to put in a barcode\nor do you want to use a system generated barcode?");
31             if (answer){
32                 document.f.submit();
33             } else {
34                 return false;
35             }
36         }
37     }
38     <!--/TMPL_IF-->
39 }
40
41 function Check(f) {
42     var total_errors=0;
43 //      alert(f.field_value.length);
44     for (i=0 ; i<f.field_value.length ; i++) {
45 //      alert (f.field_value[i].value);
46         if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
47             document.getElementById("error"+i).style.backgroundColor="#FF0000";
48             total_errors++;
49         } else {
50 //                      document.getElementById("error"+i).style.backgroundColor="#FFFFFF";
51         }
52     }
53     var alertString2;
54     if (total_errors==0) {
55         document.f.submit();
56     } else {
57         alertString2  = _("Form not submitted because of the following problem(s)");
58         alertString2 += "\n------------------------------------------------------------------------------------\n";
59         alertString2 += "\n- "+ total_errors+_(" mandatory fields empty (see bold subfields)");
60         alert(alertString2);
61     }
62 }
63 <!--TMPL_IF Name="serialsadditems"-->
64 function unHideItems(index,labelindex) {
65         subfield = document.getElementById(index);
66         subfield.style.display = 'block';
67         label = document.getElementById(labelindex);
68         label.style.display='none';     
69 }
70 function HideItems(index,labelindex) {
71         subfield = document.getElementById(index);
72         subfield.style.display = 'none';
73         label = document.getElementById(labelindex);
74         label.style.display='block';    
75 }
76 <!--/TMPL_IF>
77 //]]>
78 </script>
79 </head>
80 <body>
81 <!-- TMPL_INCLUDE NAME="header.inc" -->
82 <!-- TMPL_INCLUDE NAME="serials-search.inc" -->
83
84 <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 Edition <i><!-- TMPL_VAR name="bibliotitle" --></i></div>
85
86 <div id="doc3" class="yui-t2">
87    
88    <div id="bd">
89         <div id="yui-main">
90         <div class="yui-b">
91
92 <h1>Serial Edition <i><!-- TMPL_VAR name="bibliotitle" --></i></h1>
93 <form method="post" name="f" action="serials-edit.pl">
94 <!--onsubmit="return barcode_check()">-->
95 <div id="action">
96     <ul>
97     <!--TMPL_LOOP Name="subscriptions"-->
98     
99         <li><a href="serials-collection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" title="serial Collection for <!--TMPL_VAR Name="bibliotitle"-->">Serial collection</a></li>
100         <li><a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" title="detail of the subscription">Subscription #<!-- TMPL_VAR name="subscriptionid" --></a></li>
101         <!--TMPL_IF name="abouttoexpire"--><a href="#" onclick="javascript:popup(<!--TMPL_VAR Name="subscriptionid"-->)">Renew <!--TMPL_VAR Name="subscriptionid"--></a>
102         <!--/TMPL_IF-->
103         <!--TMPL_IF name="subscriptionexpired"--><a href="#" onclick="javascript:popup(<!--TMPL_VAR Name="subscriptionid"-->)">Renew <!--TMPL_VAR Name="subscriptionid"--></a>
104         <!--/TMPL_IF-->
105       <!--/TMPL_LOOP-->
106     <li><a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" title="go to <!-- TMPL_VAR name="bibliotitle" -->">Show Biblio</a></li></ul>
107 </div>
108 <!--TMPL_IF Name="barcode_not_unique" -->
109 Error : Barcode Not Unique For serialseq <!--TMPL_VAR Name="errserialseq"-->
110 <!--/TMPL_IF -->
111
112  <input type="hidden" name="op" value="serialchangestatus" />
113         <table>
114         <tr>
115                 <th>Numbered</th>
116                 <th>Published on</th>
117                 <th>planned for</th>
118                 <th>Status</th>
119                 <th>Notes</th>
120         </tr>
121 <!-- TMPL_LOOP name="serialslist" -->
122     <tr>
123         <td>
124             <input type="hidden" name="serialid" value="<!-- TMPL_VAR name="serialid" -->" />
125             <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
126             <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
127             <input type="hidden" name="itemcount" value="<!-- TMPL_VAR name="issuesatonce" -->" />
128             <input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->" />
129             Issue <input type="text" name="serialseq" value="<!-- TMPL_VAR name="serialseq" -->" size="20" maxlength="100" />
130         </td>
131         <td>
132             <input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size="10" maxlength="15" />
133         </td>
134         <td>
135             <input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size="10" maxlength="15" />
136         </td>
137         <td>
138             <!--TMPL_IF name="editdisable"-->
139               <input type="hidden" name="status" id="status<!-- TMPL_VAR NAME="num" -->" value="1">
140               <select name="status" size="1"  disabled="disabled">
141             <!--TMPL_ELSE-->
142               <select name="status" size="1" id="status<!-- TMPL_VAR NAME="num" -->" onchange="if (this.value==2){unHideItems('items'+<!-- TMPL_VAR NAME="subscriptionid" -->+<!-- TMPL_VAR NAME="serialid" -->,'label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')}" >
143             <!--/TMPL_IF-->
144   <!--TMPL_IF name="status1" -->
145                     <option value="1" selected="selected">Waited</option>
146   <!-- /TMPL_IF -->
147   <!--TMPL_IF name="status2" -->
148                     <option value="2" selected="selected">Arrived</option>
149   <!--TMPL_ELSE -->
150                     <option value="2">Arrived</option>
151   <!-- /TMPL_IF -->
152   <!--TMPL_IF name="status3" -->
153                     <option value="3" selected="selected">Late</option>
154   <!-- TMPL_ELSE -->
155                     <option value="3">Late</option>
156   <!-- /TMPL_IF -->
157   <!--TMPL_IF name="status4" -->
158                     <option value="4" selected="selected">Missing</option>
159   <!-- TMPL_ELSE -->
160                     <option value="4">Missing</option>
161   <!-- /TMPL_IF -->
162   <!--TMPL_IF name="status7" -->
163                     <option value="7" selected="selected">Claimed</option>
164   <!-- TMPL_ELSE -->
165                     <option value="7">Claimed</option>
166   <!-- /TMPL_IF -->
167   <!--TMPL_IF name="status5" -->
168                     <option value="5" selected="selected">Not Available</option>
169   <!-- TMPL_ELSE -->
170                     <option value="5">Not Available</option>
171   <!-- /TMPL_IF -->
172   <!--TMPL_IF name="status6" -->
173                     <option value="6" selected="selected">Delete</option>
174   <!-- TMPL_ELSE -->
175                     <option value="6">Delete</option>
176   <!-- /TMPL_IF -->
177             </select>
178
179         </td>
180         <td>
181             <input type="text" name="notes" value="<!-- TMPL_VAR name="sernotes" -->" size="20" maxlength="255" />
182         </td>
183     </tr>
184   <!--TMPL_UNLESS Name="subscriptionexpired"-->
185   <!--TMPL_IF Name="serialsadditems"-->
186           <tr>
187           <td colspan="5">
188       <a id="label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->" style="color: grey; font-size: 80%; cursor: se-resize;"  onclick="unHideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
189              Items   </a>
190         <fieldset style="display:none;" id="items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->">
191         <legend><a style="cursor: se-resize;"  onclick="HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
192                 Items</a>
193         </legend>
194           <div id="cataloguing_additem_itemlist">
195         <!-- TMPL_LOOP NAME="items" -->
196         <div id="item<!-- TMPL_VAR NAME="serialid" --><!-- TMPL_VAR NAME="countitems" -->" class="items">
197         <!-- TMPL_LOOP NAME="iteminformation" -->
198         <p>
199         <div id="subfield<!-- TMPL_VAR NAME="serialid" --><!-- TMPL_VAR NAME="countitems" --><!-- TMPL_VAR NAME="countsubfield" -->" class="subfield">                <label><!-- TMPL_VAR NAME="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF --></label>
200                 <!-- TMPL_VAR NAME="marc_value" -->
201                 <input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
202                 <input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
203                 <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
204                 <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
205                 <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
206             </div>
207          </p>
208         <!-- /tmpl_loop -->
209         
210         <input type="hidden" name="moditem" value="" /> 
211         <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="itemtagfield" -->" />
212         <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="itemtagsubfield" -->" />
213         <input type="hidden" name="serial" value="<!-- TMPL_VAR NAME="serialid" -->" />
214         <input type="hidden" name="bibnum" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
215         <input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
216         <input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
217         </div>
218         <!--/TMPL_LOOP-->
219         </div>
220         </fieldset>
221     </td>
222     </tr>
223   <!-- /TMPL_IF -->
224   <!--/TMPL_UNLESS -->
225 <!-- /TMPL_LOOP -->
226 <!-- TMPL_LOOP name="newserialloop" -->
227     <!--TMPL_UNLESS Name="subscriptionexpired"-->
228     <tr>
229         <td>
230             <input type="hidden" name="serialid" value="NEW" />
231             <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
232             <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
233             <input type="hidden" name="itemcount" value="<!-- TMPL_VAR name="issuesatonce" -->" />
234             <input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->" />
235             <b>Subs. <!-- TMPL_VAR name="subscriptionid" --></b> New Issue <input type="text" name="serialseq" value="" size="20" maxlength="100" onchange="if (this.value!=''){unHideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!-- TMPL_VAR NAME="serialid" -->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')} else {HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!-- TMPL_VAR NAME="serialid" -->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')}" />
236         </td>
237         <td>
238             <input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size="10" maxlength="15" />
239         </td>
240         <td>
241             <input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size="10" maxlength="15" />
242         </td>
243         <td>
244             <select name="status" size="1" id="addstatus<!-- TMPL_VAR NAME="num" -->">
245   <!--TMPL_IF name="status1" -->
246                     <option value="1" selected="selected">Waited</option>
247   <!-- /TMPL_IF -->
248   <!--TMPL_IF name="status2" -->
249                     <option value="2" selected="selected">Arrived</option>
250   <!--TMPL_ELSE -->
251                     <option value="2">Arrived</option>
252   <!-- /TMPL_IF -->
253   <!--TMPL_IF name="status3" -->
254                     <option value="3" selected="selected">Late</option>
255   <!-- TMPL_ELSE -->
256                     <option value="3">Late</option>
257   <!-- /TMPL_IF -->
258   <!--TMPL_IF name="status4" -->
259                     <option value="4" selected="selected">Missing</option>
260   <!-- TMPL_ELSE -->
261                     <option value="4">Missing</option>
262   <!-- /TMPL_IF -->
263   <!--TMPL_IF name="status7" -->
264                     <option value="7" selected="selected">Claimed</option>
265   <!-- TMPL_ELSE -->
266                     <option value="7">Claimed</option>
267   <!-- /TMPL_IF -->
268   <!--TMPL_IF name="status5" -->
269                     <option value="5" selected="selected">Not Available</option>
270   <!-- TMPL_ELSE -->
271                     <option value="5">Not Available</option>
272   <!-- /TMPL_IF -->
273   <!--TMPL_IF name="status6" -->
274                     <option value="6" selected="selected">Delete</option>
275   <!-- TMPL_ELSE -->
276                     <option value="6">Delete</option>
277   <!-- /TMPL_IF -->
278             </select>
279
280         </td>
281         <td>
282             <input type="text" name="notes" value="" size="20" maxlength="255" />
283         </td>
284     </tr>
285   <!--TMPL_IF Name="serialsadditems"-->
286           <tr>
287           <td colspan="5">
288       <a id="label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->" style="color: grey; font-size: 80%; cursor: se-resize;"  onclick="unHideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
289              Item</a>
290         <fieldset style="display:none;" id="items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->">
291         <legend><a style="cursor: se-resize;"  onclick="HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
292                 Item</a>
293         </legend>
294           <div id="cataloguing_additem_itemlist">
295         <div id="item<!-- TMPL_VAR NAME="serialid" --><!-- TMPL_VAR NAME="countitems" -->" class="items">
296         <!-- TMPL_LOOP NAME="iteminformation" -->
297         <p>
298         <div id="subfield<!-- TMPL_VAR NAME="serialid" --><!-- TMPL_VAR NAME="countitems" --><!-- TMPL_VAR NAME="countsubfield" -->" class="subfield">                <label><!-- TMPL_VAR NAME="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF --></label>
299                 <!-- TMPL_VAR NAME="marc_value" -->
300                 <input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
301                 <input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
302                 <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
303                 <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
304                 <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
305         </div>
306         </p>
307         <!-- /tmpl_loop -->
308         
309         <input type="hidden" name="moditem" value="" /> 
310         <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="itemtagfield" -->" />
311         <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="itemtagsubfield" -->" />
312         <input type="hidden" name="serial" value="<!-- TMPL_VAR NAME="serialid" -->" />
313         <input type="hidden" name="bibnum" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
314         <input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
315         <input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
316         </div>
317         </div>
318         </fieldset>
319     </td>
320     </tr>
321   <!-- /TMPL_IF -->
322   <!--/TMPL_UNLESS -->
323 <!-- /TMPL_LOOP -->
324
325 </table>
326     <input type="submit" value="Save"  class="button" accesskey="w" /> <!--onclick="Check(this.form)" -->
327 </form>
328
329 </div>
330 </div>
331
332 <div class="yui-b">
333 <!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
334 </div>
335 </div>
336 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->