[13/40] Work on profile editor interface.
[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 selected_layout() {
32                 for (i=0;i<document.layouts.action.length;i++){
33                     if (document.layouts.action[i].checked==true){
34                         return(document.layouts.action[i].value);
35                     };
36                 };
37                 alert("Please select a layout.");
38                 return (-1);
39             };
40         //]]>
41     </script>
42 </head>
43 <body>
44     <!-- TMPL_INCLUDE NAME="header.inc" -->
45     <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
46     <div id="breadcrumbs">
47         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; 
48         <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
49         <a href="/cgi-bin/koha/labels/labels-home.pl">Labels</a> &rsaquo;
50         Manage Label <!-- TMPL_VAR NAME="label_element_title" -->
51     </div>
52     <div id="doc3" class="yui-t2">
53         <div id="bd">
54             <div id="yui-main">
55                 <div class="yui-b">
56                     <!-- TMPL_INCLUDE NAME="labels-new-toolbar.inc" -->
57                     <div class="yui-gc">
58                         <div class="yui-u first" id="manage-label-layouts">
59                             <form name="layouts">
60                             <h2>Currently Available <!-- TMPL_VAR NAME="label_element_title" --></h2>
61                             <table>
62                                 <!-- TMPL_LOOP NAME="table_loop" -->
63                                 <!-- TMPL_IF NAME="header_fields" -->
64                                 <tr>
65                                 <!-- TMPL_LOOP NAME="header_fields" -->
66                                     <th><!-- TMPL_VAR NAME="field_label" --></th>
67                                 <!-- /TMPL_LOOP -->
68                                 </tr>
69                                 <!-- TMPL_ELSE -->
70                                 <tr>
71                                 <!-- TMPL_LOOP NAME="text_fields" -->
72                                 <!-- TMPL_IF NAME="select_field" -->
73                                     <td align="center"><input type="radio" name="action" value="<!-- TMPL_VAR NAME="field_value" -->"></td>
74                                 <!-- TMPL_ELSE -->
75                                     <td><!-- TMPL_VAR NAME="field_value" --></td>
76                                 <!-- /TMPL_IF -->
77                                 <!-- /TMPL_LOOP -->
78                                 </tr>
79                                 <!-- /TMPL_IF -->
80                                 <!-- /TMPL_LOOP -->
81                             </table>
82                             </form>
83                             <div style="margin: 10px 10px 10px 0px;">
84                                 <span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="edit" onclick="Edit()" value="Edit"></span></span>
85                                 <span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="delete" onclick="DeleteConfirm()" value="Delete"></span></span>
86                             </div>
87                         </div>
88                         <!-- TMPL_IF NAME="error" -->
89                         <div class="yui-u">
90                             <div class="dialog alert">
91                                 <strong>WARNING: An error was encountered and layout <!-- TMPL_VAR NAME="element_id" --> was not deleted. Please have your system administrator check the syslog for details.</strong>
92                             </div>
93                         </div>
94                         <!-- /TMPL_IF -->
95                     </div>
96                 </div>
97             </div>
98             <div class="yui-b">
99                 <!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
100             </div>
101         </div>
102     <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->