Page structure correction, helps Bug 3850 (Page Need Design Work)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqplan.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; Budgets &rsaquo; Budget planning</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/acq.js"></script>
6 <script type="text/javascript">
7 //<![CDATA[
8 // ---------------------------------------------------------------------
9 // Javascript
10 // ---------------------------------------------------------------------
11     function Check(f) {
12             var ok=1;
13             var _alertString="";
14             var alertString2;
15             var arr = document.getElementsByName('est_total')
16
17             for ( var i=0, len=arr.length; i<len; ++i ){
18                     var tot = arr[i].innerHTML;
19
20                     if (tot == 'NaN') {
21                         _alertString += "\n- " + _("One or more cell values is non-numeric");
22                     }
23             }
24
25             if (_alertString.length==0) {
26
27                 var op  = document.createElement('input');
28                 op.setAttribute("type","hidden");
29                 op.setAttribute("name","op");
30                 op.setAttribute("value","save");   //ohh the pain...
31
32                 document.Aform.appendChild(op);
33                 document.Aform.submit()
34
35             } else {
36                     alertString2  = _("Form not submitted because of the following problem(s)");
37                     alertString2 += "\n------------------------------------------------------------------------------------\n";
38                     alertString2 += _alertString;
39                     alert(alertString2);
40             }
41     }
42
43
44 YAHOO.util.Event.onAvailable("popmenu", function () {
45
46     var itemData  = new Array();
47     table = document.getElementById('plan') 
48     tableTmp =  table.cloneNode(true); 
49     tableTmp.id = 'planTmp';
50
51     <!-- TMPL_LOOP NAME="authvals_row" -->
52         itemData.push( {   text: "<!-- TMPL_VAR NAME="val" -->",  onclick: { fn: addColumn, obj:  ["<!-- TMPL_VAR NAME="colnum" -->",  "<!-- TMPL_VAR NAME="code" -->"]    }    }     );
53
54     <!-- /TMPL_LOOP -->
55     oMenu = new YAHOO.widget.Menu("basicmenu",
56             {  position: "dynamic", itemdata: itemData , clicktohide  : "true" , context:["popmenu","tl","tr"] }
57     );
58
59    oMenu.render("popmenu");
60    YAHOO.util.Event.addListener("add_popmenu_item", "click", oMenu.show, null, oMenu);
61
62 // oMenu.removeItem(2);   // TODO.....
63
64 });
65 //]]>
66 </script>
67
68 </head>
69 <body>
70 <!-- TMPL_INCLUDE NAME="header.inc" -->
71 <!-- TMPL_INCLUDE NAME="budgets-admin-search.inc" -->
72
73 <div id="breadcrumbs">
74     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
75     <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo;
76     <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> &rsaquo; 
77     <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Funds</a> &rsaquo;
78     <a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Planning</a> &rsaquo;
79 </div>
80
81 <div id="doc3" class="yui-t2">
82 <div id="bd">
83 <div id="yui-main">
84 <div class="yui-b">
85
86
87 <!-- TMPL_INCLUDE NAME="budgets-admin-toolbar.inc" -->
88
89 <br />
90
91 <form method="post" id='Aform' name="Aform"  action="/cgi-bin/koha/admin/aqplan.pl">
92
93 <fieldset style=" border:2px solid #EEEEEE; " >
94 <legend>Planning for <!-- TMPL_VAR NAME="budget_period_description" --> by <!-- TMPL_VAR NAME="authcat" --></legend>
95     <table class="invis" >
96     <tr><td>
97     <!-- TMPL_IF NAME="show_mine" -->
98         <input type="checkbox" id="show_mine"  name="show_mine" value="1" checked="checked" />
99     <!-- TMPL_ELSE -->
100         <input type="checkbox" id="show_mine"  name="show_mine" value="1"  />
101     <!-- /TMPL_IF -->
102     <label for="show_mine">Show my funds only</label>
103     </td>
104     <td>
105         <label for="authcat"  > Select planning type:</label>
106         <!-- TMPL_VAR NAME="authcat_dropbox" -->
107         <input type="submit" name="option_submit" value="Select" />
108     </td>
109     </tr>
110
111     <tr><td>
112     <!-- TMPL_IF NAME="show_active" -->
113         <input type="checkbox" id="show_active" name="show_active" value="1" checked="checked" />
114     <!-- TMPL_ELSE -->
115         <input type="checkbox" id="show_active" name="show_active" value="1" />
116         <!-- /TMPL_IF -->
117     <label for="show_active">Show active funds only</label>
118     </td>
119     <td></td>
120     </tr>
121
122     <tr><td>
123         <!-- TMPL_IF NAME="show_actual" -->
124             <input type="checkbox"    id="show_actual"   name="show_actual" value="1"   checked="checked" />
125         <!-- TMPL_ELSE -->
126             <input type="checkbox" id="show_actual" name="show_actual" value="1"  />
127         <!-- /TMPL_IF -->
128         <label for="show_actual">Show actual/estimated values:</label>
129     </td>
130     <td></td>
131     </tr>
132     </table>
133 </fieldset>
134
135 <br />
136
137 <!-- Budget Lines -->
138
139     <!-- TMPL_IF NAME="budget_lines" -->
140
141     <!-- TMPL_IF name="cur" --><p><b>Currency = <!-- TMPL_VAR name="cur" --></b></p><!-- TMPL_ELSE --><div class="dialog alert"><h3>No active currency is defined</h3><p>Please <a href="/cgi-bin/koha/admin/currency.pl">specify an active currency</a>.</p></div><!-- /TMPL_IF -->
142
143     <table id="plan" width="100%">
144     <thead>
145     <tr>
146     <th>Fund name</th>
147     <th>Fund total</th>
148
149     <!-- TMPL_LOOP NAME="authvals_row" -->
150          <!-- TMPL_IF NAME="display" -->
151             <th id="<!-- TMPL_VAR NAME="code" -->"   style="text-align: center;"
152                         class="<!-- TMPL_VAR NAME='colnum' -->" >
153         <!-- TMPL_ELSE -->
154             <th id="<!-- TMPL_VAR NAME="code" -->"   style="text-align: center;
155                             display:none;" 
156                         class="<!-- TMPL_VAR NAME='colnum' -->" >
157         <!-- /TMPL_IF -->
158
159     <!-- TMPL_VAR NAME="code" -->&nbsp;<span class="buttonPlus" onclick="delColumn('<!-- TMPL_VAR NAME="colnum" -->', '<!-- TMPL_VAR NAME="code" -->')"  > - &nbsp;</span></th>
160
161     <!-- /TMPL_LOOP -->
162
163     <th>Fund remaining</th>
164
165     <th id='popmenu' style=" text-align: center;" >
166     <span id="add_popmenu_item" class="buttonPlus" > + </span></th>
167     </tr>
168     </thead>
169
170     <tbody>
171     <!-- TMPL_LOOP NAME="budget_lines" -->
172             <!-- TMPL_IF Name="budget_lock" -->
173         <tr  class="highlight"  > 
174             <!--TMPL_ELSE -->
175         <tr > 
176             <!--/TMPL_IF -->
177
178         <td align='left'><!-- TMPL_VAR NAME="budget_name_indent"--></td>
179         <td align='right'><span id='budget_tot_formatted_<!-- TMPL_VAR NAME="budget_id" -->'><!-- TMPL_VAR NAME="budget_amount_formatted"-->&nbsp;</span>
180
181         <!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS -->
182         <div style="display:none;" id='budget_tot_<!-- TMPL_VAR NAME="budget_id" -->'><!-- TMPL_VAR NAME="budget_amount"--></div></td>
183
184         <!-- TMPL_LOOP NAME="lines"     -->
185             <!-- TMPL_IF NAME="display" -->
186                 <td class="<!-- TMPL_VAR NAME="colnum"-->">
187             <!-- TMPL_ELSE -->
188                 <td style="display:none;" class="<!-- TMPL_VAR NAME="colnum"-->">
189             <!-- /TMPL_IF -->
190             <table class="invis" width="100%">
191                 <tr>
192                     <!-- TMPL_IF Name="show_actual" -->
193                         <td   width="50%"  align="right" ><!-- TMPL_VAR NAME="actual_amount" --></td>
194                     <!--/TMPL_IF -->
195                 <td align="right">
196
197                 <!--TMPL_IF  Name="budget_lock" -->
198                     <!-- TMPL_VAR NAME="estimated_amount" -->&nbsp;
199                     <input type="hidden" style="text-align: right;"  name='<!-- TMPL_VAR NAME="cell_name"-->' value="<!-- TMPL_VAR NAME="estimated_amount" -->"   />
200                 <!--TMPL_ELSE -->
201                     <input type="text" style="text-align: right;  width:90%; " size='6' name='<!-- TMPL_VAR NAME="cell_name"-->'  value="<!-- TMPL_VAR NAME="estimated_amount" -->"  id='budget_<!-- TMPL_VAR NAME="budget_id"--><!-- TMPL_VAR NAME="colnum"-->' class='plan_entry_<!-- TMPL_VAR NAME="budget_id"-->' onchange="calcTotalRow(this);" />
202                 <!--/TMPL_IF -->
203
204                 </td></tr>
205             </table>
206             </td>
207         <!-- /TMPL_LOOP -->
208
209         <td>
210         <table class="invis" width="100%">
211             <tr>
212        <!-- TMPL_IF Name="show_actual" -->
213             <!-- TMPL_IF NAME="act_negative" -->
214                 <td width="50%" align="right" style="color: red;"> 
215             <!-- TMPL_ELSIF NAME="act_positive" -->
216                 <td width="50%" align="right" style="color: green;"> 
217             <!-- TMPL_ELSE -->
218                 <td width="50%" align="right">
219             <!--/TMPL_IF -->
220                     <!-- TMPL_VAR NAME="budget_act_remain"-->
221         <!-- TMPL_ELSE -->
222             <td width="50%" align="right">
223         <!-- /TMPL_IF -->
224             </td>
225
226         <!-- TMPL_IF NAME="est_negative" -->
227             <td width="50%"    align="right"  style="color: red;" id='budget_est_<!-- TMPL_VAR NAME="budget_id"-->'> 
228         <!-- TMPL_ELSIF NAME="est_positive" -->
229             <td width="50%"    align="right"  style="color: green;" id='budget_est_<!-- TMPL_VAR NAME="budget_id"-->'> 
230         <!-- TMPL_ELSE -->
231             <td width="50%"    align="right" id='budget_est_<!-- TMPL_VAR NAME="budget_id"-->'> 
232         <!--/TMPL_IF --> 
233                 <!-- TMPL_VAR NAME="budget_est_remain"-->&nbsp;    
234             </td>
235             </tr>
236         </table>
237         </td>
238
239         <td align="center">
240              <!-- TMPL_UNLESS Name="budget_lock" -->
241                     <input type="button"  onclick="autoFillRow('<!-- TMPL_VAR NAME="budget_id"-->')" value="Auto-fill row"/>
242             <!-- TMPL_ELSE  -->
243              <div style="color:red;">not owned</div>
244             <!-- /TMPL_UNLESS  -->
245         </td>
246         </tr>
247     <!-- /TMPL_LOOP -->
248     </tbody>
249     </table>
250
251     <!-- TMPL_IF NAME="show_actual" -->
252         <span><b>Each cell contain both actual and estimated values.</b></span><br />
253     <!-- TMPL_ELSE -->
254         <span><b>Cells contain estimated values only.</b></span><br />
255     <!-- /TMPL_IF -->
256     <!-- TMPL_IF name="budget_period_locked" -->
257         <!-- <input STYLE="background: gray;"   type="submit" value="Save" disabled='disabled'/> -->
258     <!-- TMPL_ELSE -->
259         <input type="button"  onclick="Check(this.form)" value="Save"/>
260     <!-- /TMPL_IF -->
261
262
263 <div id='hide_div'>
264     <!-- TMPL_LOOP NAME="authvals_row" -->
265
266      <!-- TMPL_UNLESS Name="display" -->
267         <input type="hidden" value="<!-- TMPL_VAR NAME="code" -->"  name="hide_cols"/>
268      <!-- /TMPL_UNLESS -->
269     <!-- /TMPL_LOOP -->
270
271  </div>
272
273
274 </form>
275
276 <form method="post" action="/cgi-bin/koha/admin/aqplan.pl">
277 <fieldset class="rows">
278     <ol>
279     <li><label for="basename">Output to a file named: </label><input type="text" name="basename" id="basename" value="Export" />
280     <label class="inline" for="MIME">Into an application
281     </label><!-- TMPL_VAR NAME="CGIextChoice" -->
282     <!-- TMPL_VAR NAME="CGIsepChoice" --> &nbsp;&nbsp;&nbsp;
283     <input type="submit" value="Output"/>
284     <input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
285     <input type="hidden" name="output" value="file" />
286     </li></ol>
287     </fieldset>
288 </form>
289
290         <!-- TMPL_ELSE  -->
291 No funds to display for this search criteria
292         <!-- /TMPL_IF   -->
293
294
295 </div>
296 </div>
297 </div>
298 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->