Further markup fixes, adding toolbars for some admin pages
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / currency.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; Currencies &amp; Exchange Rates &rsaquo; 
3 <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add Currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
4 <!-- TMPL_IF NAME="add_validate" -->Data Recorded<!-- /TMPL_IF -->
5 <!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
6 <!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
7 <!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF --></title>
8 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
9 <!-- TMPL_IF NAME="add_form" -->
10 <script type="text/javascript">
11 //<![CDATA[
12         //
13         function isNotNull(f,noalert) {
14                 if (f.value.length ==0) {
15    return false;
16                 }
17                 return true;
18         }
19         //
20         function toUC(f) {
21                 var x=f.value.toUpperCase();
22                 f.value=x;
23                 return true;
24         }
25         //
26         function isNum(v,maybenull) {
27         var n = new Number(v.value);
28         if (isNaN(n)) {
29                 return false;
30                 }
31         if (maybenull=="0" && v.value=="") {
32                 return false;
33         }
34         return true;
35         }
36         //
37         function isDate(f) {
38                 var t = Date.parse(f.value);
39                 if (isNaN(t)) {
40                         return false;
41                 }
42         }
43         //
44         function Check(f) {
45                 var ok=1;
46                 var _alertString="";
47                 var alertString2;
48                 if (f.currency.value.length==0) {
49                         _alertString += "- Currency name missing\\n";
50                 }
51                 if (f.rate.value.length==0) {
52                         _alertString += "- Rate missing\\n";
53                 }
54                 if (_alertString.length==0) {
55                         document.Aform.submit();
56                 } else {
57                         alertString2 = "Form not submitted because of the following problem(s)\\n";
58                         alertString2 += "------------------------------------------------------------------------------------\\n\\n";
59                         alertString2 += _alertString;
60                         alert(alertString2);
61                 }
62         }
63         //]]>
64 </script>
65                 <!-- /TMPL_IF -->
66 </head>
67 <body>
68 <!-- TMPL_INCLUDE NAME="header.inc" -->
69 <!-- TMPL_INCLUDE NAME="currencies-admin-search.inc" -->
70
71 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo;  <a href="/cgi-bin/koha/admin/currency.pl">Currencies &amp; Exchange Rates</a> &rsaquo; <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add Currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
72 <!-- TMPL_IF NAME="add_validate" -->Data Recorded<!-- /TMPL_IF -->
73 <!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
74 <!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
75 <!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF --></div>
76
77 <div id="doc3" class="yui-t2">
78    
79    <div id="bd">
80         <div id="yui-main">
81         <div class="yui-b">
82         
83 <!-- TMPL_IF NAME="else" -->
84 <div id="toolbar">
85         <script type="text/javascript">
86         //<![CDATA[
87
88         // prepare DOM for YUI Toolbar
89
90          $(document).ready(function() {
91             yuiToolbar();
92          });
93
94         // YUI Toolbar Functions
95
96         function yuiToolbar() {
97             new YAHOO.widget.Button("newcurrency");
98         }
99
100         //]]>
101         </script>
102         <ul class="toolbar">
103         <li><a id="newcurrency" href="/cgi-bin/koha/admin/currency.pl?op=add_form">New Currency</a></li>
104 </ul></div>
105 <!-- /TMPL_IF -->
106
107 <!-- TMPL_IF NAME="add_form" -->
108         
109
110 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
111 <input type="hidden" name="op" value="add_validate" />
112
113         <fieldset class="rows">
114         <legend><!-- TMPL_IF NAME="searchfield" -->
115                 Modify currency
116         <!-- TMPL_ELSE -->
117                 Add currency
118         <!-- /TMPL_IF --></legend>
119         <ol><!-- TMPL_IF NAME="searchfield" -->
120                 <li>
121                         <span class="label">Currency: </span>
122                         <input type="hidden" name="currency" id="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
123                         </li>
124         <!-- TMPL_ELSE -->
125                 <li>
126                         <label for="currency">Currency: </label>
127                         <input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" />
128                         </li>
129         <!-- /TMPL_IF -->
130
131                 <li>
132                         <label for="rate">Rate: </label>
133                         <input type="text" name="rate" id="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
134                         </li></ol>
135         </fieldset>
136                 
137                 <fieldset class="action"><input type="submit" value="Submit" onclick="Check(this.form)" /> </fieldset>
138         </form>
139
140 <!-- /TMPL_IF -->
141
142 <!-- TMPL_IF NAME="add_validate" -->
143 <h3>Data Recorded</h3>
144 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" />
145         </form>
146 <!-- /TMPL_IF -->
147
148 <!-- TMPL_IF NAME="delete_confirm" -->
149 <table><caption>Confirm Deletion of Currency <!-- TMPL_VAR NAME="searchfield" --></caption>
150
151                 <tr>
152                         <th>Currency</th>
153                         <td><!-- TMPL_VAR NAME="searchfield" --></td>
154                 </tr>
155
156
157         
158                 <tr>
159                         <th>Rate</th>
160                         <td><!-- TMPL_VAR NAME="rate" --></td>
161                 </tr>
162                 </table>
163                 <!-- TMPL_IF NAME="totalgtzero" -->
164
165                                 <span class="alert">This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</span>
166                                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
167                                         <input type="submit" value="OK" />
168                                 </form>
169                 <!-- TMPL_ELSE -->
170         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
171                         <input type="hidden" name="op" value="delete_confirmed" />
172                         <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
173                                 <input type="submit" value="Delete this Currency" />
174                                 </form>
175                                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
176                                         <input type="submit" value="Do Not Delete" />
177                                 </form>
178                 <!-- /TMPL_IF -->
179 <!-- /TMPL_IF -->
180
181 <!-- TMPL_IF NAME="delete_confirmed" -->
182 <h3>Currency Deleted</h3>
183 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
184                 <input type="submit" value="OK" />
185         </form>
186 <!-- /TMPL_IF -->
187
188 <!-- TMPL_IF NAME="else" -->
189
190 <h2>Currencies and Exchange Rates</h2>
191         <!-- TMPL_IF NAME="searchfield" -->
192                 You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
193         <!-- /TMPL_IF -->       
194
195         <table>
196                 <tr>
197                         <th>Currency</th>
198                         <th>Rate</th>
199                         <th colspan="2">&nbsp;</th>
200                 </tr>
201                 <!-- TMPL_LOOP NAME="loop" -->
202                 <tr>
203                         <td><!-- TMPL_VAR NAME="currency" --></td>
204                         <td><!-- TMPL_VAR NAME="rate" --></td>
205                         <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Edit</a></td>
206                         <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Delete</a></td>
207                 </tr>
208                 <!-- /TMPL_LOOP -->
209         </table>
210         
211         <!-- TMPL_IF NAME="offsetgtzero" -->
212                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Prev</a>
213         <!-- /TMPL_IF -->
214
215
216         <!-- TMPL_IF NAME="ltcount" -->
217                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>       
218         <!-- /TMPL_iF -->
219
220 <!-- /TMPL_IF -->
221
222
223 </div>
224 </div>
225 <div class="yui-b">
226 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
227 </div>
228 </div>
229 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->