Merge commit 'kc/master'
[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 -->New Currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
4 <!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
5 <!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
6 <!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF --></title>
7 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
8 <script type="text/javascript">
9 //<![CDATA[
10     function toUC(f) {
11         var x=f.value.toUpperCase();
12         f.value=x;
13         return true;
14     }
15     function Check(f) {
16         var _alertString="";
17         var alertString2;
18         if (f.currency.value.length==0) {
19             _alertString += _("- Currency name missing") + "\n";
20         }
21         if (f.rate.value.length==0) {
22             _alertString += _("- Rate missing") + "\n";
23         }
24         if (f.symbol.value.length==0) {
25             _alertString += _("- Symbol missing") + "\n";
26         }
27         if (_alertString.length==0) {
28             document.Aform.submit();
29         } else {
30             alertString2 = _("Form not submitted because of the following problem(s)") + "\n";
31             alertString2 += "------------------------------------------------------------------------------------\n";
32             alertString2 += _alertString;
33             alert(alertString2);
34         }
35     }
36
37     $(document).ready(function() {
38         new YAHOO.widget.Button("newcurrency");
39
40         // prevents users to check active with a currency != 1
41         $("#rate").keyup(function() {
42             if ( $(this).val() == 1.0 ) {
43                 $("#active").removeAttr('disabled');
44             } else {
45                 $("#active").removeAttr('checked');
46                 $("#active").attr('disabled','disabled');
47             }
48         });
49     });
50 //]]>
51 </script>
52 </head>
53 <body>
54 <!-- TMPL_INCLUDE NAME="header.inc" -->
55 <!-- TMPL_INCLUDE NAME="currencies-admin-search.inc" -->
56
57
58
59 <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 -->New Currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
60 <!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span>'<!-- /TMPL_IF -->
61 <!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
62 <!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF -->
63 </div>
64
65 <div id="doc3" class="yui-t2">
66
67 <div id="bd">
68     <div id="yui-main">
69     <div class="yui-b">
70
71 <!-- TMPL_IF NAME="else" -->
72 <div id="toolbar">
73     <ul class="toolbar">
74     <li><a id="newcurrency" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form">New Currency</a></li>
75 </ul></div>
76 <!-- /TMPL_IF -->
77
78 <!-- TMPL_IF NAME="add_form" -->
79
80 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
81     <input type="hidden" name="op" value="save" />
82     <fieldset class="rows">
83     <legend><!-- TMPL_IF NAME="searchfield" -->
84         Modify currency
85     <!-- TMPL_ELSE -->
86         New currency
87     <!-- /TMPL_IF --></legend>
88     <ol>
89         <li>
90     <!-- TMPL_IF NAME="searchfield" -->
91             <span class="label">Currency: </span>
92             <input type="hidden" name="currency" id="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
93     <!-- TMPL_ELSE -->
94             <label for="currency">Currency: </label>
95             <input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" />
96     <!-- /TMPL_IF -->
97         </li>
98         <li>
99             <label for="rate">Rate: </label>
100             <input type="text" name="rate" id="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
101         </li>
102         <li>
103             <label for="symbol">Symbol: </label>
104             <input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="<!-- TMPL_VAR NAME="symbol" -->" />
105         </li>
106
107         <li>
108             <span class="label">Last Updated: </span><!-- TMPL_VAR NAME="timestamp" -->
109         </li>
110         <li>
111             <label for="active">Active: </label>
112             <!-- TMPL_IF NAME="active" -->
113             <input type="checkbox" id="active" name="active" value="1" checked="checked" />
114             <!-- TMPL_ELSE -->
115             <input type="checkbox" id="active" name="active" value="1" />
116             <!-- /TMPL_IF -->
117         </li>
118
119         </ol>
120         </fieldset>
121
122     <fieldset class="action">
123         <input type="submit" value="Submit" onclick="Check(this.form)" />
124         <a href="/cgi-bin/koha/admin/currency.pl" class="cancel">Cancel</a>
125     </fieldset>
126     </form>
127
128 <!-- /TMPL_IF -->
129
130 <!-- TMPL_IF NAME="delete_confirm" -->
131     <!-- TMPL_IF NAME="totalgtzero" -->
132     <div class="dialog message">
133         <h3>Cannot Delete Currencey <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
134         <p>This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</p>
135         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
136             <input type="submit" value="OK" class="approve" />
137         </form>
138     </div>
139     <!-- TMPL_ELSE -->
140     <div class="dialog alert">
141         <h3>Confirm Deletion of Currency <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
142         <table>
143             <tr><th>Currency</th>
144                 <td><!-- TMPL_VAR NAME="searchfield" --></td>
145             </tr>
146             <tr><th>Rate</th>
147                 <td><!-- TMPL_VAR NAME="rate" --></td>
148             </tr>
149         </table>
150         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
151             <input type="hidden" name="op" value="delete_confirmed" />
152             <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
153             <input type="submit" class="approve" value="Delete this Currency" />
154         </form>
155         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
156             <input type="submit" class="deny" value="No, Do Not Delete" />
157         </form>
158     </div>
159     <!-- /TMPL_IF -->
160 <!-- /TMPL_IF -->
161
162 <!-- TMPL_IF NAME="delete_confirmed" -->
163 <div class="dialog message"><h3>Currency Deleted</h3>
164 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
165     <input type="submit" class="approve" value="OK" />
166 </form></div>
167 <!-- /TMPL_IF -->
168
169 <!-- TMPL_IF NAME="else" -->
170
171 <h2>Currencies and Exchange Rates</h2>
172
173 <!-- TMPL_IF NAME="loop" --><!-- TMPL_UNLESS NAME="activecurrency" --><div class="dialog alert"><h3>No active currency is defined</h3><p>Please edit one currency and mark it as active.</p></div><!-- /TMPL_UNLESS --><!-- /TMPL_IF -->
174
175
176     <!-- TMPL_IF NAME="searchfield" -->
177         You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
178     <!-- /TMPL_IF -->
179
180     <table>
181         <tr>
182             <th>Currency</th>
183             <th>Rate</th>
184             <th>Symbol</th>
185             <th>Last Updated</th>
186             <th>Active</th>
187             <th colspan="2">Actions&nbsp;</th>
188         </tr>
189         <!-- TMPL_LOOP NAME="loop" -->
190         <!-- TMPL_UNLESS NAME="__odd__" -->
191         <tr class="highlight">
192         <!-- TMPL_ELSE -->
193         <tr>
194         <!-- /TMPL_UNLESS -->
195             <td><!-- TMPL_VAR NAME="currency" --></td>
196             <td><!-- TMPL_VAR NAME="rate" --></td>
197             <td><!-- TMPL_VAR NAME="symbol" ESCAPE="HTML" --></td>
198             <td><!-- TMPL_VAR NAME="timestamp" --></td>
199             <td style="color:green;"><!-- TMPL_IF NAME="active" -->✓<!-- /TMPL_IF --></td>
200             <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Edit</a></td>
201             <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Delete</a></td>
202         </tr>
203         <!-- /TMPL_LOOP -->
204     </table>
205 <br />
206
207     <!-- TMPL_IF NAME="offsetgtzero" -->
208         <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Previous</a>
209     <!-- /TMPL_IF -->
210
211     <!-- TMPL_IF NAME="ltcount" -->
212         <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>
213     <!-- /TMPL_IF -->
214
215 <!-- /TMPL_IF -->
216
217 </div>
218 </div>
219 <div class="yui-b">
220 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
221 </div>
222 </div>
223 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->