c86d2740092414457b82379efd1686880189d4d6
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-manage.tmpl
1     <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2     <title>Koha &rsaquo; Tools &rsaquo; Labels &rsaquo; Manage Label Elements</title>
3     <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4     <script type="text/JavaScript" language="JavaScript">
5         //<![CDATA[
6             function DeleteConfirm() {
7                 var element_id = selected_layout();
8                 if (element_id>-1) {
9                     var msg = "Are you sure you want to delete <!-- TMPL_VAR NAME="label_element" --> " + element_id + "?"
10                     var answer = confirm(msg);
11                     if (answer) {
12                         window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=<!-- TMPL_VAR NAME="label_element" -->&amp;element_id=" + element_id;
13                     }
14                     else {
15                         return; // abort delete
16                     }
17                 }
18                 else {
19                     return;     // no layout selected
20                 };
21             };
22             function Edit() {
23                 var element_id = selected_layout();
24                 if (element_id>-1) {
25                     window.location = "/cgi-bin/koha/labels/label-edit-<!-- TMPL_VAR NAME="label_element" -->.pl?op=edit&amp;element_id=" + element_id;
26                 }
27                 else {
28                     return;     // no layout selected
29                 };
30             };
31             function Print() {
32                 var element_id = selected_layout();
33                 if (element_id>-1) {
34                     window.location = "/cgi-bin/koha/labels/label-edit-<!-- TMPL_VAR NAME="label_element" -->.pl?op=edit&amp;element_id=" + element_id;
35                 }
36                 else {
37                     return;     // no layout selected
38                 };
39             };
40             function selected_layout() {
41                 for (i=0;i<document.layouts.action.length;i++){
42                     if (document.layouts.action[i].checked==true){
43                         return(document.layouts.action[i].value);
44                     };
45                 };
46                 alert("Please select a <!-- TMPL_VAR NAME="label_element" -->.");
47                 return (-1);
48             };
49         //]]>
50     </script>
51 </head>
52 <body>
53     <!-- TMPL_INCLUDE NAME="header.inc" -->
54     <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
55     <div id="breadcrumbs">
56         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; 
57         <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
58         <a href="/cgi-bin/koha/labels/labels-home.pl">Labels</a> &rsaquo;
59         Manage Label <!-- TMPL_VAR NAME="label_element_title" -->
60     </div>
61     <div id="doc3" class="yui-t2">
62         <div id="bd">
63             <div id="yui-main">
64                 <div class="yui-b">
65                     <!-- TMPL_INCLUDE NAME="labels-new-toolbar.inc" -->
66                     <div class="yui-gc">
67                         <div class="yui-u first" id="manage-label-layouts">
68                             <div class="hint">Current Branch: <!-- TMPL_VAR NAME="LoginBranchname" --></div>
69                             <form name="layouts">
70                             <h2>Currently Available <!-- TMPL_VAR NAME="label_element_title" --></h2>
71                             <table>
72                                 <!-- TMPL_LOOP NAME="table_loop" -->
73                                 <!-- TMPL_IF NAME="header_fields" -->
74                                 <tr>
75                                 <!-- TMPL_LOOP NAME="header_fields" -->
76                                     <th><!-- TMPL_VAR NAME="field_label" --></th>
77                                 <!-- /TMPL_LOOP -->
78                                 </tr>
79                                 <!-- TMPL_ELSE -->
80                                 <tr>
81                                 <!-- TMPL_LOOP NAME="text_fields" -->
82                                 <!-- TMPL_IF NAME="select_field" -->
83                                     <td align="center"><input type="radio" name="action" value="<!-- TMPL_VAR NAME="field_value" -->"></td>
84                                 <!-- TMPL_ELSE -->
85                                     <td><!-- TMPL_VAR NAME="field_value" --></td>
86                                 <!-- /TMPL_IF -->
87                                 <!-- /TMPL_LOOP -->
88                                 </tr>
89                                 <!-- /TMPL_IF -->
90                                 <!-- /TMPL_LOOP -->
91                             </table>
92                             </form>
93                             <div style="margin: 10px 10px 10px 0px;">
94                                 <span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="edit" onclick="Edit()" value="Edit"></span></span>
95                                 <span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="delete" onclick="DeleteConfirm()" value="Delete"></span></span>
96                                 <!-- TMPL_IF NAME="print" --><span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="print" onclick="Print()" value="Print"></span></span><!-- /TMPL_IF -->
97                             </div>
98                         </div>
99                         <!-- TMPL_IF NAME="error" -->
100                         <div class="yui-u">
101                             <div class="dialog alert">
102                                 <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>
103                             </div>
104                         </div>
105                         <!-- /TMPL_IF -->
106                     </div>
107                 </div>
108             </div>
109             <div class="yui-b">
110                 <!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
111             </div>
112         </div>
113     <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->