Koha/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tmpl
Paul POULAIN 57f25c3dad moving _( function to header
This function is used to extract strings for translator tool. It must be available everywhere, moving it to head-close.inc
& removing it elsewhere

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-05 19:39:23 -05:00

131 lines
No EOL
5.4 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Cataloging &rsaquo; Items for Bibliographic Record <!-- TMPL_VAR name="biblionumber" --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript">
//<![CDATA[
function active(numlayer)
{
for (i=10; i < 11 ; i++ ) {
ong = i+"XX";
link = "link"+i;
if (numlayer==i) {
document.getElementById(ong).style.visibility="visible";
document.getElementById(link).style.backgroundColor="#11AA11";
document.getElementById(link).style.backgroundImage="url(<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif)";
} else {
document.getElementById(ong).style.visibility="hidden";
document.getElementById(link).style.backgroundColor="#FFFFFF";
document.getElementById(link).style.backgroundImage="";
}
}
}
function Check(f) {
var total_errors=0;
// alert(f.field_value.length);
for (i=0 ; i<f.field_value.length ; i++) {
// alert (f.field_value[i].value);
if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
document.getElementById("error"+i).style.backgroundColor="#FF0000";
total_errors++;
} else {
// document.getElementById("error"+i).style.backgroundColor="#FFFFFF";
}
}
var alertString2;
if (total_errors==0) {
document.f.submit();
} else {
alertString2 = _("Form not submitted because of the following problem(s)");
alertString2 += "\n------------------------------------------------------------------------------------\n";
alertString2 += "\n- "+ total_errors+_(" mandatory fields empty (see bold subfields)");
alert(alertString2);
}
}
function Dopop(link,i) {
defaultvalue=document.forms[0].field_value[i].value;
newin=window.open(link+"&result="+defaultvalue,"value builder",'width=500,height=400,toolbar=false,scrollbars=yes');
}
function confirm_deletion(biblionumber,itemnumber) {
var is_confirmed = confirm(_('Are you sure you want to delete this item?'));
if (is_confirmed) {
window.location = "additem.pl?op=delitem&biblionumber="+biblionumber+"&itemnumber="+itemnumber;
}
}
//]]>
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h1>Items for <!-- TMPL_VAR name="title" --> <!-- TMPL_IF NAME="author" --> by <!-- TMPL_VAR name="author" --><!-- /TMPL_IF --> (Record #<!-- TMPL_VAR NAME="biblionumber" -->)</h1>
<form method="post" action="/cgi-bin/koha/cataloguing/additem.pl" name="f">
<input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->" />
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
<div id="cataloguing_additem_itemlist">
<!-- TMPL_IF name="item_loop" -->
<h2>Existing items</h2>
<table>
<tr>
<!-- TMPL_LOOP NAME="item_header_loop" -->
<th>
<!-- TMPL_VAR NAME="header_value" -->
</th>
<!-- /TMPL_LOOP -->
<th colspan="2">&nbsp;</th>
</tr>
<!-- TMPL_LOOP NAME="item_loop" -->
<tr>
<!-- TMPL_VAR NAME="item_value" -->
<td><a href="additem.pl?op=edititem&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->">Edit</a></td>
<td><a href="javascript:confirm_deletion(<!-- TMPL_VAR NAME="biblionumber" -->,<!-- TMPL_VAR NAME="itemnumber" -->)">Delete</a></td>
</tr>
<!-- /TMPL_LOOP -->
</table>
<!-- /TMPL_IF -->
</div>
<div id="cataloguing_additem_newitem">
<!-- TMPL_IF name="opisadd" -->
<h2>Add Item</h2>
<!-- TMPL_ELSE -->
<h2>Edit Item</h2>
<!-- /TMPL_IF -->
<!-- TMPL_LOOP NAME="item" -->
<p>
<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>
<!-- TMPL_VAR NAME="marc_value" -->
<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
</p>
<!-- /tmpl_loop -->
<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
<!-- TMPL_IF name="barcode_not_unique" -->
ERROR : Barcode already exists !
<!-- /TMPL_IF -->
<!-- TMPL_IF name="opisadd" -->
<input type="button" value="Add item" onclick="Check(this.form)" accesskey="w" />
<!-- TMPL_ELSE -->
<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="itemtagfield" -->" />
<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="itemtagsubfield" -->" />
<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
<input type="button" value="Save Changes" onclick="Check(this.form)" accesskey="w" />
<!-- /TMPL_IF -->
</div>
</form>
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="additem-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->