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