1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Serials › Serial edition [% bibliotitle %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
5 <script type="text/javascript" src="[% themelang %]/js/prevent_submit.js"></script>
6 <script language="JavaScript" type="text/javascript">
8 function generateReceive() {
9 var subscriptionid = document.getElementsByName("subscriptionid")[0].value;
10 if(nbissues=prompt(_("How many issues do you want to receive ?"))){
11 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid+'&nbissues='+nbissues;
14 function popup(subscriptionid) {
15 window.open("subscription-renew.pl?subscriptionid="+subscriptionid,"subscription_renewal",'width=700,height=400,toolbar=false,scrollbars=yes');
18 function barcode_check(){
20 var count = [% count %];
21 for(var i=1;i<=count;i++){
23 var barcodenum = "barcode"+i;
24 var statusnum = "status"+i;
25 var elembarcode = "document.getElementById('"+barcodenum+"')";
26 var elemstatus = "document.getElementById('"+statusnum+"')";
27 // alert(elembarcode+"\n"+eval(elembarcode+".value));
28 // alert(elemstatus+"\n"+eval(elemstatus+".value"));
29 if(eval(elembarcode+".value") =='' && eval(elemstatus+".value") == 2){
30 var answer = confirm("Leave barcode blank?\n - Note: unable to change this later");
37 if(eval(elembarcode+".value".indexOf('TEMP')) > 0 && eval(elemstatus+".value") == 2){
38 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?");
48 function unHideItems(index,labelindex, serialId) {
49 subfield = document.getElementById(index);
50 subfield.style.display = 'block';
51 label = document.getElementById(labelindex);
52 label.style.display='none';
54 // Prefilling enumcron subfield with serial enumeration/issue number
56 item_div = $("fieldset#" + index + " div.cataloguing_additem_itemlist div.items");
57 // Getting subfield with enumcron mapping
58 subfield_div = $(item_div).find("input[name='kohafield'][value='items.enumchron']").parent();
60 $(subfield_div).children("input[type='text'][name='field_value']").val($("#serialseq" + serialId).val());
63 function HideItems(index,labelindex) {
64 subfield = document.getElementById(index);
65 subfield.style.display = 'none';
66 label = document.getElementById(labelindex);
67 label.style.display='block';
69 function setStatus(serialid){
70 $("#status"+serialid).val("2").attr("selected","selected");
72 function changeDate(elem, adate) {
73 $(elem).closest('tr').find('#expecteddate').val(adate);
75 function changeDate2(adate) {
76 var elem = document.getElementById("supexpecteddate");
80 $(document).ready(function() {
81 $("form#serials_edit").submit(function() {
83 $(this).find(".cataloguing_additem_itemlist:visible").each(function(){
84 total_errors = total_errors + CheckMandatorySubfields(this);
86 if ( total_errors > 0 ) {
87 var mes = _("Form not submitted because of the following problem(s)");
88 mes += "\n------------------------------------------------------------------------------------\n";
89 mes += "\n- " _("%s mandatory fields empty (highlighted)").format(total_errors);
98 <style type="text/css">#serials_edit fieldset.rows label, #serials_edit fieldset.rows span.label {
102 #serials_edit fieldset.rows select { max-width : 15em; }
103 #serials_edit fieldset.rows li {
104 padding-bottom : 3px;
106 #serials_edit .input_marceditor {
110 <body id="ser_serials-edit" class="ser">
111 [% INCLUDE 'header.inc' %]
112 [% INCLUDE 'serials-search.inc' %]
114 <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>[% bibliotitle %] [% IF ( callnumber ) %]([% callnumber %])[% END %]</i></div>
116 <div id="doc3" class="yui-t2">
122 <h1>Serial edition <i>[% bibliotitle %]</i>
123 [% IF location %] ( [% location %] ) [% END %]
124 [% IF ( callnumber ) %] callnumber: [% callnumber %][% END %]</h1>
125 [% IF internalnotes %]<p>Nonpublic note: [% internalnotes %]</p>[% END %]
126 <form method="post" name="f" action="serials-edit.pl" id="serials_edit">
127 <!--onsubmit="return barcode_check()">-->
130 <div class="dialog alert">
132 [% IF ( barcode_not_unique ) %]<li>Error: Barcode not unique for [% FOREACH errse IN errseq %]serialseq [% errse.serialseq %]<br/>[% END %]</li>[% END %]
137 <input type="hidden" name="op" value="serialchangestatus" />
138 [% FOREACH subscription IN subscriptions %]
139 <input type="hidden" name="subscriptionid" value="[% subscription.subscriptionid %]" />
144 <th>Published on</th>
149 [% FOREACH serialslis IN serialslist %]
150 [% UNLESS ( loop.odd ) %]
151 <tr class="highlight">
156 <input type="hidden" name="serialid" value="[% serialslis.serialid %]" />
157 <input type="hidden" name="biblionumber" value="[% serialslis.biblionumber %]" />
158 <input type="hidden" name="itemcount" value="[% serialslis.issuesatonce %]" />
159 <input type="hidden" name="user" value="[% serialslis.librarian %]" />
160 Issue <input type="text" name="serialseq" id="serialseq[% serialslis.serialid %]" value="[% serialslis.serialseq %]" size="20" maxlength="100" />
163 <input type="text" name="publisheddate" value="[% serialslis.publisheddate %]" size="10" maxlength="15" />
166 <input type="text" id="expecteddate" name="planneddate" value="[% serialslis.planneddate %]" size="10" maxlength="15" />
169 [% IF ( serialslis.editdisable ) %]
170 <input type="hidden" name="status" id="status[% serialslis.serialid %]" value="[% serialslis.serstatus %]">
171 <select name="status" size="1" disabled="disabled">
173 [% IF ( serialslis.serialsadditems ) %]
174 <select name="status" size="1" id="status[% serialslis.serialid %]" onchange="if (this.value==2){unHideItems('items'+[% serialslis.subscriptionid %][% serialslis.serialid %],'label[% serialslis.subscriptionid %][% serialslis.serialid %]','[% serialslis.serialid %]'); changeDate(this, '[% serialslis.arriveddate %]')} else if (this.value==7){changeDate(this, '[% serialslis.arriveddate %]')} else { HideItems('items'+[% serialslis.subscriptionid %]+[% serialslis.serialid %],'label[% serialslis.subscriptionid %][% serialslis.serialid %]'); changeDate(this, '[% serialslis.planneddate %]')}" >
176 <select name="status" size="1" id="status[% serialslis.serialid %]" onchange="if (this.value==2 || this.value==7){changeDate(this, '[% serialslis.arriveddate %]')} else {changeDate(this, '[% serialslis.planneddate %]')}" >
179 [% IF ( serialslis.status1 ) %]
180 <option value="1" selected="selected">Expected</option>
182 <option value="1">Expected</option>
184 [% IF ( serialslis.status2 ) %]
185 <option value="2" selected="selected">Arrived</option>
187 <option value="2">Arrived</option>
189 [% IF ( serialslis.status3 ) %]
190 <option value="3" selected="selected">Late</option>
192 <option value="3">Late</option>
194 [% IF ( serialslis.status4 ) %]
195 <option value="4" selected="selected">Missing</option>
197 <option value="4">Missing</option>
199 [% IF ( serialslis.status41 ) %]
200 <option value="41" selected="selected">Missing (never received)</option>
202 <option value="41">Missing (never received)</option>
204 [% IF ( serialslis.status42 ) %]
205 <option value="42" selected="selected">Missing (sold out)</option>
207 <option value="42">Missing (sold out)</option>
209 [% IF ( serialslis.status43 ) %]
210 <option value="43" selected="selected">Missing (damaged)</option>
212 <option value="43">Missing (damaged)</option>
214 [% IF ( serialslis.status44 ) %]
215 <option value="44" selected="selected">Missing (lost)</option>
217 <option value="44">Missing (lost)</option>
219 [% IF ( serialslis.status7 ) %]
220 <option value="7" selected="selected">Claimed</option>
222 <option value="7">Claimed</option>
224 [% IF ( serialslis.status5 ) %]
225 <option value="5" selected="selected">Not available</option>
227 <option value="5">Not available</option>
229 [% IF ( serialslis.status6 ) %]
230 <option value="6" selected="selected">Delete</option>
232 <option value="6">Delete</option>
234 [% IF serialslis.status8 %]
235 <option value="8" selected="selected">Stopped</option>
241 <input type="text" name="notes" value="[% serialslis.sernotes %]" size="20" maxlength="255" />
244 [% UNLESS ( serialslis.subscriptionexpired ) %]
245 [% IF ( serialslis.serialsadditems ) %]
248 <a id="label[% serialslis.subscriptionid %][% serialslis.serialid %]" style="color: grey; font-size: 80%; cursor: pointer;" onclick="unHideItems('items[% serialslis.subscriptionid %][% serialslis.serialid %]','label[% serialslis.subscriptionid %][% serialslis.serialid %]', '[% serialslis.serialid %]');setStatus([% serialslis.serialid %]);">
249 Click to add item</a>
250 <fieldset class="rows" style="display:none;" id="items[% serialslis.subscriptionid %][% serialslis.serialid %]">
251 <legend><a style="cursor: pointer;" onclick="HideItems('items[% serialslis.subscriptionid %][% serialslis.serialid %]','label[% serialslis.subscriptionid %][% serialslis.serialid %]')">
254 <div class="cataloguing_additem_itemlist">
255 [% FOREACH item IN serialslis.items %]
256 <div id="item[% item.serialid %][% item.countitems %]" class="items">
257 <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li>
258 <div class="subfield_line" style="[% iteminformatio.hidden %]" id="subfield[% item.serialid %][% item.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
259 [% IF (iteminformatio.mandatory) %]
260 <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
262 <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
264 [% iteminformatio.marc_value %]
265 <input type="hidden" name="itemid" value="[% item.itemid %]" />
266 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" />
267 <input type="hidden" name="tag" value="[% iteminformatio.tag %]" />
268 <input type="hidden" name="subfield" value="[% iteminformatio.subfield %]" />
269 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory %]" />
270 [% IF ( iteminformatio.repeatable ) %]
271 <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode); return false;">
272 <img src="[% interface %]/[% theme %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
275 [% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
277 [% END %]</ol></div><!-- /iteminformation -->
279 <input type="hidden" name="moditem" value="" />
280 <input type="hidden" name="tag" value="[% item.itemtagfield %]" />
281 <input type="hidden" name="subfield" value="[% item.itemtagsubfield %]" />
282 <input type="hidden" name="serial" value="[% item.serialid %]" />
283 <input type="hidden" name="bibnum" value="[% item.biblionumber %]" />
284 <input type="hidden" name="itemid" value="[% item.itemid %]" />
285 <input type="hidden" name="field_value" value="[% item.itemnumber %]" />
286 [% END %] <!-- /items -->
294 [% FOREACH newserialloo IN newserialloop %]
295 [% UNLESS ( newserialloo.subscriptionexpired ) %]
298 <input type="hidden" name="serialid" value="NEW" />
299 <input type="hidden" name="biblionumber" value="[% newserialloo.biblionumber %]" />
300 <input type="hidden" name="itemcount" value="[% newserialloo.issuesatonce %]" />
301 <input type="hidden" name="user" value="[% newserialloo.librarian %]" />
302 Supplemental issue <input type="text" name="serialseq" id="serialseq[% newserialloo.serialid %]" value="" size="20" maxlength="100" onchange="if (this.value!=''){unHideItems('items[% newserialloo.subscriptionid %][% newserialloo.serialid %]','label[% newserialloo.subscriptionid %][% newserialloo.serialid %]', '[% newserialloo.serialid %]')} else {HideItems('items[% newserialloo.subscriptionid %][% newserialloo.serialid %]','label[% newserialloo.subscriptionid %][% newserialloo.serialid %]')}" />
305 <input type="text" name="publisheddate" value="[% newserialloo.publisheddate %]" size="10" maxlength="15" />
308 <input type="text" name="planneddate" id="supexpecteddate" value="[% newserialloo.planneddate %]" size="10" maxlength="15" />
311 <select name="status" size="1" id="addstatus[% newserialloo.serialid %]" onchange="if (this.value==2){unHideItems('items'+'[% newserialloo.subscriptionid %][% newserialloo.serialid %]','label[% newserialloo.subscriptionid %][% newserialloo.serialid %]','[% newserialloo.serialid %]'); changeDate2('[% newserialloo.arriveddate %]')} else if (this.value==7){changeDate('[% newserialloo.arriveddate %]')} else { HideItems('items'+'[% newserialloo.subscriptionid %]'+[% newserialloo.serialid %],'label[% serialslis.subscriptionid %][% serialslis.serialid %]'); changeDate2('[% serialslis.planneddate %]')}" >
313 <option value="">----</option>
314 [% IF ( newserialloo.status1 ) %]
315 <option value="1" selected="selected">Expected</option>
317 [% IF ( newserialloo.status2 ) %]
318 <option value="2" selected="selected">Arrived</option>
320 <option value="2">Arrived</option>
322 [% IF ( newserialloo.status3 ) %]
323 <option value="3" selected="selected">Late</option>
325 <option value="3">Late</option>
327 [% IF ( newserialloo.status4 ) %]
328 <option value="4" selected="selected">Missing</option>
330 <option value="4">Missing</option>
332 [% IF ( newserialloo.status41 ) %]
333 <option value="41" selected="selected">Missing (never received)</option>
335 <option value="41">Missing (never received)</option>
337 [% IF ( newserialloo.status42 ) %]
338 <option value="42" selected="selected">Missing (sold out)</option>
340 <option value="42">Missing (sold out)</option>
342 [% IF ( newserialloo.status43 ) %]
343 <option value="43" selected="selected">Missing (damaged)</option>
345 <option value="43">Missing (damaged)</option>
347 [% IF ( newserialloo.status44 ) %]
348 <option value="44" selected="selected">Missing (lost)</option>
350 <option value="44">Missing (lost)</option>
352 [% IF ( newserialloo.status7 ) %]
353 <option value="7" selected="selected">Claimed</option>
355 <option value="7">Claimed</option>
357 [% IF ( newserialloo.status5 ) %]
358 <option value="5" selected="selected">Not available</option>
360 <option value="5">Not available</option>
362 [% IF ( newserialloo.status6 ) %]
363 <option value="6" selected="selected">Delete</option>
365 <option value="6">Delete</option>
367 [% IF newserialloo.status8 %]
368 <option value="8" selected="selected">Stopped</option>
374 <input type="text" name="notes" value="" size="20" maxlength="255" />
377 [% IF ( newserialloo.serialsadditems ) %]
380 <a id="label[% newserialloo.subscriptionid %][% newserialloo.serialid %]" style="color: grey; font-size: 80%; cursor: pointer;" onclick="unHideItems('items[% newserialloo.subscriptionid %][% newserialloo.serialid %]','label[% newserialloo.subscriptionid %][% newserialloo.serialid %]', '[% newserialloo.serialid %]')">
381 Click to add item</a>
382 <fieldset class="rows" style="display:none;" id="items[% newserialloo.subscriptionid %][% newserialloo.serialid %]">
383 <legend><a style="cursor: pointer;" onclick="HideItems('items[% newserialloo.subscriptionid %][% newserialloo.serialid %]','label[% newserialloo.subscriptionid %][% newserialloo.serialid %]')">
386 <div class="cataloguing_additem_itemlist">
387 <div id="item[% newserialloo.serialid %][% newserialloo.countitems %]" class="items">
388 <ol>[% FOREACH iteminformatio IN newserialloo.iteminformation %]<li>
389 <div class="subfield_line" style="[% iteminformatio.hidden %]" id="subfield[% newserialloo.serialid %][% newserialloo.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
390 [% IF (iteminformatio.mandatory) %]
391 <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
393 <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
395 [% iteminformatio.marc_value %]
396 <input type="hidden" name="itemid" value="[% newserialloo.itemid %]" />
397 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" />
398 <input type="hidden" name="tag" value="[% iteminformatio.tag %]" />
399 <input type="hidden" name="subfield" value="[% iteminformatio.subfield %]" />
400 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory %]" />
401 [% IF ( iteminformatio.repeatable ) %]
402 <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode); return false;">
403 <img src="[% interface %]/[% theme %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
406 [% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
410 <input type="hidden" name="moditem" value="" />
411 <input type="hidden" name="tag" value="[% newserialloo.itemtagfield %]" />
412 <input type="hidden" name="subfield" value="[% newserialloo.itemtagsubfield %]" />
413 <input type="hidden" name="serial" value="[% newserialloo.serialid %]" />
414 <input type="hidden" name="bibnum" value="[% newserialloo.biblionumber %]" />
415 <input type="hidden" name="itemid" value="[% newserialloo.itemid %]" />
416 <input type="hidden" name="field_value" value="[% newserialloo.itemnumber %]" />
427 <fieldset class="action">
428 <input type="submit" value="Save" class="button" accesskey="w" />
429 [% UNLESS ( serialsadditems ) %] <input type="button" onclick="javascript:generateReceive()" value="Multi receiving">[% END %]
437 [% INCLUDE 'serials-menu.inc' %]
439 [% FOREACH subscription IN subscriptions %]
440 <li><a href="serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]" title="serial collection for [% subscription.bibliotitle %]">Serial collection #[% subscription.subscriptionid %]</a></li>
441 <li><a href="subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" title="detail of the subscription">Subscription #[% subscription.subscriptionid %]</a></li>
442 [% IF ( subscription.abouttoexpire ) %]
443 [% UNLESS subscription.closed %]
444 <li><a href="#" onclick="javascript:popup([% subscription.subscriptionid %])">Renew #[% subscription.subscriptionid %]</a></li>
448 <li><a href="/cgi-bin/koha/catalogue/[% default_bib_view %].pl?biblionumber=[% biblionumber %]" title="go to [% bibliotitle %]">Show biblio</a></li></ul>
451 [% INCLUDE 'intranet-bottom.inc' %]