Koha/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-layout.tmpl
Chris Nighswonger 12663796ca [8/40] Adding new layout management page
This moves the layouts off of the labels tool start page to bring it into
conformity with the other parts of this tool.
2009-09-01 15:48:38 -04:00

100 lines
4.8 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Tools &rsaquo; Labels</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
function DeleteConfirm() {
var layout_id = selected_layout();
if (layout_id>-1) {
var msg = "Are you sure you want to delete template " + layout_id + "?"
var answer = confirm(msg);
if (answer) {
window.location = "/cgi-bin/koha/labels/label-layout.pl?op=delete&amp;layout_id=" + layout_id;
}
else {
return; // abort delete
}
}
else {
return; // no layout selected
};
};
function Edit() {
var layout_id = selected_layout();
if (layout_id>-1) {
window.location = "/cgi-bin/koha/labels/label-edit-layout.pl?op=edit&amp;layout_id=" + layout_id;
}
else {
return; // no layout selected
};
};
function selected_layout() {
for (i=0;i<document.layouts.action.length;i++){
if (document.layouts.action[i].checked==true){
return(document.layouts.action[i].value);
};
};
alert("Please select a layout.");
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> &rsaquo;
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
Label Layouts
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="tools-labels-toolbar.inc" -->
<div class="yui-gc">
<div class="yui-u first" id="manage-label-layouts">
<form name="layouts">
<h2>Currently Available Layouts</h2>
<table>
<tr>
<th>Layout ID</th>
<th>Layout</th>
<th>Barcode Type</th>
<th>Print Type</th>
<th>Fields to Print</th>
<th>Select</th>
</tr>
<!-- TMPL_LOOP NAME="layout_loop" -->
<tr>
<td><!-- TMPL_VAR NAME="layout_id" --></td>
<td><!-- TMPL_VAR NAME="layout_name" --></td>
<td><!-- TMPL_VAR NAME="barcode_type" --></td>
<td><!-- TMPL_VAR NAME="printing_type" --></td>
<td><!-- TMPL_VAR NAME="format_string" --></td>
<td align="center"><input type="radio" name="action" value="<!-- TMPL_VAR NAME="layout_id" -->"></td>
</tr>
<!-- /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="edit" onclick="Edit()" value="Edit"></span></span>
<span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="delete" onclick="DeleteConfirm()" value="Delete"></span></span>
</div>
</div>
<!-- TMPL_IF NAME="error" -->
<div class="yui-u">
<div class="dialog alert">
<strong>WARNING: An error was encountered and layout <!-- TMPL_VAR NAME="layout_id" --> was not deleted. 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" -->