1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Tools › Labels › Manage Label Elements</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="greybox.inc" -->
5 <script type="text/JavaScript" language="JavaScript">
7 function DeleteConfirm() {
8 var element_id = selected_layout("delete");
10 var msg = "Are you sure you want to delete <!-- TMPL_VAR NAME="label_element" --> " + element_id + "?"
11 var answer = confirm(msg);
13 window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&label_element=<!-- TMPL_VAR NAME="label_element" -->&element_id=" + element_id;
16 return; // abort delete
20 return; // no layout selected
24 var element_id = selected_layout("edit");
26 window.location = "/cgi-bin/koha/labels/label-edit-<!-- TMPL_VAR NAME="label_element" -->.pl?op=edit&element_id=" + element_id;
29 return; // no layout selected
34 if(document.layouts.action.length > 0) {
35 for (var i=0; i < document.layouts.action.length; i++) {
36 if (document.layouts.action[i].checked) {
37 batches.push("batch_id=" + document.layouts.action[i].value);
40 if (batches.length < 1) {
41 alert("Please select at least one batch to export.");
42 return; // no batch selected
44 getstr = batches.join("&");
46 else if (document.layouts.action.checked) {
47 getstr = "batch_id="+document.layouts.action.value;
50 alert("Please select at least one batch to export.");
51 return; // no batch selected
53 var msg = "Are you sure you want to export the selected batch(s)?"
54 var answer = confirm(msg);
56 return GB_showCenter('Export Labels', "/cgi-bin/koha/labels/label-print.pl?" + getstr, 700, 800);
57 // window.location = "/cgi-bin/koha/labels/label-print.pl?" + getstr;
60 return; // abort export
63 function selected_layout(op) {
64 var selected = new Array;
65 if (document.layouts.action.length) {
66 for (i=0;i<document.layouts.action.length;i++){
67 if (document.layouts.action[i].checked){
71 if (selected.length == 1) {
72 return(document.layouts.action[selected[0]].value);
75 alert("Please select only one <!-- TMPL_VAR NAME="label_element" --> to " + op + ".");
80 if (document.layouts.action.checked){
81 return(document.layouts.action.value);
83 //var x=document.getElementsByName("action");
86 // return(x[0].value);
89 alert("Please select a <!-- TMPL_VAR NAME="label_element" -->.");
96 <!-- TMPL_INCLUDE NAME="header.inc" -->
97 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
98 <div id="breadcrumbs">
99 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
100 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
101 <a href="/cgi-bin/koha/labels/labels-home.pl">Labels</a> ›
102 Manage Label <!-- TMPL_VAR NAME="label_element_title" -->
104 <div id="doc3" class="yui-t2">
108 <!-- TMPL_INCLUDE NAME="labels-new-toolbar.inc" -->
110 <div class="yui-u first" id="manage-label-layouts">
111 <div class="hint">Current Branch: <!-- TMPL_VAR NAME="LoginBranchname" --></div>
112 <form name="layouts">
113 <h2>Currently Available <!-- TMPL_VAR NAME="label_element_title" --></h2>
115 <!-- TMPL_LOOP NAME="table_loop" -->
116 <!-- TMPL_IF NAME="header_fields" -->
118 <!-- TMPL_LOOP NAME="header_fields" -->
119 <th><!-- TMPL_VAR NAME="field_label" --></th>
124 <!-- TMPL_LOOP NAME="text_fields" -->
125 <!-- TMPL_IF NAME="select_field" -->
126 <td align="center"><input type="checkbox" name="action" value="<!-- TMPL_VAR NAME="field_value" -->"></td>
128 <td><!-- TMPL_VAR NAME="field_value" --></td>
135 <div style="margin: 10px 10px 10px 0px;">
136 <span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="edit" onclick="Edit()" value="Edit"></span></span>
137 <span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="delete" onclick="DeleteConfirm()" value="Delete"></span></span>
138 <!-- TMPL_IF NAME="print" --><span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="print" onclick="Xport()" value="Export"></span></span><!-- /TMPL_IF -->
142 <!-- TMPL_IF NAME="error" -->
145 <strong>WARNING: An error was encountered and <!-- TMPL_VAR NAME="label_element" --> <!-- TMPL_VAR NAME="element_id" --> was not deleted. Please have your system administrator check the syslog for details.</strong>
153 <!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
156 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->