(MT #1577) complete langages checkbox for unique id
[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 <input type="hidden" id="budget_period_id" name="budget_period_id" value="<!-- TMPL_VAR NAME="budget_period_id" -->"/>
94 <fieldset style=" border:2px solid #EEEEEE; " >
95 <legend>Planning for <!-- TMPL_VAR NAME="budget_period_description" --> by <!-- TMPL_VAR NAME="authcat" --></legend>
96     <table class="invis" >
97     <tr><td>
98     <!-- TMPL_IF NAME="show_mine" -->
99         <input type="checkbox" id="show_mine"  name="show_mine" value="1" checked="checked" />
100     <!-- TMPL_ELSE -->
101         <input type="checkbox" id="show_mine"  name="show_mine" value="1"  />
102     <!-- /TMPL_IF -->
103     <label for="show_mine">Show my funds only</label>
104     </td>
105     <td>
106         <label for="authcat"  > Select planning type:</label>
107         <!-- TMPL_VAR NAME="authcat_dropbox" -->
108         <input type="submit" name="option_submit" value="Select" />
109     </td>
110     </tr>
111
112     <tr><td>
113     <!-- TMPL_IF NAME="show_active" -->
114         <input type="checkbox" id="show_active" name="show_active" value="1" checked="checked" />
115     <!-- TMPL_ELSE -->
116         <input type="checkbox" id="show_active" name="show_active" value="1" />
117         <!-- /TMPL_IF -->
118     <label for="show_active">Show active funds only</label>
119     </td>
120     <td></td>
121     </tr>
122
123     <tr><td>
124         <!-- TMPL_IF NAME="show_actual" -->
125             <input type="checkbox"    id="show_actual"   name="show_actual" value="1"   checked="checked" />
126         <!-- TMPL_ELSE -->
127             <input type="checkbox" id="show_actual" name="show_actual" value="1"  />
128         <!-- /TMPL_IF -->
129         <label for="show_actual">Show actual/estimated values:</label>
130     </td>
131     <td></td>
132     </tr>
133     </table>
134 </fieldset>
135
136 <br />
137
138 <!-- Budget Lines -->
139
140     <!-- TMPL_IF NAME="budget_lines" -->
141
142     <!-- TMPL_INCLUDE NAME="budgets-active-currency.inc" -->
143
144     <table id="plan" width="100%">
145     <thead>
146     <tr>
147     <th>Fund name</th>
148     <th>Fund total</th>
149
150     <!-- TMPL_LOOP NAME="authvals_row" -->
151          <!-- TMPL_IF NAME="display" -->
152             <th id="<!-- TMPL_VAR NAME="code" -->"   style="text-align: center;"
153                         class="<!-- TMPL_VAR NAME='colnum' -->" >
154         <!-- TMPL_ELSE -->
155             <th id="<!-- TMPL_VAR NAME="code" -->"   style="text-align: center;
156                             display:none;" 
157                         class="<!-- TMPL_VAR NAME='colnum' -->" >
158         <!-- /TMPL_IF -->
159
160     <!-- TMPL_VAR NAME="code" -->&nbsp;<span class="buttonPlus" onclick="delColumn('<!-- TMPL_VAR NAME="colnum" -->', '<!-- TMPL_VAR NAME="code" -->')"  > - &nbsp;</span></th>
161
162     <!-- /TMPL_LOOP -->
163
164     <th>Fund remaining</th>
165
166     <th id='popmenu' style=" text-align: center;" >
167     <span id="add_popmenu_item" class="buttonPlus" > + </span></th>
168     </tr>
169     </thead>
170
171     <tbody>
172     <!-- TMPL_LOOP NAME="budget_lines" -->
173             <!-- TMPL_IF Name="budget_lock" -->
174         <tr  class="highlight"  > 
175             <!--TMPL_ELSE -->
176         <tr > 
177             <!--/TMPL_IF -->
178
179         <td align='left'><!-- TMPL_VAR NAME="budget_name_indent"--></td>
180         <td align='right'><span id='budget_tot_formatted_<!-- TMPL_VAR NAME="budget_id" -->'><!-- TMPL_VAR NAME="budget_amount_formatted"-->&nbsp;</span>
181
182         <!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS -->
183         <div style="display:none;" id='budget_tot_<!-- TMPL_VAR NAME="budget_id" -->'><!-- TMPL_VAR NAME="budget_amount"--></div></td>
184
185         <!-- TMPL_LOOP NAME="lines"     -->
186             <!-- TMPL_IF NAME="display" -->
187                 <td class="<!-- TMPL_VAR NAME="colnum"-->">
188             <!-- TMPL_ELSE -->
189                 <td style="display:none;" class="<!-- TMPL_VAR NAME="colnum"-->">
190             <!-- /TMPL_IF -->
191             <table class="invis" width="100%">
192                 <tr>
193                     <!-- TMPL_IF Name="show_actual" -->
194                         <td   width="50%"  align="right" ><!-- TMPL_VAR NAME="actual_amount" --></td>
195                     <!--/TMPL_IF -->
196                 <td align="right">
197
198                 <!--TMPL_IF  Name="budget_lock" -->
199                     <!-- TMPL_VAR NAME="estimated_amount" -->&nbsp;
200                     <input type="hidden" style="text-align: right;"  name='<!-- TMPL_VAR NAME="cell_name"-->' value="<!-- TMPL_VAR NAME="estimated_amount" -->"   />
201                 <!--TMPL_ELSE -->
202                     <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);" />
203                 <!--/TMPL_IF -->
204
205                 </td></tr>
206             </table>
207             </td>
208         <!-- /TMPL_LOOP -->
209
210         <td>
211         <table class="invis" width="100%">
212             <tr>
213        <!-- TMPL_IF Name="show_actual" -->
214             <!-- TMPL_IF NAME="act_negative" -->
215                 <td width="50%" align="right" style="color: red;"> 
216             <!-- TMPL_ELSIF NAME="act_positive" -->
217                 <td width="50%" align="right" style="color: green;"> 
218             <!-- TMPL_ELSE -->
219                 <td width="50%" align="right">
220             <!--/TMPL_IF -->
221                     <!-- TMPL_VAR NAME="budget_act_remain"-->
222         <!-- TMPL_ELSE -->
223             <td width="50%" align="right">
224         <!-- /TMPL_IF -->
225             </td>
226
227         <!-- TMPL_IF NAME="est_negative" -->
228             <td width="50%"    align="right"  style="color: red;" id='budget_est_<!-- TMPL_VAR NAME="budget_id"-->'> 
229         <!-- TMPL_ELSIF NAME="est_positive" -->
230             <td width="50%"    align="right"  style="color: green;" id='budget_est_<!-- TMPL_VAR NAME="budget_id"-->'> 
231         <!-- TMPL_ELSE -->
232             <td width="50%"    align="right" id='budget_est_<!-- TMPL_VAR NAME="budget_id"-->'> 
233         <!--/TMPL_IF --> 
234                 <!-- TMPL_VAR NAME="budget_est_remain"-->&nbsp;    
235             </td>
236             </tr>
237         </table>
238         </td>
239
240         <td align="center">
241              <!-- TMPL_UNLESS Name="budget_lock" -->
242                     <input type="button"  onclick="autoFillRow('<!-- TMPL_VAR NAME="budget_id"-->')" value="Auto-fill row"/>
243             <!-- TMPL_ELSE  -->
244              <div style="color:red;">not owned</div>
245             <!-- /TMPL_UNLESS  -->
246         </td>
247         </tr>
248     <!-- /TMPL_LOOP -->
249     </tbody>
250     </table>
251
252     <!-- TMPL_IF NAME="show_actual" -->
253         <span><b>Each cell contain both actual and estimated values.</b></span><br />
254     <!-- TMPL_ELSE -->
255         <span><b>Cells contain estimated values only.</b></span><br />
256     <!-- /TMPL_IF -->
257     <!-- TMPL_IF name="budget_period_locked" -->
258         <!-- <input STYLE="background: gray;"   type="submit" value="Save" disabled='disabled'/> -->
259     <!-- TMPL_ELSE -->
260         <input type="button"  onclick="Check(this.form)" value="Save"/>
261     <!-- /TMPL_IF -->
262
263
264 <div id='hide_div'>
265     <!-- TMPL_LOOP NAME="authvals_row" -->
266
267      <!-- TMPL_UNLESS Name="display" -->
268         <input type="hidden" value="<!-- TMPL_VAR NAME="code" -->"  name="hide_cols"/>
269      <!-- /TMPL_UNLESS -->
270     <!-- /TMPL_LOOP -->
271
272  </div>
273
274
275 </form>
276
277 <form method="post" action="/cgi-bin/koha/admin/aqplan.pl">
278 <fieldset class="rows">
279     <ol>
280     <li><label for="basename">Output to a file named: </label><input type="text" name="basename" id="basename" value="Export" />
281     <label class="inline" for="MIME">Into an application
282     </label><!-- TMPL_VAR NAME="CGIextChoice" -->
283     <!-- TMPL_VAR NAME="CGIsepChoice" --> &nbsp;&nbsp;&nbsp;
284     <input type="submit" value="Output"/>
285     <input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
286     <input type="hidden" name="output" value="file" />
287     </li></ol>
288     </fieldset>
289 </form>
290
291         <!-- TMPL_ELSE  -->
292 No funds to display for this search criteria
293         <!-- /TMPL_IF   -->
294
295
296 </div>
297 </div>
298 <div class="yui-b">
299 <!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
300 </div>
301 </div>
302 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->