updated templates for new XML API
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / admin / aqbookfund.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 Koha -- System Administration: Book Funds
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="menus.inc" -->
5 <!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
6
7 <!-- TMPL_IF name="else" -->
8 <h1>Book Fund Administration</h1>
9   <!-- TMPL_IF NAME="bookfund" -->
10 <table>
11   <tr>
12     <th>Code</th>
13     <th>Name</th>
14     <th>Branch</th>
15     <th>Actions</th>
16   </tr>
17
18 <form action="<!-- TMPL_VAR name="scriptname" -->" method="post">
19   <tr class="filter">
20     <td>
21       <select name="filter_bookfundid">
22         <option value="">----</option>
23     <!-- TMPL_LOOP name="filter_bookfundids" -->
24       <!-- TMPL_IF NAME="selected" -->
25         <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
26       <!-- TMPL_ELSE -->
27         <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
28       <!-- /TMPL_IF -->
29     <!-- /TMPL_LOOP -->
30       </select>
31     </td>
32     <td>
33       <input type="text" name="filter_bookfundname" value="<!-- TMPL_VAR name="filter_bookfundname" -->" />
34     </td>
35     <td>
36       <select name="filter_branchcode">
37         <option value="">----</option>
38     <!-- TMPL_LOOP name="filter_branches" -->
39       <!-- TMPL_IF NAME="selected" -->
40         <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
41       <!-- TMPL_ELSE -->
42         <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
43       <!-- /TMPL_IF -->
44     <!-- /TMPL_LOOP -->
45       </select>
46     </td>
47     <td>
48       <input type="submit" name="filter" value="Filter" />
49     </td>
50   </tr>
51 </form>
52
53 <form action="aqbudget.pl" method="post">
54     <!-- TMPL_LOOP name="bookfund" -->
55       <!-- TMPL_IF NAME="toggle" -->
56   <tr class="highlight">
57       <!-- TMPL_ELSE -->
58   <tr>
59       <!-- /TMPL_IF -->
60     <td>
61       <!-- TMPL_VAR name="bookfundid" -->
62     </td>
63     <td>
64       <!-- TMPL_VAR name="bookfundname" -->
65     </td>
66     <td>
67       <!-- TMPL_IF NAME="branchname" -->
68       <!-- TMPL_VAR name="branchname" -->
69       <!-- TMPL_ELSE -->
70       None
71       <!-- /TMPL_IF -->
72     </td>
73     <td>
74       <a href="<!-- TMPL_VAR name="scriptname" -->?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Edit</a>
75       <a href="<!-- TMPL_VAR name="scriptname" -->?op=delete_confirm&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Delete</a>
76       <a href="aqbudget.pl?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Add budget</a>
77       <!-- TMPL_IF NAME="has_budgets" -->
78       <a href="aqbudget.pl?filter_bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Show budgets</a>
79       <!-- /TMPL_IF -->
80     </td>
81   </tr>
82
83     <!-- /TMPL_LOOP --> <!-- bookfund -->
84 </table>
85
86 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
87   <!-- /TMPL_IF --> <!-- bookfund -->
88
89 <p>
90   <a href="<!-- TMPL_VAR name=scriptname -->?op=add_form">Add bookfund</a>
91   <a href="aqbudget.pl">Show all budgets</a>
92 </p>
93
94 </form>
95 <!-- /TMPL_IF --> <!-- else -->
96
97 <!-- TMPL_IF name="add_form" -->
98 <script>
99         //
100         function isNotNull(f,noalert) {
101                 if (f.value.length ==0) {
102    return false;
103                 }
104                 return true;
105         }
106         //
107         function toUC(f) {
108                 var x=f.value.toUpperCase();
109                 f.value=x;
110                 return true;
111         }
112         //
113         function isNum(v,maybenull) {
114         var n = new Number(v.value);
115         if (isNaN(n)) {
116                 return false;
117                 }
118         if (maybenull==0 && v.value=="") {
119                 return false;
120         }
121         return true;
122         }
123         //
124         function isDate(f) {
125                 var t = Date.parse(f.value);
126                 if (isNaN(t)) {
127                         return false;
128                 }
129         }
130         //
131         function Check(f) {
132                 var ok=1;
133                 var _alertString="";
134                 var alertString2;
135                 if (f.bookfundid.value.length==0) {
136                         _alertString += "- bookfundid missing\n";
137                 }
138                 if (f.bookfundname.value.length==0) {
139                         _alertString += "- bookfundname missing\n";
140                 }
141                 if (_alertString.length==0) {
142                         document.Aform.submit();
143                 } else {
144                         alertString2 = "Form not submitted because of the following problem(s)\n";
145                         alertString2 += "------------------------------------------------------------------------------------\n\n";
146                         alertString2 += _alertString;
147                         alert(alertString2);
148                 }
149         }
150         </script>
151
152 <form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
153   <input type="hidden" name="op" value="add_validate" />
154   <input type="hidden" name="checked" value="0" />
155
156   <table>
157     <caption><!-- TMPL_VAR name="header" --></caption>
158     
159   <!-- TMPL_IF name="add_or_modify" -->
160     <tr>
161       <th>Book fund</th>
162       <td>
163         <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
164         <!-- TMPL_VAR name="bookfundid" -->
165       </td>
166     </tr>
167   <!-- TMPL_ELSE -->
168     <tr>
169       <th>Book fund</th>
170       <td>
171         <input type="text" name="bookfundid" size="5" maxlength="5" onblur="toUC(this)" />
172       </td>
173     </tr>
174   <!-- /TMPL_IF --> <!-- add_or_modify -->
175     
176     <tr>
177       <th>Name</th>
178       <td>
179         <input type="text"
180                name="bookfundname"
181                size="40"
182           maxlength="80"
183               value="<!-- TMPL_VAR name="bookfundname" escape="HTML" -->"
184         />
185       </td>
186     </tr>
187
188     <tr>
189       <th>Branch</th>
190       <td>
191         <select name="branchcode">
192           <option value="">None</option>
193   <!-- TMPL_LOOP NAME="branches" -->  
194           <option value="<!-- TMPL_VAR NAME="branchcode" -->"  <!-- TMPL_IF NAME="selected" -->selected="selected" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="branchname" --></option>
195   <!-- /TMPL_LOOP -->
196       </td>
197     </tr>
198     
199   </table>
200
201   <p>
202     <input type="button" value="Submit" onclick="Check(this.form); return false;" />
203     <input type="reset" value="Reset" />
204   </p>
205 </form>
206 <!-- /TMPL_IF --> <!-- add_form -->
207
208 <!-- TMPL_IF name="add_validate" -->
209 <h3>Data Recorded</h3>
210
211 <p>
212   <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
213 </p>
214 <!-- /TMPL_IF -->
215
216 <!-- TMPL_IF name="delete_confirm" -->
217 <h3>Confirm Deletion of Fund <em><!-- TMPL_VAR name="bookfundid" --></em></h3>
218 <table>
219   <tr>
220     <th>Book fund</th>
221     <td><!-- TMPL_VAR name="bookfundid" --></td>
222   </tr>
223   <tr>
224     <th>Name</th>
225     <td><!-- TMPL_VAR name="bookfundname" --></td>
226   </tr>
227   <tr>
228     <th>Group</th>
229     <td><!-- TMPL_VAR name="bookfundgroup" --></td>
230   </tr>
231 </table>
232
233 <form action="<!-- TMPL_VAR name="action" -->" method="post">
234   <input type="hidden" name="op" value="delete_confirmed" />
235   <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
236
237   <div id="action">
238     <input type="submit" value="Delete this Fund" />
239   </div>
240 </form>
241
242 <form action="<!-- TMPL_VAR name="action" -->" method="post">
243   <input type="submit" value="Do not Delete" />
244 </form>
245 <!-- /TMPL_IF --> <!-- delete_confirm -->
246
247 <!-- TMPL_IF name="delete_confirmed" -->
248 <h3>Data Deleted</h3>
249 <form action="<!-- TMPL_VAR name="action" -->" method="post">
250   <input type="submit" value="OK" />
251 </form>
252 <!-- /TMPL_IF --> <!-- delete_confirmed -->
253
254 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->