127 lines
6.5 KiB
Cheetah
127 lines
6.5 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Tools › Labels › Manage Label Batches</title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<script type="text/JavaScript" language="JavaScript">
|
|
//<![CDATA[
|
|
function RemoveConfirm() {
|
|
var label_id = selected_layout();
|
|
if (label_id>-1) {
|
|
var msg = "Are you sure you want to the selected item from this batch?"
|
|
var answer = confirm(msg);
|
|
if (answer) {
|
|
window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=remove&batch_id=<!-- TMPL_VAR NAME="batch_id" -->&label_id=" + label_id;
|
|
}
|
|
else {
|
|
return; // abort delete
|
|
}
|
|
}
|
|
else {
|
|
return; // no layout selected
|
|
};
|
|
};
|
|
function Add() {
|
|
window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=add&batch_id=<!-- TMPL_VAR NAME="batch_id" -->";
|
|
};
|
|
function Print(mode) {
|
|
if (mode == 'batch') {
|
|
alert("Print batch <!-- TMPL_VAR NAME="batch_id" -->.");
|
|
// window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=print&batch_id=<!-- TMPL_VAR NAME="batch_id" -->";
|
|
}
|
|
else {
|
|
var label_id = selected_layout();
|
|
alert("Print item " + label_id + ".");
|
|
// if (label_id>-1) {
|
|
// window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=print&batch_id=<!-- TMPL_VAR NAME="batch_id" -->&label_id=" + label_id;
|
|
// }
|
|
// else {
|
|
// return; // no layout selected
|
|
// };
|
|
};
|
|
};
|
|
function selected_layout() {
|
|
if (document.layouts.action.length) {
|
|
for (i=0;i<document.layouts.action.length;i++){
|
|
if (document.layouts.action[i].checked==true){
|
|
return(document.layouts.action[i].value);
|
|
}
|
|
};
|
|
}
|
|
else {
|
|
if (document.layouts.action.checked){
|
|
return(document.layouts.action.value);
|
|
}
|
|
//var x=document.getElementsByName("action");
|
|
//if (x[0].checked) {
|
|
// alert(x[0].value);
|
|
// return(x[0].value);
|
|
//};
|
|
};
|
|
alert("Please select an item.");
|
|
return (-1);
|
|
};
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
|
|
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
|
|
<a href="/cgi-bin/koha/labels/labels-home.pl">Labels</a> ›
|
|
Manage Batch Number <!-- TMPL_VAR NAME="batch_id" -->
|
|
</div>
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
<!-- TMPL_INCLUDE NAME="labels-batches-toolbar.inc" -->
|
|
<div class="yui-gc">
|
|
<div class="yui-u first" id="manage-label-batches">
|
|
<div class="hint">Current Branch: <!-- TMPL_VAR NAME="LoginBranchname" --></div>
|
|
<form name="layouts">
|
|
<h2>Items in batch number <!-- TMPL_VAR NAME="batch_id" --></h2>
|
|
<table>
|
|
<!-- TMPL_LOOP NAME="table_loop" -->
|
|
<!-- TMPL_IF NAME="header_fields" -->
|
|
<tr>
|
|
<!-- TMPL_LOOP NAME="header_fields" -->
|
|
<th><!-- TMPL_VAR NAME="field_label" --></th>
|
|
<!-- /TMPL_LOOP -->
|
|
</tr>
|
|
<!-- TMPL_ELSE -->
|
|
<tr>
|
|
<!-- TMPL_LOOP NAME="text_fields" -->
|
|
<!-- TMPL_IF NAME="select_field" -->
|
|
<td align="center"><input type="radio" name="action" value="<!-- TMPL_VAR NAME="field_value" -->"></td>
|
|
<!-- TMPL_ELSE -->
|
|
<td><!-- TMPL_VAR NAME="field_value" --></td>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_LOOP -->
|
|
</tr>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
</form>
|
|
<div style="margin: 10px 10px 10px 0px;">
|
|
<span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="add" onclick="Add()" value="Add Item"></span></span>
|
|
<span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="remove" onclick="RemoveConfirm()" value="Remove Item"></span></span>
|
|
<span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="print_item" onclick="Print(item)" value="Print Item"></span></span>
|
|
<span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="print_batch" onclick="Print(batch)" value="Print Batch"></span></span>
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_IF NAME="err" -->
|
|
<div class="yui-u">
|
|
<div class="dialog alert">
|
|
<strong>WARNING: An error was encountered and <!-- TMPL_VAR NAME="errstr" --> Please have your system administrator check the syslog for details.</strong>
|
|
</div>
|
|
</div>
|
|
<!-- /TMPL_IF -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|