64298fa0efeaeba08bd7a85f6d2664736ae2aaa2
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / addbiblio.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( biblionumber ) %]Editing [% title |html %] (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
5 <script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
6 <script type="text/javascript">
7 //<![CDATA[
8     $(window).load(function(){
9         $("#loading").hide();
10     });
11          $(document).ready(function() {
12         $('#addbibliotabs').tabs().bind('show.ui-tabs', function(e, ui) {
13                         $("#"+ui.panel.id+" input:eq(0)").focus();
14                 });
15
16                 /* check cookie to hide/show marcdocs*/
17                 if($.cookie("marcdocs_[% borrowernumber %]") == 'false'){
18                         hideMARCdocLinks();
19             $("#marcDocsSelect").removeAttr('checked');
20                 } else {
21                         /* reset cookie expire date */
22                         $.cookie("marcdocs_[% borrowernumber %]",'true',
23                                                 { path: "/", expires: 365 });
24                 }
25         $('#toolbar').fixFloat();
26         $("#marcDocsSelect").click(function(){
27             if($(this).attr("checked")){
28                 showMARCdocLinks();
29             } else {
30                 hideMARCdocLinks();
31             }
32         });
33         $("#z3950search").click(function(){
34             if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
35                 PopupZ3950();
36             }
37         });
38
39         $("#saverecord").click(function(){
40             $(".btn-group").removeClass("open");
41             onOption();
42             return false;
43         })
44
45         $("#saveandview").click(function(){
46             $(".btn-group").removeClass("open");
47             redirect("view");
48             return false;
49         });
50
51         $("#saveanditems").click(function(){
52             $(".btn-group").removeClass("open");
53             redirect("items");
54             return false;
55         });
56         });
57
58 function redirect(dest){
59     $("#redirect").attr("value",dest);
60     return Check();
61 }
62
63 [% IF ( CAN_user_editcatalogue_edit_items ) %]
64     var onOption = function () {
65         return Check();
66     }
67 [% END %]
68
69 function confirmnotdup(redirect){
70         $("#confirm_not_duplicate").attr("value","1");
71     $("#redirect").attr("value",redirect);
72         Check();
73 }
74
75 function Dopop(link,i) {
76     defaultvalue = document.getElementById(i).value;
77     window.open(link+"&result="+defaultvalue,"valuebuilder",'width=700,height=550,toolbar=false,scrollbars=yes');
78 }
79
80 /**
81  * this function open a popup to search on z3950 server.
82  */
83 function PopupZ3950() {
84     var strQuery = GetZ3950Terms();
85         if(strQuery){
86         window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber %]"+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes');
87     } 
88 }
89
90 function PopupMARCFieldDoc(field, blocknumber) {
91     [% IF ( marcflavour == 'MARC21' ) %]
92         _MARC21FieldDoc(field);
93     [% ELSIF ( marcflavour == 'UNIMARC' ) %]
94         _UNIMARCFieldDoc(field, blocknumber);
95     [% END %]
96 }
97
98 function _MARC21FieldDoc(field) {
99     if(field == 0) {
100         window.open("http://www.loc.gov/marc/bibliographic/bdleader.html");
101     } else if (field < 900) {
102         window.open("http://www.loc.gov/marc/bibliographic/bd" + ("000"+field).slice(-3) + ".html");
103     } else {
104         window.open("http://www.loc.gov/marc/bibliographic/bd9xx.html");
105     }
106 }
107
108 function _UNIMARCFieldDoc(field, blocknumber) {
109     /* http://archive.ifla.org/VI/3/p1996-1/ is an outdated version of UNIMARC, but
110        seems to be the only version available that can be linked to per tag.  More recent
111        versions of the UNIMARC standard are available on the IFLA website only as
112        PDFs!
113     */
114     if(field == 0) {
115         window.open("http://archive.ifla.org/VI/3/p1996-1/uni.htm");
116     } else if (field < 100) {
117         window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+blocknumber+".htm#b" + ("000"+field).slice(-3));
118     } else if (field < 900) {
119         window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+blocknumber+".htm#" + ("000"+field).slice(-3));
120     } else {
121         window.open("http://archive.ifla.org/VI/3/p1996-1/uni9.htm");
122     }
123 }
124
125 /*
126  * Functions to hide/show marc docs links
127  */
128 function hideMARCdocLinks() {
129         $(".marcdocs").hide();
130         $.cookie("marcdocs_[% borrowernumber %]",'false', { path: "/", expires: 365 });
131 }
132
133 function showMARCdocLinks() {
134         $(".marcdocs").show();
135         $.cookie("marcdocs_[% borrowernumber %]",'true', { path: "/", expires: 365 });
136 }
137
138 /**
139  * check if mandatory subfields are written
140  */
141 function AreMandatoriesNotOk(){
142     var mandatories = new Array();
143     var mandatoriesfields = new Array();
144     var tab = new Array();
145     var label = new Array();
146     var flag=0;
147     var tabflag= new Array();  
148     [% FOREACH BIG_LOO IN BIG_LOOP %]
149         [% FOREACH innerloo IN BIG_LOO.innerloop %]
150                 [% IF ( innerloo.mandatory ) %]
151                 mandatoriesfields.push(new Array("[% innerloo.tag %]","[% innerloo.index %][% innerloo.random %]","[% innerloo.index %]"));
152                 [% END %]
153                 [% FOREACH subfield_loo IN innerloo.subfield_loop %]
154                         [% IF ( subfield_loo.mandatory ) %]mandatories.push("[% subfield_loo.id %]");
155                         tab.push("[% BIG_LOO.number %]");
156                         label.push("[% subfield_loo.marc_lib %]");
157                 [% END %]
158             [% END %]
159         [% END %]
160     [% END %]
161     var StrAlert = _("Can't save this record because the following field aren't filled:");
162     StrAlert += "\n\n";
163     for(var i=0,len=mandatories.length; i<len ; i++){
164         var tag=mandatories[i].substr(4,3);
165         var subfield=mandatories[i].substr(17,1);
166         var tagnumber=mandatories[i].substr(19,mandatories[i].lastIndexOf("_")-19);
167         if (tabflag[tag+subfield+tagnumber] ==  null) { 
168             tabflag[tag+subfield+tagnumber]=new Array();
169             tabflag[tag+subfield+tagnumber][0]=0; 
170         }
171         if( tabflag[tag+subfield+tagnumber][0] != 1 && (document.getElementById(mandatories[i]) != null && ! document.getElementById(mandatories[i]).value || document.getElementById(mandatories[i]) == null)){
172             tabflag[tag+subfield+tagnumber][0] = 0 + tabflag[tag+subfield+tagnumber] ;
173             document.getElementById(mandatories[i]).setAttribute('class','subfield_not_filled');
174             $('#' + mandatories[i]).focus();
175             tabflag[tag+subfield+tagnumber][1]=label[i];
176             tabflag[tag+subfield+tagnumber][2]=tab[i];
177         } else {
178             tabflag[tag+subfield+tagnumber][0] = 1;
179         }    
180     }
181     for (var tagsubfieldid in tabflag){
182       if (tabflag[tagsubfieldid][0]==0){
183         var tag=tagsubfieldid.substr(0,3);
184         var subfield=tagsubfieldid.substr(3,1);    
185         StrAlert += "\t* "+_("tag ")+tag+_(" subfield ")+subfield+" "+tabflag[tagsubfieldid][1]+_(" in tab ")+tabflag[tagsubfieldid][2]+"\n";
186         //StrAlert += "\t* "+label[i]+_(" in tab ")+tab[i]+"\n"; 
187         flag=1;    
188       }   
189     }   
190     
191     /* Check for mandatories field(not subfields) */
192     for(var i=0,len=mandatoriesfields.length; i<len; i++){
193             isempty  = true;
194                 arr      = mandatoriesfields[i];
195         divid    = "tag_" + arr[0] + "_" + arr[1];
196         varegexp = new RegExp("^tag_" + arr[0] + "_code_");
197         
198                 if(parseInt(arr[0]) >= 10){
199                 elem = document.getElementById(divid);
200                 eleminputs = elem.getElementsByTagName('input');
201                 
202                 for(var j=0,len2=eleminputs.length; j<len2; j++){
203         
204                         if(eleminputs[j].name.match(varegexp) && eleminputs[j].value){
205                                         inputregexp = new RegExp("^tag_" + arr[0] + "_subfield_" + eleminputs[j].value + "_" + arr[2]);
206                                         
207                                         for( var k=0; k<len2; k++){
208                                                 if(eleminputs[k].id.match(inputregexp) && eleminputs[k].value){
209                                                         isempty = false
210                                                 }
211                                         }
212                                         
213                                         elemselect = elem.getElementsByTagName('select');
214                                         for( var k=0; k<elemselect.length; k++){
215                                                 if(elemselect[k].id.match(inputregexp) && elemselect[k].value){
216                                                         isempty = false
217                                                 }
218                                         }
219                         }
220                 }
221
222                 elemtextareas = elem.getElementsByTagName('textarea');
223                 for(var j=0,len2=elemtextareas.length; j<len2; j++){
224                 // this bit assumes that the only textareas in this context would be for subfields
225                 if (elemtextareas[j].value) {
226                     isempty = false;
227                 }
228             }
229         }else{
230                 isempty = false;
231         }
232         
233         if(isempty){
234                 flag = 1;
235                 StrAlert += _("\t* Field ") + arr[0] + _(" is mandatory, at least one of its subfields must be filled.") + "\n";
236         }
237         
238     }
239     
240     if(flag){
241             return StrAlert;
242         } else {
243                 return flag;
244         }
245 }
246
247 /**
248  *
249  *
250  */
251 function Check(){
252     var StrAlert = AreMandatoriesNotOk();
253     if( ! StrAlert ){
254         document.f.submit();
255         return true;
256     } else {
257         alert(StrAlert);
258         return false;
259     }
260 }
261
262 /** 
263  * check if z3950 mandatories are set or not
264  */
265 function GetZ3950Terms(){
266  var strQuery="&frameworkcode="+document.forms['f'].Frameworks.value;
267     var mandatories = new Array();
268     var mandatories_label = new Array();
269     [% FOREACH BIG_LOO IN BIG_LOOP %][% FOREACH innerloo IN BIG_LOO.innerloop %][% FOREACH subfield_loo IN innerloo.subfield_loop %][% IF ( subfield_loo.z3950_mandatory ) %]mandatories.push("[% subfield_loo.id %]");
270         mandatories_label.push("[% subfield_loo.z3950_mandatory %]");[% END %][% END %][% END %][% END %]
271     
272     for(var i=0,len=mandatories.length; i<len ; i++){
273         var field_value = document.getElementById(mandatories[i]).value;
274         if( field_value ){
275             strQuery += "&"+mandatories_label[i]+"="+field_value;
276         }
277     }
278     return strQuery;
279 }
280
281 function Changefwk(FwkList) {
282     var f = document.f;
283     f.op.value = "";
284     f.submit();
285 }
286
287 //]]>
288 </script>
289 <link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />
290 </head>
291 <body id="cat_addbiblio" class="cat">
292
293    <div id="loading">
294        <div>Loading, please wait...</div>
295    </div>
296
297 [% INCLUDE 'header.inc' %]
298
299 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a>  &rsaquo; [% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</div>
300
301 <div id="doc" class="yui-t7">
302
303 <div id="bd">
304         <div id="yui-main">
305         <div class="yui-g">
306
307 <h1>
308 [% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record number [% biblionumber %])
309 [% ELSE %]Add MARC record [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]
310 [% END %]
311 </h1>
312
313 [% IF marcflavour != 'NORMARC' %]
314 <div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links<br/></div>
315 [% END %]
316
317 [% UNLESS ( number ) %]
318     <!-- show duplicate warning on tab 0 only -->
319         [% IF ( duplicatebiblionumber ) %]
320                     <div class="dialog alert">
321                         <h4>Duplicate record suspected</h4>
322                         <p>Is this a duplicate of <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% duplicatebiblionumber %]" onclick="openWindow('/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% duplicatebiblionumber %]&amp;popup=1', 'Duplicate biblio','800','600'); return false;">[% duplicatetitle %]</a>?</p>
323                         [% IF ( CAN_user_editcatalogue_edit_items ) %]<form action="/cgi-bin/koha/cataloguing/additem.pl" method="get">
324                                                     <input type="hidden" name="biblionumber" value="[% duplicatebiblionumber %]" />
325                                                     <input type="submit" class="edit" value="Yes: Edit existing items" />
326                                                 </form>[% ELSE %]<form action="/cgi-bin/koha/catalogue/detail.pl" method="get">
327                                                     <input type="hidden" name="biblionumber" value="[% duplicatebiblionumber %]" />
328                                                     <input type="submit" value="Yes: View existing items" />
329                                                 </form>[% END %]
330                         <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get">
331                         [% IF ( CAN_user_editcatalogue_edit_items ) %]<input type="button" class="save" onclick="confirmnotdup('items'); return false;" value="No: Save as new record" />[% ELSE %]<input type="button" class="save" onclick="confirmnotdup('view'); return false;" value="No: Save as new record" />[% END %]
332                         </form>
333                     </div>
334         [% END %]
335     [% END %]
336
337 [% IF ( done ) %]
338     <script type="text/javascript">
339         opener.document.forms['f'].biblionumber.value=[% biblionumber %];
340         opener.document.forms['f'].title.value='[% title |html %]';
341         window.close();
342     </script>
343 [% ELSE %]
344     <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();">
345     <input type="hidden" value="[% IF ( biblionumber ) %]view[% ELSE %]items[% END %]" id="redirect" name="redirect" />
346         <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" />
347 [% END %]
348
349 <div id="toolbar" class="btn-toolbar">
350     [% IF ( CAN_user_editcatalogue_edit_items ) %]
351         [% IF (circborrowernumber) %][%# fast cataloging must lead to items %]
352             <!-- Action is under fast cataloging - Save button redirecting to items -->
353             <div class="btn-group"><a href="#" id="saveanditems" class="btn btn-small"><i class="icon-hdd"></i> Save</a></div>
354         [% ELSE %]
355             <!-- Not using fast cataloging - Display split menu -->
356             <div class="btn-group">
357                 <button class="btn btn-small" id="saverecord"><i class="icon-hdd"></i> Save</button>
358                 <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
359                 <span class="caret"></span>
360                 </button>
361                 <ul class="dropdown-menu">
362                     <li><a id="saveandview" href="#">Save and view record</a></li>
363                     <li><a id="saveanditems" href="#">Save and edit items</a></li>
364                 </ul>
365             </div>
366         [% END %]
367     [% ELSE %]
368         <!-- User cannot edit items - single button redirecting to view -->
369         <div class="btn-group"><a href="#" id="saveandview" class="btn btn-small"><i class="icon-hdd"></i> Save</a></div>
370     [% END %]
371
372     [% UNLESS (circborrowernumber) %][%# Hide in fast cataloging %]
373         <div class="btn-group"><a class="btn btn-small" href="#" id="z3950search"><i class="icon-search"></i> Z39.50 search</a></div>
374         <div class="btn-group">
375             <label for="Frameworks">Change framework: </label>
376             <select name="frameworkcode" id="Frameworks" onchange="Changefwk(this);">
377                 <option value="Default">Default</option>
378                 [% FOREACH frameworkcodeloo IN frameworkcodeloop %]
379                     [% IF ( frameworkcodeloo.selected ) %]
380                         <option value="[% frameworkcodeloo.value %]" selected="selected">
381                     [% ELSE %]
382                         <option value="[% frameworkcodeloo.value %]">
383                     [% END %]
384                      [% frameworkcodeloo.frameworktext %]
385                      </option>
386                 [% END %]
387             </select>
388         </div>
389     [% END %]
390 </div>
391
392 [% IF ( popup ) %]
393         <input type="hidden" name="mode" value="popup" />
394 [% END %]
395         <input type="hidden" name="op" value="addbiblio" />
396         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
397         <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
398         <input type="hidden" name="breedingid" value="[% breedingid %]" />
399
400 <div id="addbibliotabs" class="toptabs numbered">
401     <ul>
402         [% FOREACH BIG_LOO IN BIG_LOOP %]
403         <li><a href="#tab[% BIG_LOO.number %]XX">[% BIG_LOO.number %]</a></li>
404         [% END %]
405     </ul>
406
407 [% FOREACH BIG_LOO IN BIG_LOOP %]
408     <div id="tab[% BIG_LOO.number %]XX">
409     
410     [% FOREACH innerloo IN BIG_LOO.innerloop %]
411     [% IF ( innerloo.tag ) %]
412     <div class="tag" id="tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]">
413         <div class="tag_title" id="div_indicator_tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]">
414         [% UNLESS hide_marc %]
415             [% IF advancedMARCEditor %]
416                 <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;">[% innerloo.tag %]</a>
417             [% ELSE %]
418                 <span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %]
419                 [% IF marcflavour != 'NORMARC' %]<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]', [% BIG_LOO.number %]); return false;">&nbsp;?</a>[% END %]
420                 </span>
421             [% END %]
422                 [% IF ( innerloo.fixedfield ) %]
423                     <input type="text"
424                         tabindex="1"
425                         class="indicator flat"
426                         style="display:none;"
427                         name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
428                         size="1"
429                         maxlength="1"
430                         value="[% innerloo.indicator1 %]" />
431                     <input type="text"
432                         tabindex="1"
433                         class="indicator flat"
434                         style="display:none;"
435                         name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
436                         size="1"
437                         maxlength="1"
438                         value="[% innerloo.indicator2 %]" />
439                 [% ELSE %]
440                     <input type="text"
441                         tabindex="1"
442                         class="indicator flat"
443                         name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
444                         size="1"
445                         maxlength="1"
446                         value="[% innerloo.indicator1 %]" />
447                     <input type="text"
448                         tabindex="1"
449                         class="indicator flat"
450                         name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
451                         size="1"
452                         maxlength="1"
453                         value="[% innerloo.indicator2 %]" />
454                 [% END %] -
455         [% ELSE %]
456                 [% IF ( innerloo.fixedfield ) %]
457                     <input type="hidden"
458                         tabindex="1"
459                         name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
460                         value="[% innerloo.indicator1 %]" />
461                     <input type="hidden"
462                         tabindex="1"
463                         name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
464                         value="[% innerloo.indicator2 %]" />
465                 [% ELSE %]
466                     <input type="hidden"
467                         tabindex="1"
468                         name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
469                         value="[% innerloo.indicator1 %]" />
470                     <input type="hidden"
471                         tabindex="1"
472                         name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
473                         value="[% innerloo.indicator2 %]" />
474                 [% END %]
475         [% END %]
476
477             [% UNLESS advancedMARCEditor %]
478                 <a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib %]</a>
479             [% END %]
480                 <span class="field_controls">
481                 [% IF ( innerloo.repeatable ) %]
482                     <a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]','[% hide_marc %]','[% advancedMARCEditor %]'); return false;" title="Repeat this Tag">
483                         <img src="/intranet-tmpl/prog/img/repeat-tag.png" alt="Repeat this Tag" />
484                     </a>
485                 [% END %]
486                     <a href="#" tabindex="1" class="buttonMinus" onclick="UnCloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Delete this Tag">
487                         <img src="/intranet-tmpl/prog/img/delete-tag.png" alt="Delete this Tag" />
488                     </a>
489                 </span>
490
491         </div>
492
493         [% FOREACH subfield_loo IN innerloo.subfield_loop %]
494             <!--  One line on the marc editor -->
495             <div class="subfield_line" style="[% subfield_loo.visibility %]" id="subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]">
496             
497                 [% UNLESS advancedMARCEditor %]
498                     [% IF ( subfield_loo.fixedfield ) %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" style="display:none;" class="labelsubfield">
499                     [% ELSE %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" class="labelsubfield">
500                     [% END %]
501                 [% END %]
502                 
503                 [% UNLESS hide_marc %]
504                 <span class="subfieldcode">
505                     [% IF ( subfield_loo.fixedfield ) %]
506                         <img class="buttonUp" style="display:none;" src="/intranet-tmpl/prog/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" />
507                     [% ELSE %]
508                         <img class="buttonUp" src="/intranet-tmpl/prog/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" />
509                     [% END %]
510                         <input type="text"
511                             title="[% subfield_loo.marc_lib_plain %]"
512                             style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;"
513                             name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]"
514                             value="[% subfield_loo.subfield %]"
515                             size="1"
516                             maxlength="1"
517                             class="flat"
518                             tabindex="0" />
519                 </span>
520                 [% ELSE %]
521                     <input type="hidden"
522                         name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]"
523                         value="[% subfield_loo.subfield %]" />
524                 [% END %]
525             
526                 [% UNLESS advancedMARCEditor %]
527                     [% IF ( subfield_loo.mandatory ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %]
528                         [% subfield_loo.marc_lib_plain %]
529                         [% IF ( subfield_loo.mandatory ) %]<span class="mandatory_marker" title="This field is mandatory">*</span>[% END %]
530                     </span>
531                     </label>
532                 [% END %]
533                 
534                 [% subfield_loo.marc_value %]
535                 
536                 <span class="subfield_controls">
537                 [% IF ( subfield_loo.repeatable ) %]
538                     <a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]','[% advancedMARCEditor %]'); return false;">
539                         <img src="/intranet-tmpl/prog/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
540                     </a>
541                     <a href="#" class="buttonMinus" tabindex="1" onclick="UnCloneField('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]'); return false;">
542                         <img src="/intranet-tmpl/prog/img/delete-subfield.png" alt="Delete" title="Delete this subfield" />
543                     </a>
544                 [% END %]
545                 </span>
546                 
547             </div>
548             <!-- End of the line -->
549         [% END %]
550
551     </div>
552     [% END %]<!-- if innerloo.tag -->
553     [% END %]<!-- BIG_LOO.innerloop -->
554     </div>
555 [% END %]<!-- BIG_LOOP -->
556
557 </div><!-- tabs -->
558
559 [%# Fields for fast cataloging %]
560 <input type="hidden" name="barcode" value="[% barcode %]" />
561 <input type="hidden" name="branch" value="[% branch %]" />
562 <input type="hidden" name="circborrowernumber" value="[% circborrowernumber %]" />
563 <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
564 <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
565 [%# End of fields for fast cataloging %]
566
567 </form>
568
569 </div>
570 </div>
571 </div>
572
573 [% INCLUDE 'intranet-bottom.inc' %]