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