David Cook
ca33b7fc63
Changing the framework in the MARC editor immediately after duplicating a bib record no longer clears the fields. This patch changes the Changefwk Javascript function so that it passes the "op" value and the "biblionumberdata" (as the biblionumber) from addbiblio.pl back to itself, when submitting the form in order to change the framework. The reason we need to do this is because the form in addbiblio.tt is hard-coded to always submit an "op" value of "addbiblio". Currently, we need to have it hard-coded to "addbiblio", because all the magic happens in addbiblio.pl when there is an "op" of "addbiblio". If we always passed the "actual" "op" value, such as "duplicate", nothing would ever happen when we clicked "save". It seems to me that this is a flaw in the design of addbiblio.pl. If we pass the "op" and "biblionumber" when changing frameworks, we're able to tell addbiblio.pl that we're still wanting to "duplicate" this "X" biblionumber. However, by having the form still hard-coded to "addbiblio", when we hit save, the form will do the magic, check if it's a duplicate, and save the record (or prompt for action if it is a duplicate). -- I also noticed that if you make changes to a record, then change the framework before saving, your changes get cleared (since the original record from the database is loaded when the page reloads). It seems to me that this is a bug. Changing the framework should change the layout while preserving the content. I think most users would assume that when changing the framework. This patch also introduces another hidden input into addbiblio.tt and the Changefwk Javascript called "changed_framework". Basically, if the Changefwk Javascript is run, it tells addbiblio.pl that the framework is changed, and it uses the posted data from the form (which we have been modifying) instead of reloading the record from the database. -- Test Plan: A) Before Applying Patch: To Show That Changing the Framework Erases All Fields When Duplicating a Record: 1) Go to any bib record 2) Go to Edit > Edit as new (duplicate). You should see filled in fields. 3) Change the framework to any other framework than the one that is currently specified. 4) Note that every single field is now blank To Show That Changing the Record then Changing the Framework Ignores Changes, When Editing a Record 5) Go to any bib record 6) Go to Edit. 7) Change the title of the record to "I've changed the title". 8) Change the framework to any other framework than the one that is currently specified. 9) Look at the title. You'll notice it is the original title, and NOT "I've changed the title". B) Apply the Patch Also, clear your memcache and shift+refresh your screen. You don't want to use cached templates/javascript. C) After Applying the Patch Repeat Steps 1-3 and 5-8. You should now notice that changing the framework when duplicating the item does not clear all the fields. You should also notice that any changes you make prior to changing the framework will still exist after changing it. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
615 lines
27 KiB
Text
615 lines
27 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Cataloging › [% IF ( biblionumber ) %]Editing [% title |html %] (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
|
|
<script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(window).load(function(){
|
|
$("#loading").hide();
|
|
});
|
|
$(document).ready(function() {
|
|
$('#addbibliotabs').tabs().bind('show.ui-tabs', function(e, ui) {
|
|
$("#"+ui.panel.id+" input:eq(0)").focus();
|
|
});
|
|
|
|
[% IF tab %]
|
|
$('#addbibliotabs').tabs('option', 'selected', "#[% tab %]");
|
|
[% END %]
|
|
|
|
/* check cookie to hide/show marcdocs*/
|
|
if($.cookie("marcdocs_[% borrowernumber %]") == 'false'){
|
|
hideMARCdocLinks();
|
|
$("#marcDocsSelect").removeAttr('checked');
|
|
} else {
|
|
/* reset cookie expire date */
|
|
$.cookie("marcdocs_[% borrowernumber %]",'true',
|
|
{ path: "/", expires: 365 });
|
|
}
|
|
$('#toolbar').fixFloat();
|
|
$("#marcDocsSelect").click(function(){
|
|
if($(this).attr("checked")){
|
|
showMARCdocLinks();
|
|
} else {
|
|
hideMARCdocLinks();
|
|
}
|
|
});
|
|
$("#z3950search").click(function(){
|
|
if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
|
|
PopupZ3950();
|
|
}
|
|
});
|
|
|
|
$("#saverecord").click(function(){
|
|
$(".btn-group").removeClass("open");
|
|
onOption();
|
|
return false;
|
|
})
|
|
|
|
$("#saveandview").click(function(){
|
|
$(".btn-group").removeClass("open");
|
|
redirect("view");
|
|
return false;
|
|
});
|
|
|
|
$("#saveanditems").click(function(){
|
|
$(".btn-group").removeClass("open");
|
|
redirect("items");
|
|
return false;
|
|
});
|
|
$("#saveandcontinue").click(function(){
|
|
$(".btn-group").removeClass("open");
|
|
var tab = $("#addbibliotabs li.ui-tabs-selected:first a").attr('href');
|
|
tab = tab.replace('#', '');
|
|
$("#current_tab").val(tab);
|
|
redirect("just_save", tab);
|
|
return false;
|
|
});
|
|
|
|
});
|
|
|
|
function redirect(dest){
|
|
$("#redirect").attr("value",dest);
|
|
return Check();
|
|
}
|
|
|
|
[% IF ( CAN_user_editcatalogue_edit_items ) %]
|
|
var onOption = function () {
|
|
return Check();
|
|
}
|
|
[% END %]
|
|
|
|
function confirmnotdup(redirect){
|
|
$("#confirm_not_duplicate").attr("value","1");
|
|
$("#redirect").attr("value",redirect);
|
|
Check();
|
|
}
|
|
|
|
function Dopop(link,i) {
|
|
defaultvalue = document.getElementById(i).value;
|
|
window.open(link+"&result="+defaultvalue,"valuebuilder",'width=700,height=550,toolbar=false,scrollbars=yes');
|
|
}
|
|
|
|
/**
|
|
* this function open a popup to search on z3950 server.
|
|
*/
|
|
function PopupZ3950() {
|
|
var strQuery = GetZ3950Terms();
|
|
if(strQuery){
|
|
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');
|
|
}
|
|
}
|
|
|
|
function PopupMARCFieldDoc(field, blocknumber) {
|
|
[% IF ( marcflavour == 'MARC21' ) %]
|
|
_MARC21FieldDoc(field);
|
|
[% ELSIF ( marcflavour == 'UNIMARC' ) %]
|
|
_UNIMARCFieldDoc(field, blocknumber);
|
|
[% END %]
|
|
}
|
|
|
|
function _MARC21FieldDoc(field) {
|
|
if(field == 0) {
|
|
window.open("http://www.loc.gov/marc/bibliographic/bdleader.html");
|
|
} else if (field < 900) {
|
|
window.open("http://www.loc.gov/marc/bibliographic/bd" + ("000"+field).slice(-3) + ".html");
|
|
} else {
|
|
window.open("http://www.loc.gov/marc/bibliographic/bd9xx.html");
|
|
}
|
|
}
|
|
|
|
function _UNIMARCFieldDoc(field, blocknumber) {
|
|
/* http://archive.ifla.org/VI/3/p1996-1/ is an outdated version of UNIMARC, but
|
|
seems to be the only version available that can be linked to per tag. More recent
|
|
versions of the UNIMARC standard are available on the IFLA website only as
|
|
PDFs!
|
|
*/
|
|
if(field == 0) {
|
|
window.open("http://archive.ifla.org/VI/3/p1996-1/uni.htm");
|
|
} else if (field < 100) {
|
|
window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+blocknumber+".htm#b" + ("000"+field).slice(-3));
|
|
} else if (field < 900) {
|
|
window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+blocknumber+".htm#" + ("000"+field).slice(-3));
|
|
} else {
|
|
window.open("http://archive.ifla.org/VI/3/p1996-1/uni9.htm");
|
|
}
|
|
}
|
|
|
|
/*
|
|
* Functions to hide/show marc docs links
|
|
*/
|
|
function hideMARCdocLinks() {
|
|
$(".marcdocs").hide();
|
|
$.cookie("marcdocs_[% borrowernumber %]",'false', { path: "/", expires: 365 });
|
|
}
|
|
|
|
function showMARCdocLinks() {
|
|
$(".marcdocs").show();
|
|
$.cookie("marcdocs_[% borrowernumber %]",'true', { path: "/", expires: 365 });
|
|
}
|
|
|
|
/**
|
|
* check if mandatory subfields are written
|
|
*/
|
|
function AreMandatoriesNotOk(){
|
|
var mandatories = new Array();
|
|
var mandatoriesfields = new Array();
|
|
var tab = new Array();
|
|
var label = new Array();
|
|
var flag=0;
|
|
var tabflag= new Array();
|
|
[% FOREACH BIG_LOO IN BIG_LOOP %]
|
|
[% FOREACH innerloo IN BIG_LOO.innerloop %]
|
|
[% IF ( innerloo.mandatory ) %]
|
|
mandatoriesfields.push(new Array("[% innerloo.tag %]","[% innerloo.index %][% innerloo.random %]","[% innerloo.index %]"));
|
|
[% END %]
|
|
[% FOREACH subfield_loo IN innerloo.subfield_loop %]
|
|
[% IF ( subfield_loo.mandatory ) %]mandatories.push("[% subfield_loo.id %]");
|
|
tab.push("[% BIG_LOO.number %]");
|
|
label.push("[% subfield_loo.marc_lib %]");
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
var StrAlert = _("Can't save this record because the following field aren't filled:");
|
|
StrAlert += "\n\n";
|
|
for(var i=0,len=mandatories.length; i<len ; i++){
|
|
var tag=mandatories[i].substr(4,3);
|
|
var subfield=mandatories[i].substr(17,1);
|
|
var tagnumber=mandatories[i].substr(19,mandatories[i].lastIndexOf("_")-19);
|
|
if (tabflag[tag+subfield+tagnumber] == null) {
|
|
tabflag[tag+subfield+tagnumber]=new Array();
|
|
tabflag[tag+subfield+tagnumber][0]=0;
|
|
}
|
|
if( tabflag[tag+subfield+tagnumber][0] != 1 && (document.getElementById(mandatories[i]) != null && ! document.getElementById(mandatories[i]).value || document.getElementById(mandatories[i]) == null)){
|
|
tabflag[tag+subfield+tagnumber][0] = 0 + tabflag[tag+subfield+tagnumber] ;
|
|
document.getElementById(mandatories[i]).setAttribute('class','subfield_not_filled');
|
|
$('#' + mandatories[i]).focus();
|
|
tabflag[tag+subfield+tagnumber][1]=label[i];
|
|
tabflag[tag+subfield+tagnumber][2]=tab[i];
|
|
} else {
|
|
tabflag[tag+subfield+tagnumber][0] = 1;
|
|
}
|
|
}
|
|
for (var tagsubfieldid in tabflag){
|
|
if (tabflag[tagsubfieldid][0]==0){
|
|
var tag=tagsubfieldid.substr(0,3);
|
|
var subfield=tagsubfieldid.substr(3,1);
|
|
StrAlert += "\t* "+_("tag ")+tag+_(" subfield ")+subfield+" "+tabflag[tagsubfieldid][1]+_(" in tab ")+tabflag[tagsubfieldid][2]+"\n";
|
|
//StrAlert += "\t* "+label[i]+_(" in tab ")+tab[i]+"\n";
|
|
flag=1;
|
|
}
|
|
}
|
|
|
|
/* Check for mandatories field(not subfields) */
|
|
for(var i=0,len=mandatoriesfields.length; i<len; i++){
|
|
isempty = true;
|
|
arr = mandatoriesfields[i];
|
|
divid = "tag_" + arr[0] + "_" + arr[1];
|
|
varegexp = new RegExp("^tag_" + arr[0] + "_code_");
|
|
|
|
if(parseInt(arr[0]) >= 10){
|
|
elem = document.getElementById(divid);
|
|
eleminputs = elem.getElementsByTagName('input');
|
|
|
|
for(var j=0,len2=eleminputs.length; j<len2; j++){
|
|
|
|
if(eleminputs[j].name.match(varegexp) && eleminputs[j].value){
|
|
inputregexp = new RegExp("^tag_" + arr[0] + "_subfield_" + eleminputs[j].value + "_" + arr[2]);
|
|
|
|
for( var k=0; k<len2; k++){
|
|
if(eleminputs[k].id.match(inputregexp) && eleminputs[k].value){
|
|
isempty = false
|
|
}
|
|
}
|
|
|
|
elemselect = elem.getElementsByTagName('select');
|
|
for( var k=0; k<elemselect.length; k++){
|
|
if(elemselect[k].id.match(inputregexp) && elemselect[k].value){
|
|
isempty = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
elemtextareas = elem.getElementsByTagName('textarea');
|
|
for(var j=0,len2=elemtextareas.length; j<len2; j++){
|
|
// this bit assumes that the only textareas in this context would be for subfields
|
|
if (elemtextareas[j].value) {
|
|
isempty = false;
|
|
}
|
|
}
|
|
}else{
|
|
isempty = false;
|
|
}
|
|
|
|
if(isempty){
|
|
flag = 1;
|
|
StrAlert += _("\t* Field ") + arr[0] + _(" is mandatory, at least one of its subfields must be filled.") + "\n";
|
|
}
|
|
|
|
}
|
|
|
|
if(flag){
|
|
return StrAlert;
|
|
} else {
|
|
return flag;
|
|
}
|
|
}
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
function Check(){
|
|
var StrAlert = AreMandatoriesNotOk();
|
|
if( ! StrAlert ){
|
|
document.f.submit();
|
|
return true;
|
|
} else {
|
|
alert(StrAlert);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* check if z3950 mandatories are set or not
|
|
*/
|
|
function GetZ3950Terms(){
|
|
var strQuery="&frameworkcode="+document.forms['f'].Frameworks.value;
|
|
var mandatories = new Array();
|
|
var mandatories_label = new Array();
|
|
[% 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 %]");
|
|
mandatories_label.push("[% subfield_loo.z3950_mandatory %]");[% END %][% END %][% END %][% END %]
|
|
|
|
for(var i=0,len=mandatories.length; i<len ; i++){
|
|
var field_value = document.getElementById(mandatories[i]).value;
|
|
if( field_value ){
|
|
strQuery += "&"+mandatories_label[i]+"="+field_value;
|
|
}
|
|
}
|
|
return strQuery;
|
|
}
|
|
|
|
function Changefwk(FwkList) {
|
|
var f = document.f;
|
|
f.op.value = "[% op %]";
|
|
f.biblionumber.value = "[% biblionumberdata %]";
|
|
f.changed_framework.value = "changed";
|
|
f.submit();
|
|
}
|
|
|
|
//]]>
|
|
</script>
|
|
<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />
|
|
[% IF ( bidi ) %]
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/right-to-left.css" />
|
|
[% END %]
|
|
</head>
|
|
<body id="cat_addbiblio" class="cat">
|
|
|
|
<div id="loading">
|
|
<div>Loading, please wait...</div>
|
|
</div>
|
|
|
|
[% INCLUDE 'header.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › [% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</div>
|
|
|
|
<div id="doc" class="yui-t7">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-g">
|
|
|
|
<h1>
|
|
[% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record number [% biblionumber %])
|
|
[% ELSE %]Add MARC record [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]
|
|
[% END %]
|
|
</h1>
|
|
|
|
[% IF marcflavour != 'NORMARC' %]
|
|
<div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links<br/></div>
|
|
[% END %]
|
|
|
|
[% UNLESS ( number ) %]
|
|
<!-- show duplicate warning on tab 0 only -->
|
|
[% IF ( duplicatebiblionumber ) %]
|
|
<div class="dialog alert">
|
|
<h4>Duplicate record suspected</h4>
|
|
<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 %]&popup=1', 'Duplicate biblio','800','600'); return false;">[% duplicatetitle %]</a>?</p>
|
|
[% IF ( CAN_user_editcatalogue_edit_items ) %]<form action="/cgi-bin/koha/cataloguing/additem.pl" method="get">
|
|
<input type="hidden" name="biblionumber" value="[% duplicatebiblionumber %]" />
|
|
<input type="submit" class="edit" value="Yes: Edit existing items" />
|
|
</form>[% ELSE %]<form action="/cgi-bin/koha/catalogue/detail.pl" method="get">
|
|
<input type="hidden" name="biblionumber" value="[% duplicatebiblionumber %]" />
|
|
<input type="submit" value="Yes: View existing items" />
|
|
</form>[% END %]
|
|
<form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get">
|
|
[% 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 %]
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF ( done ) %]
|
|
<script type="text/javascript">
|
|
opener.document.forms['f'].biblionumber.value=[% biblionumber %];
|
|
opener.document.forms['f'].title.value='[% title |html %]';
|
|
window.close();
|
|
</script>
|
|
[% ELSE %]
|
|
<form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();">
|
|
<input type="hidden" value="[% IF ( biblionumber ) %]view[% ELSE %]items[% END %]" id="redirect" name="redirect" />
|
|
<input type="hidden" value="" id="current_tab" name="current_tab" />
|
|
<input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" />
|
|
[% END %]
|
|
|
|
<div id="toolbar" class="btn-toolbar">
|
|
[% IF ( CAN_user_editcatalogue_edit_items ) %]
|
|
[% IF (circborrowernumber) %][%# fast cataloging must lead to items %]
|
|
<!-- Action is under fast cataloging - Save button redirecting to items -->
|
|
<div class="btn-group"><a href="#" id="saveanditems" class="btn btn-small"><i class="icon-hdd"></i> Save</a></div>
|
|
[% ELSE %]
|
|
<!-- Not using fast cataloging - Display split menu -->
|
|
<div class="btn-group">
|
|
<button class="btn btn-small" id="saverecord"><i class="icon-hdd"></i> Save</button>
|
|
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
|
|
<span class="caret"></span>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li><a id="saveandview" href="#">Save and view record</a></li>
|
|
<li><a id="saveanditems" href="#">Save and edit items</a></li>
|
|
<li><a id="saveandcontinue" href="#">Save and continue editing</a></li>
|
|
</ul>
|
|
</div>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<!-- User cannot edit items - single button redirecting to view -->
|
|
<div class="btn-group"><a href="#" id="saveandview" class="btn btn-small"><i class="icon-hdd"></i> Save</a></div>
|
|
[% END %]
|
|
|
|
[% UNLESS (circborrowernumber) %][%# Hide in fast cataloging %]
|
|
<div class="btn-group"><a class="btn btn-small" href="#" id="z3950search"><i class="icon-search"></i> Z39.50 search</a></div>
|
|
[% IF (biblionumber) %]
|
|
[% IF ( BiblioDefaultViewmarc ) %]
|
|
<div class="btn-group">
|
|
<a class="btn btn-small" id="cancel" href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% biblionumber |url %]">Cancel</a>
|
|
</div>
|
|
[% ELSIF ( BiblioDefaultViewlabeled_marc ) %]
|
|
<div class="btn-group">
|
|
<a class="btn btn-small" id="cancel" href="/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=[% biblionumber |url %]">Cancel</a>
|
|
</div>
|
|
[% ELSIF ( BiblioDefaultViewisbd ) %]
|
|
<div class="btn-group">
|
|
<a class="btn btn-small" id="cancel" href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=[% biblionumber |url %]">Cancel</a>
|
|
</div>
|
|
[% ELSE %]
|
|
<div class="btn-group">
|
|
<a class="btn btn-small" id="cancel" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber |url %]">Cancel</a>
|
|
</div>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<a class="btn btn-small" id="cancel" href="/cgi-bin/koha/cataloguing/addbooks.pl">Cancel</a>
|
|
[% END %]
|
|
[% END %]
|
|
<div class="btn-group">
|
|
<label for="Frameworks">Change framework: </label>
|
|
<select name="frameworkcode" id="Frameworks" onchange="Changefwk(this);">
|
|
<option value="Default">Default</option>
|
|
[% FOREACH frameworkcodeloo IN frameworkcodeloop %]
|
|
[% IF ( frameworkcodeloo.selected ) %]
|
|
<option value="[% frameworkcodeloo.value %]" selected="selected">
|
|
[% ELSE %]
|
|
<option value="[% frameworkcodeloo.value %]">
|
|
[% END %]
|
|
[% frameworkcodeloo.frameworktext %]
|
|
</option>
|
|
[% END %]
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
[% IF ( popup ) %]
|
|
<input type="hidden" name="mode" value="popup" />
|
|
[% END %]
|
|
<input type="hidden" name="op" value="addbiblio" />
|
|
<input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
|
|
<input type="hidden" name="biblionumber" value="[% biblionumber %]" />
|
|
<input type="hidden" name="breedingid" value="[% breedingid %]" />
|
|
<input type="hidden" name="changed_framework" value="" />
|
|
|
|
<div id="addbibliotabs" class="toptabs numbered">
|
|
<ul>
|
|
[% FOREACH BIG_LOO IN BIG_LOOP %]
|
|
<li><a href="#tab[% BIG_LOO.number %]XX">[% BIG_LOO.number %]</a></li>
|
|
[% END %]
|
|
</ul>
|
|
|
|
[% FOREACH BIG_LOO IN BIG_LOOP %]
|
|
<div id="tab[% BIG_LOO.number %]XX">
|
|
|
|
[% FOREACH innerloo IN BIG_LOO.innerloop %]
|
|
[% IF ( innerloo.tag ) %]
|
|
<div class="tag" id="tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]">
|
|
<div class="tag_title" id="div_indicator_tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]">
|
|
[% UNLESS hide_marc %]
|
|
[% IF advancedMARCEditor %]
|
|
<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>
|
|
[% ELSE %]
|
|
<span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %]
|
|
[% IF marcflavour != 'NORMARC' %]<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]', [% BIG_LOO.number %]); return false;"> ?</a>[% END %]
|
|
</span>
|
|
[% END %]
|
|
[% IF ( innerloo.fixedfield ) %]
|
|
<input type="text"
|
|
tabindex="1"
|
|
class="indicator flat"
|
|
style="display:none;"
|
|
name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
|
|
size="1"
|
|
maxlength="1"
|
|
value="[% innerloo.indicator1 %]" />
|
|
<input type="text"
|
|
tabindex="1"
|
|
class="indicator flat"
|
|
style="display:none;"
|
|
name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
|
|
size="1"
|
|
maxlength="1"
|
|
value="[% innerloo.indicator2 %]" />
|
|
[% ELSE %]
|
|
<input type="text"
|
|
tabindex="1"
|
|
class="indicator flat"
|
|
name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
|
|
size="1"
|
|
maxlength="1"
|
|
value="[% innerloo.indicator1 %]" />
|
|
<input type="text"
|
|
tabindex="1"
|
|
class="indicator flat"
|
|
name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
|
|
size="1"
|
|
maxlength="1"
|
|
value="[% innerloo.indicator2 %]" />
|
|
[% END %] -
|
|
[% ELSE %]
|
|
[% IF ( innerloo.fixedfield ) %]
|
|
<input type="hidden"
|
|
tabindex="1"
|
|
name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
|
|
value="[% innerloo.indicator1 %]" />
|
|
<input type="hidden"
|
|
tabindex="1"
|
|
name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
|
|
value="[% innerloo.indicator2 %]" />
|
|
[% ELSE %]
|
|
<input type="hidden"
|
|
tabindex="1"
|
|
name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
|
|
value="[% innerloo.indicator1 %]" />
|
|
<input type="hidden"
|
|
tabindex="1"
|
|
name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
|
|
value="[% innerloo.indicator2 %]" />
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% UNLESS advancedMARCEditor %]
|
|
<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>
|
|
[% END %]
|
|
<span class="field_controls">
|
|
[% IF ( innerloo.repeatable ) %]
|
|
<a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]','[% hide_marc %]','[% advancedMARCEditor %]'); return false;" title="Repeat this Tag">
|
|
<img src="[% interface %]/[% theme %]/img/repeat-tag.png" alt="Repeat this Tag" />
|
|
</a>
|
|
[% END %]
|
|
<a href="#" tabindex="1" class="buttonMinus" onclick="UnCloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Delete this Tag">
|
|
<img src="[% interface %]/[% theme %]/img/delete-tag.png" alt="Delete this Tag" />
|
|
</a>
|
|
</span>
|
|
|
|
</div>
|
|
|
|
[% FOREACH subfield_loo IN innerloo.subfield_loop %]
|
|
<!-- One line on the marc editor -->
|
|
<div class="subfield_line" style="[% subfield_loo.visibility %]" id="subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]">
|
|
|
|
[% UNLESS advancedMARCEditor %]
|
|
[% 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">
|
|
[% ELSE %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" class="labelsubfield">
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% UNLESS hide_marc %]
|
|
<span class="subfieldcode">
|
|
[% IF ( subfield_loo.fixedfield ) %]
|
|
<img class="buttonUp" style="display:none;" src="[% interface %]/[% theme %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" />
|
|
[% ELSE %]
|
|
<img class="buttonUp" src="[% interface %]/[% theme %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" />
|
|
[% END %]
|
|
<input type="text"
|
|
title="[% subfield_loo.marc_lib_plain %]"
|
|
style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;"
|
|
name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]"
|
|
value="[% subfield_loo.subfield %]"
|
|
size="1"
|
|
maxlength="1"
|
|
class="flat"
|
|
tabindex="0" />
|
|
</span>
|
|
[% ELSE %]
|
|
<input type="hidden"
|
|
name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]"
|
|
value="[% subfield_loo.subfield %]" />
|
|
[% END %]
|
|
|
|
[% UNLESS advancedMARCEditor %]
|
|
[% IF ( subfield_loo.mandatory ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %]
|
|
[% subfield_loo.marc_lib_plain %]
|
|
[% IF ( subfield_loo.mandatory ) %]<span class="mandatory_marker" title="This field is mandatory">*</span>[% END %]
|
|
</span>
|
|
</label>
|
|
[% END %]
|
|
|
|
[% subfield_loo.marc_value %]
|
|
|
|
<span class="subfield_controls">
|
|
[% IF ( subfield_loo.repeatable ) %]
|
|
<a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]','[% advancedMARCEditor %]'); return false;">
|
|
<img src="[% interface %]/[% theme %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
|
|
</a>
|
|
<a href="#" class="buttonMinus" tabindex="1" onclick="UnCloneField('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]'); return false;">
|
|
<img src="[% interface %]/[% theme %]/img/delete-subfield.png" alt="Delete" title="Delete this subfield" />
|
|
</a>
|
|
[% END %]
|
|
</span>
|
|
|
|
</div>
|
|
<!-- End of the line -->
|
|
[% END %]
|
|
|
|
</div>
|
|
[% END %]<!-- if innerloo.tag -->
|
|
[% END %]<!-- BIG_LOO.innerloop -->
|
|
</div>
|
|
[% END %]<!-- BIG_LOOP -->
|
|
|
|
</div><!-- tabs -->
|
|
|
|
[%# Fields for fast cataloging %]
|
|
<input type="hidden" name="barcode" value="[% barcode %]" />
|
|
<input type="hidden" name="branch" value="[% branch %]" />
|
|
<input type="hidden" name="circborrowernumber" value="[% circborrowernumber %]" />
|
|
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
|
|
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
|
|
[%# End of fields for fast cataloging %]
|
|
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|