1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Serials › Serial Edition <!-- TMPL_VAR name="bibliotitle" --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script language="JavaScript" type="text/javascript">
6 function popup(subscriptionid) {
7 window.open("subscription-renew.pl?subscriptionid="+subscriptionid,"subscription_renewal",'width=700,height=400,toolbar=false,scrollbars=yes');
10 function barcode_check(){
11 <!-- TMPL_IF NAME="count" -->
12 var count = <!-- TMPL_VAR NAME="count" -->;
13 for(var i=1;i<=count;i++){
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");
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?");
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";
50 // document.getElementById("error"+i).style.backgroundColor="#FFFFFF";
54 if (total_errors==0) {
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)");
63 function unHideItems(index,labelindex, serialId) {
64 subfield = document.getElementById(index);
65 subfield.style.display = 'block';
66 label = document.getElementById(labelindex);
67 label.style.display='none';
68 console.log(index, labelindex);
70 // Prefilling 995$v with issue number
72 itemid = $("fieldset#" + index + " div.cataloguing_additem_itemlist div.items").attr("id");
73 // Getting subfield id
74 subfieldid = "subfield" + itemid.substr(4) + "v";
76 $("#" + subfieldid + " input[type='text']").val($("#serialseq" + serialId).val());
79 function HideItems(index,labelindex) {
80 subfield = document.getElementById(index);
81 subfield.style.display = 'none';
82 label = document.getElementById(labelindex);
83 label.style.display='block';
85 function CloneSubfield(index){
86 var original = document.getElementById(index); //original <div>
87 var clone = original.cloneNode(true);
88 var new_key = CreateKey();
89 var old_id = original.getAttribute('id');
90 old_id=old_id.substr(12);
91 var new_id = old_id+new_key;
93 // set the attribute for the new 'div' subfields
94 var inputs = clone.getElementsByTagName('input');
95 var selects = clone.getElementsByTagName('select');
96 var textareas = clone.getElementsByTagName('textarea');
100 for(var i=0,len=inputs.length; i<len ; i++ ){
101 id_input = inputs[i].getAttribute('id')+new_key;
102 inputs[i].setAttribute('id',id_input);
103 inputs[i].setAttribute('name',inputs[i].getAttribute('name'));
107 for(var i=0,len=selects.length; i<len ; i++ ){
108 id_input = selects[i].getAttribute('id')+new_key;
109 selects[i].setAttribute('id',selects[i].getAttribute('id')+new_key);
110 selects[i].setAttribute('name',selects[i].getAttribute('name'));
114 for(var i=0,len=textareas.length; i<len ; i++ ){
115 id_input = textareas[i].getAttribute('id')+new_key;
116 textareas[i].setAttribute('id',textareas[i].getAttribute('id')+new_key);
117 textareas[i].setAttribute('name',textareas[i].getAttribute('name'));
120 <!-- TMPL_UNLESS NAME='advancedMARCEditor' -->
121 // when cloning a subfield, reset its label too.
122 var label = clone.getElementsByTagName('label')[0];
123 label.setAttribute('for',id_input);
124 <!-- /TMPL_UNLESS -->
126 // setting a new if for the parent div
127 clone.setAttribute('id',new_id);
131 var spans = clone.getElementsByTagName('span');
133 for(var i = 0 ,lenspans = spans.length ; i < lenspans ; i++){
134 if(spans[i].getAttribute('class') == 'buttonPlus'){
135 CloneButtonPlus = spans[i];
136 CloneButtonPlus.setAttribute('onclick',"CloneSubfield('" + new_id + "')");
137 var buttonUp = clone.getElementsByTagName('img')[0];
138 buttonUp.setAttribute('onclick',"upSubfield('" + new_id + "')");
144 // do nothig if ButtonPlus & CloneButtonPlus don't exist.
146 // insert this line on the page
147 original.parentNode.insertBefore(clone,original.nextSibling);
151 <style type="text/css">#serials_edit fieldset.rows label, #serials_edit fieldset.rows span.label {
155 #serials_edit fieldset.rows select { max-width : 15em; }
156 #serials_edit fieldset.rows li {
157 padding-bottom : 3px;
159 #serials_edit .input_marceditor {
164 <!-- TMPL_INCLUDE NAME="header.inc" -->
165 <!-- TMPL_INCLUDE NAME="serials-search.inc" -->
167 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › Serial Edition <i><!-- TMPL_VAR name="bibliotitle" --></i></div>
169 <div id="doc3" class="yui-t2">
175 <h1>Serial Edition <i><!-- TMPL_VAR name="bibliotitle" --></i></h1>
176 <form method="post" name="f" action="serials-edit.pl" id="serials_edit">
177 <!--onsubmit="return barcode_check()">-->
179 <!--TMPL_IF Name="Errors" -->
180 <div class="dialog alert">
182 <!--TMPL_IF name="barcode_not_unique"--><li>Error : Barcode Not Unique For <!--TMPL_LOOP Name="errseq"-->serialseq <!--TMPL_VAR Name="serialseq"--><br/><!--/TMPL_LOOP --></li><!--/TMPL_IF-->
187 <input type="hidden" name="op" value="serialchangestatus" />
191 <th>Published on</th>
196 <!-- TMPL_LOOP name="serialslist" -->
199 <input type="hidden" name="serialid" value="<!-- TMPL_VAR name="serialid" -->" />
200 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
201 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
202 <input type="hidden" name="itemcount" value="<!-- TMPL_VAR name="issuesatonce" -->" />
203 <input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->" />
204 Issue <input type="text" name="serialseq" id="serialseq<!-- TMPL_VAR name="serialid" -->" value="<!-- TMPL_VAR name="serialseq" -->" size="20" maxlength="100" />
207 <input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size="10" maxlength="15" />
210 <input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size="10" maxlength="15" />
213 <!--TMPL_IF name="editdisable"-->
214 <input type="hidden" name="status" id="status<!-- TMPL_VAR NAME="num" -->" value="1">
215 <select name="status" size="1" disabled="disabled">
217 <!--TMPL_IF Name="serialsadditems"-->
218 <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"-->', <!--TMPL_VAR Name="serialid"-->)} else { HideItems('items'+<!-- TMPL_VAR NAME="subscriptionid" -->+<!-- TMPL_VAR NAME="serialid" -->,'label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')}" >
220 <select name="status" size="1" id="status<!-- TMPL_VAR NAME="num" -->" >
223 <!--TMPL_IF name="status1" -->
224 <option value="1" selected="selected">Expected</option>
226 <!--TMPL_IF name="status2" -->
227 <option value="2" selected="selected">Arrived</option>
229 <option value="2">Arrived</option>
231 <!--TMPL_IF name="status3" -->
232 <option value="3" selected="selected">Late</option>
234 <option value="3">Late</option>
236 <!--TMPL_IF name="status4" -->
237 <option value="4" selected="selected">Missing</option>
239 <option value="4">Missing</option>
241 <!--TMPL_IF name="status7" -->
242 <option value="7" selected="selected">Claimed</option>
244 <option value="7">Claimed</option>
246 <!--TMPL_IF name="status5" -->
247 <option value="5" selected="selected">Not Available</option>
249 <option value="5">Not Available</option>
251 <!--TMPL_IF name="status6" -->
252 <option value="6" selected="selected">Delete</option>
254 <option value="6">Delete</option>
260 <input type="text" name="notes" value="<!-- TMPL_VAR name="sernotes" -->" size="20" maxlength="255" />
263 <!--TMPL_UNLESS Name="subscriptionexpired"-->
264 <!--TMPL_IF Name="serialsadditems"-->
267 <a id="label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->" style="color: grey; font-size: 80%; cursor: pointer;" onclick="unHideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->', <!--TMPL_VAR Name="serialid"-->)">
268 Click to add item</a>
269 <fieldset class="rows" style="display:none;" id="items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->">
270 <legend><a style="cursor: pointer;" onclick="HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
273 <div class="cataloguing_additem_itemlist">
274 <!-- TMPL_LOOP NAME="items" -->
275 <div id="item<!-- TMPL_VAR NAME="serialid" --><!-- TMPL_VAR NAME="countitems" -->" class="items">
276 <ol><!-- TMPL_LOOP NAME="iteminformation" --><li>
277 <div class="subfield_line" style="<!-- TMPL_VAR NAME='hidden' -->;" id="subfield<!-- TMPL_VAR NAME='serialid' --><!-- TMPL_VAR NAME='countitems' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->">
279 <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>
280 <!-- TMPL_VAR NAME="marc_value" -->
281 <input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
282 <input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
283 <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
284 <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
285 <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
286 <!-- TMPL_IF NAME="ITEM_SUBFIELDS_ARE_NOT_REPEATABLE" -->
287 <span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='serialid' --><!-- TMPL_VAR NAME='countitems' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">+</span>
291 <!-- /TMPL_LOOP--></ol></div><!-- /iteminformation -->
293 <input type="hidden" name="moditem" value="" />
294 <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="itemtagfield" -->" />
295 <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="itemtagsubfield" -->" />
296 <input type="hidden" name="serial" value="<!-- TMPL_VAR NAME="serialid" -->" />
297 <input type="hidden" name="bibnum" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
298 <input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
299 <input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
300 <!--/TMPL_LOOP--> <!-- /items -->
308 <!-- TMPL_LOOP name="newserialloop" -->
309 <!--TMPL_UNLESS Name="subscriptionexpired"-->
312 <input type="hidden" name="serialid" value="NEW" />
313 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
314 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
315 <input type="hidden" name="itemcount" value="<!-- TMPL_VAR name="issuesatonce" -->" />
316 <input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->" />
317 Supplemental 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"-->', <!--TMPL_VAR Name="serialid"-->)} else {HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!-- TMPL_VAR NAME="serialid" -->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')}" />
320 <input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size="10" maxlength="15" />
323 <input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size="10" maxlength="15" />
326 <select name="status" size="1" id="addstatus<!-- TMPL_VAR NAME="num" -->">
327 <option value="">----</option>
328 <!--TMPL_IF name="status1" -->
329 <option value="1" selected="selected">Expected</option>
331 <!--TMPL_IF name="status2" -->
332 <option value="2" selected="selected">Arrived</option>
334 <option value="2">Arrived</option>
336 <!--TMPL_IF name="status3" -->
337 <option value="3" selected="selected">Late</option>
339 <option value="3">Late</option>
341 <!--TMPL_IF name="status4" -->
342 <option value="4" selected="selected">Missing</option>
344 <option value="4">Missing</option>
346 <!--TMPL_IF name="status7" -->
347 <option value="7" selected="selected">Claimed</option>
349 <option value="7">Claimed</option>
351 <!--TMPL_IF name="status5" -->
352 <option value="5" selected="selected">Not Available</option>
354 <option value="5">Not Available</option>
356 <!--TMPL_IF name="status6" -->
357 <option value="6" selected="selected">Delete</option>
359 <option value="6">Delete</option>
365 <input type="text" name="notes" value="" size="20" maxlength="255" />
368 <!--TMPL_IF Name="serialsadditems"-->
371 <a id="label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->" style="color: grey; font-size: 80%; cursor: pointer;" onclick="unHideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->', <!--TMPL_VAR Name="serialid"-->)">
372 Click to add item</a>
373 <fieldset class="rows" style="display:none;" id="items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->">
374 <legend><a style="cursor: pointer;" onclick="HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
377 <div class="cataloguing_additem_itemlist">
378 <div id="item<!-- TMPL_VAR NAME="serialid" --><!-- TMPL_VAR NAME="countitems" -->" class="items">
379 <ol><!-- TMPL_LOOP NAME="iteminformation" --><li>
380 <div class="subfield_line" style="<!-- TMPL_VAR NAME='hidden' -->;" id="subfield<!-- TMPL_VAR NAME='serialid' --><!-- TMPL_VAR NAME='countitems' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->">
382 <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>
383 <!-- TMPL_VAR NAME="marc_value" -->
384 <input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
385 <input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
386 <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
387 <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
388 <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
389 <!-- TMPL_IF NAME="ITEM_SUBFIELDS_ARE_NOT_REPEATABLE" -->
390 <span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='serialid' --><!-- TMPL_VAR NAME='countitems' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">+</span>
393 </li><!-- /TMPL_LOOP --></ol>
395 <input type="hidden" name="moditem" value="" />
396 <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="itemtagfield" -->" />
397 <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="itemtagsubfield" -->" />
398 <input type="hidden" name="serial" value="<!-- TMPL_VAR NAME="serialid" -->" />
399 <input type="hidden" name="bibnum" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
400 <input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
401 <input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
412 <fieldset class="action"><input type="submit" value="Save" class="button" accesskey="w" /> <!--onclick="Check(this.form)" --></fieldset>
419 <!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
421 <!--TMPL_LOOP Name="subscriptions"-->
423 <li><a href="serials-collection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" title="serial collection for <!--TMPL_VAR Name="bibliotitle"-->">Serial collection</a></li>
424 <li><a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" title="detail of the subscription">Subscription #<!-- TMPL_VAR name="subscriptionid" --></a></li>
425 <!--TMPL_IF name="abouttoexpire"--><a href="#" onclick="javascript:popup(<!--TMPL_VAR Name="subscriptionid"-->)">Renew <!--TMPL_VAR Name="subscriptionid"--></a>
428 <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>
431 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->