Bug 11578: (follow-up) fix show inactive link
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqbudgets.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; Funds[% IF op == 'add_form' %] &rsaquo; [% IF ( budget_id ) %]Modify fund[% IF ( budget_name ) %] '[% budget_name %]'[% END %][% ELSE %]Add fund [% END %][% END %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript">
5 //<![CDATA[
6 var MSG_BUDGET_PARENT_ALLOCATION = "- " + _("Fund amount exceeds parent allocation") + "\n";
7 var MSG_BUDGET_PERIOD_ALLOCATION = "- " + _("Fund amount exceeds period allocation") + "\n";
8 var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") + "\n";
9 //]]>
10 </script>
11
12 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
13 [% IF op == 'add_form' %]
14 <script type="text/javascript">
15 //<![CDATA[
16
17     function userPopup() {
18         window.open("/cgi-bin/koha/admin/aqbudget_user_search.pl?type=user",
19             'PatronPopup',
20             'width=740,height=450,location=yes,toolbar=no,'
21             + 'scrollbars=yes,resize=yes'
22         );
23     }
24
25     function ownerPopup() {
26         window.open("/cgi-bin/koha/admin/aqbudget_user_search.pl?type=owner",
27             'PatronPopup',
28             'width=740,height=450,location=yes,toolbar=no,'
29             + 'scrollbars=yes,resize=yes'
30         );
31     }
32
33     function edit_owner(borrowernumber, surname, firstname) {
34         $('#budget_owner_name').empty();
35         $('#budget_owner_id').val('');
36         if (borrowernumber) {
37             var ownerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
38                 + '?borrowernumber=' + borrowernumber + '">'
39                 + firstname + ' ' + surname + '</a>';
40             $('#budget_owner_name').html(ownerlink);
41             $('#budget_owner_id').val(borrowernumber);
42         }
43     }
44
45     function ownerRemove() {
46         edit_owner(0);
47     }
48
49     function add_user(borrowernumber, surname, firstname) {
50         var ids = $("#budget_users_id").val().split(':');
51         if(borrowernumber && ids.indexOf(borrowernumber) == -1) {
52             var li = '<li id="user_' + borrowernumber + '">'
53                 + '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber='
54                 + borrowernumber + '">' + firstname + ' ' + surname
55                 + '</a> [<a style="cursor:pointer"'
56                 + 'onclick="del_user(' + borrowernumber +')">Remove</a>]</li>';
57             $(li).insertBefore("li#add_user_button");
58             ids.push(borrowernumber);
59             $("#budget_users_id").val(ids.join(':'));
60         } else {
61             return -1;
62         }
63         return 0;
64     }
65
66     function del_user(borrowernumber) {
67         var ids = $("#budget_users_id").val().split(':');
68         if (borrowernumber) {
69             var idx = ids.indexOf(borrowernumber+'');
70             if (idx != -1) {
71                 ids.splice(idx, 1);
72                 $("#budget_users_id").val(ids.join(':'));
73                 $("li#user_" + borrowernumber).remove();
74             }
75         }
76     }
77
78     function Check(f) {
79         var ok=1;
80         var _alertString="";
81         var alertString2;
82
83         if (!(isNotNull(f.budget_code,1))) {
84             _alertString += _("- Budget code cannot be blank") + "\n";
85         }
86
87         if (!(isNotNull(f.budget_name,1))) {
88             _alertString += _("- Budget name cannot be blank") + "\n";
89         }
90
91         if (!(isNotNull(f.budget_amount,1))) {
92             _alertString += _("- Budget amount cannot be blank") + "\n";
93         }
94
95         var budgetId;
96         if   (typeof(f.budget_id ) != "undefined")  {
97             budgetId = f.budget_id.value
98         }
99
100         var newBudgetParent;
101
102 //  hack to test if selected parent_id in scrolling-list...
103 //  if value == 'undef' its got a selected_parent :/
104         if(f.budget_parent_id){
105             var chkAdd   =  f.budget_parent_id.value ;
106             if  (     typeof(chkAdd ) != "undefined") {
107                 newBudgetParent  =  f.budget_parent_id.value
108             } else {
109                 newBudgetParent  =  f.budget_parent_id.item(0).value
110             }
111
112             if   (budgetId  > 0)  {  ; //its a mod ...
113                 // if parent == curent-budget, fail...
114                 if ( newBudgetParent  ==  budgetId     ) {
115                         _alertString += _("- Budget parent is current budget") + "\n";
116                 }
117
118                 else if (newBudgetParent) {
119                     var result = checkBudgetParent(  budgetId , newBudgetParent   );
120                     if (result) {
121                         _alertString += result;
122                     }
123                 }
124             }
125         }
126
127          // else do lookup
128         var budgetTotal = Math.abs(f.budget_amount.value);
129         var result =   budgetExceedsParent  (budgetTotal, budgetId, newBudgetParent, f.budget_period_id.value)
130         if (result) {
131             _alertString += result;
132         }
133
134         if (_alertString.length==0) {
135             document.Aform.submit();
136         } else {
137             alertString2 = _("Form not submitted because of the following problem(s)");
138             alertString2 += "\n------------------------------------------------------------------------------------\n\n";
139             alertString2 += _alertString;
140             alert(alertString2);
141         }
142     }
143 //]]>
144 </script>
145 [% ELSIF op == 'list' %]
146     <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
147     [% INCLUDE 'datatables.inc' %]
148     <link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css" rel="stylesheet" type="text/css" />
149     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable.js"></script>
150
151 <script type="text/javascript">
152 //<![CDATA[
153     //
154     $(document).ready(function() {
155         var oTable = $("#budgeth").dataTable($.extend(true, {}, dataTablesDefaults, {
156             "fnDrawCallback": function ( oSettings ) {
157                 if ( oSettings.aiDisplay.length == 0 )
158                 {
159                     return;
160                 }
161
162                 var nTrs = $('#budgeth tbody tr');
163                 var iColspan = nTrs[1].getElementsByTagName('td').length;
164                 var sLastGroup = "";
165                 for ( var i=0 ; i<nTrs.length ; i++ )
166                 {
167                     var iDisplayIndex = oSettings._iDisplayStart + i;
168                     var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1];
169                     if ( sGroup != sLastGroup )
170                     {
171                         var nGroup = document.createElement( 'tr' );
172                         var nCell = document.createElement( 'td' );
173                         nCell.colSpan = iColspan;
174                         nCell.className = "group";
175                         nCell.innerHTML = sGroup;
176                         nGroup.appendChild( nCell );
177                         nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
178                         sLastGroup = sGroup;
179                     }
180                 }
181             },
182             "aoColumnDefs": [
183                 { "bVisible": false, "aTargets": [ 0, 1 ] }
184             ],
185             "aaSortingFixed": [[ 1, 'asc' ]],
186             "aaSorting": [[ 2, 'asc' ]],
187             'bSort': false,
188             'bPaginate': false,
189             "bAutoWidth": false
190         }));
191
192         $(oTable).treetable({
193             expandable: true
194         });
195         $(oTable).treetable('expandAll');
196         $("#expand_all").click(function(e){
197             e.preventDefault();
198             $(oTable).treetable('expandAll');
199         });
200         $("#collapse_all").click(function(e){
201             e.preventDefault();
202             $(oTable).treetable('collapseAll');
203         });
204
205         [% UNLESS budget_period_id %]
206           $("#hide_inactive").click(function(e){
207             e.preventDefault();
208             oTable.fnFilter( 1, 0 ); // Show only active=1
209           });
210           $("#show_inactive").click(function(e){
211             e.preventDefault();
212             oTable.fnFilter( '', 0 );
213           });
214           $("#hide_inactive").click();
215         [% END %]
216
217         $("#filterbutton").click(function() {
218             $("#fundfilters").slideToggle(0);
219         });
220     });
221 //]]>
222 </script>
223 [% END %]
224
225 </head>
226 <body id="admin_aqbudgets" class="admin">
227 [% INCLUDE 'header.inc' %]
228 [% INCLUDE 'budgets-admin-search.inc' %]
229
230 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
231     <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> &rsaquo; [% IF op == 'list' %][% IF budget_period_id %]Funds for '[% budget_period_description %]'[% ELSE %]All funds[% END %][% END %]
232     [% IF op == 'add_form' %]
233       <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">Funds</a> &rsaquo; [% IF ( budget_id ) %]Modify fund[% IF ( budget_name ) %] '[% budget_name %]'[% END %][% ELSE %]Add fund[% END %]
234     [% END %]
235     [% IF op == 'delete_confirm' %]
236       <a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a> &rsaquo; Delete fund?
237     [% END %]
238 </div>
239
240 <div id="doc3" class="yui-t2">
241 <div id="bd">
242 <div id="yui-main">
243 <div class="yui-b" id="content">
244
245
246 [% UNLESS op == 'delete_confirm' %][% INCLUDE 'budgets-admin-toolbar.inc' %][% END %]
247
248 [% IF (error_not_authorised_to_modify) %]
249     <div class="error">
250         <p>You are not authorized to modify this fund</p>
251     </div>
252 [% END %]
253
254 [% IF op == 'list' %]
255
256 <h1>
257   [% IF budget_period_id %]
258     Funds for '[% budget_period_description %]'
259   [% ELSE %]
260     All funds
261   [% END %]
262 </h1>
263
264 [% INCLUDE 'budgets-active-currency.inc' %]
265
266 [% IF budgets %]
267
268 <table id="budgeth">
269     [% UNLESS budget_period_id %]
270       <caption>
271         <span class="actions"><a href="#" id="expand_all">Expand all</a>
272         | <a href="#" id="collapse_all">Collapse all</a>
273         | <a href="#" id="hide_inactive">Hide inactive budgets</a>
274         | <a href="#" id="show_inactive">Show inactive budgets</a></span>
275       </caption>
276     [% END %]
277     <thead>
278         <tr>
279             <th>Active</th>
280             <th>Budget period description</th>
281             <th>Fund code</th>
282             <th>Fund name</th>
283             <th>Base-level allocated</th>
284             <th>Base-level ordered</th>
285             <th>Total ordered</th>
286             <th>Base-level spent</th>
287             <th>Total spent</th>
288             <th>Base-level available</th>
289             <th>Total available</th>
290             <th>Actions</th>
291         </tr>
292     </thead>
293     <tfoot>
294     <tr>
295     <th></th>
296     <th></th>
297     <th colspan="2" style="text-align: left;" nowrap="nowrap">Period allocated [% IF ( budget_period_total ) %][% budget_period_total %][% END %]  </th>
298     <th nowrap="nowrap" class="data"> [% period_alloc_total %]</th>
299     <th></th>
300     <th class="data">[% ordered_total %]</th>
301     <th></th>
302     <th class="data">[% spent_total %]</th>
303     <th></th>
304     <th class="data">[% available_total %]</th>
305     <th></th>
306     </tr>
307     </tfoot>
308     <tbody>
309     [% FOREACH budget IN budgets %]
310     [% IF budget.budget_parent_id %]
311       <tr data-tt-id="[% budget.budget_id %]" data-tt-parent-id="[% budget.budget_parent_id %]">
312     [% ELSE %]
313       <tr data-tt-id="[% budget.budget_id %]">
314     [% END %]
315     <td>[% budget.budget_period_active %]</td>
316     <td>Budget [% budget.budget_period_description %]</td>
317     <td>[% budget.budget_code_indent %]</td>
318     <td>[% budget.budget_name %]</td>
319     <td class="data">
320       [% IF budget.budget_parent_id %]
321         <span class="child_fund_amount">[% budget.budget_amount %]</span>
322       [% ELSE %]
323         [% budget.budget_amount %]
324       [% END %]
325     </td>
326     <td class="data">
327       [% IF budget.budget_parent_id %]
328         <span class="child_fund_amount">[% budget.budget_ordered %]</span>
329       [% ELSE %]
330         [% budget.budget_ordered %]
331       [% END %]
332     </td>
333     <td class="data">
334       [% IF budget.budget_parent_id %]
335         <span class="child_fund_amount">[% budget.total_ordered %]</span>
336       [% ELSE %]
337         [% budget.total_ordered %]
338       [% END %]
339     </td>
340     <td class="data">
341       [% IF budget.budget_parent_id %]
342         <span class="child_fund_amount">[% budget.budget_spent %]</span>
343       [% ELSE %]
344         [% budget.budget_spent %]
345       [% END %]
346     </td>
347     <td class="data">
348       [% IF budget.budget_parent_id %]
349         <span class="child_fund_amount">[% budget.total_spent %]</span>
350       [% ELSE %]
351         [% budget.total_spent %]
352       [% END %]
353     </td>
354
355
356     [% BLOCK colorcellvalue %]
357         [% IF parent %]
358             [% IF (value > 0) %]
359                 <span class="child_fund_amount" style="color: green;">
360             [% ELSIF (value < 0) %]
361                 <span class="child_fund_amount" style="color: red;">
362             [% ELSE %]
363                 <span class="child_fund_amount">
364             [% END %]
365          [% ELSE %]
366             [% IF (value > 0) %]
367                 <span style="color: green;">
368             [% ELSIF (value < 0) %]
369                 <span style="color: red;">
370             [% ELSE %]
371                 <span>
372             [% END %]
373         [% END %]
374             [% text %]
375         </span>
376     [% END %]
377     <td class="data">
378         [% INCLUDE colorcellvalue value=budget.budget_remaining text=budget.budget_remaining_display parent=budget.budget_parent_id %]
379     </td>
380     <td class="data">
381         [% INCLUDE colorcellvalue value=budget.total_remaining text=budget.total_remaining_display parent=budget.budget_parent_id %]
382     </td>
383     [% IF ( budget.budget_lock ) %]
384         <td> <span style="color: gray;"> Edit Delete </span> </td>
385     [% ELSE %]
386         <td>
387             <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_id=[% budget.budget_id %]&amp;budget_period_id=[% budget.budget_period_id %]" >Edit</a>
388             <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=delete_confirm&amp;budget_id=[% budget.budget_id %]&amp;budget_period_id=[% budget.budget_period_id %]">Delete</a>
389             <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_parent_id=[% budget.budget_id %]&amp;budget_period_id=[% budget.budget_period_id %]">Add child fund</a>
390         </td>
391     [% END %]
392     </tr>
393     [% END %]
394     </tbody>
395 </table>
396
397 [% ELSE %]
398     No fund found
399 [% END %]
400
401 [% END %] <!-- list -->
402
403 <!-- ********************************************************************************************** -->
404 <!-- create add/mod entry form -->
405 [% IF op == 'add_form' && !error_not_authorised_to_modify %]
406 <form action="/cgi-bin/koha/admin/aqbudgets.pl" name="Aform" method="post">
407     <fieldset class="rows">
408     <legend>[% IF ( budget_id ) %]Modify[% ELSE %]Add[% END %] Fund
409     [% IF ( budget_period_description ) %]
410         [% budget_name %] for Budget '[% budget_period_description %]'
411     [% END %]
412     </legend>
413
414     <input type="hidden" name="op" value="add_validate" />
415     <input type="hidden" name="checked" value="0" />
416     <ol>
417     [% IF ( budget_parent_id ) %]
418     <li>
419         <span class="label">Fund parent: </span>
420         [% budget_parent_name %]
421         [% budget_parent_id %] - [% budget_parent_name %]
422         <input type="hidden" name="budget_parent_id" value="[% budget_parent_id %]" />
423     </li>
424     [% END %]
425     <li>
426     <label class="required"  for="budget_code">Fund code: </label>
427     <input type="text" name="budget_code" id="budget_code" value="[% budget_code %]" size="30" />
428     </li>
429
430     <li>
431     <label class="required" for="budget_name">Fund name: </label>
432     <input type="text" name="budget_name" id="budget_name" value="[% budget_name %]" size="60" />
433     </li>
434
435     <li>
436     <label style="white-space: nowrap;" for="budget_amount" class="required">Amount: </label>
437     <input type="text" name="budget_amount" id="budget_amount" value="[% budget_amount %]" size="8" />
438     </li>
439
440     <li>
441       <label for="budget_encumb">Warning at (%): </label>
442       <input type="text" name="budget_encumb" id="budget_encumb" value="[% budget_encumb %]" size="10" />
443       <span style="color:grey">0 to disable</span>
444     </li>
445
446     <li>
447       <label for="budget_expend">Warning at (amount): </label>
448       <input type="text" name="budget_expend" id="budget_expend" value="[% budget_expend %]" size="10" /><input type="hidden" name="budget_owner_id" id="budget_owner_id" value="[% budget_owner_id %]" />
449       <span style="color:grey">0 to disable</span>
450     </li>
451
452     <li>
453         <span class="label">Owner: </span>
454         <span  id="budget_owner_name">
455         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% budget_owner_id %]">
456             [% budget_owner_name %]
457         </a>
458         </span>
459         <input type="hidden" name="budget_owner_id" id="budget_owner_id"
460             value="[% budget_owner_id %]" />
461
462         <!-- FIXME: hardcoded button positions :/ -->
463         <input type="button" id="edit_owner" value="Edit owner"
464             onclick="ownerPopup(); return false;" />
465         <input type="button" id="remove_owner" value="Remove owner"
466             onclick="ownerRemove(); return false;" />
467     </li>
468
469     <li>
470         <span class="label">Users:</span>
471         <ul style="float:left;" id="budget_users">
472             [% FOREACH user IN budget_users %]
473                 <li id="user_[% user.borrowernumber %]">
474                     <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% user.borrowernumber %]">
475                         [% user.firstname %] [% user.surname %]
476                     </a>
477                     [<a style="cursor:pointer"
478                     onclick="del_user([% user.borrowernumber %])">Remove</a>]
479                 </li>
480             [% END %]
481             <li id="add_user_button">
482                 <input type="button" onclick="userPopup()" value="Add users" />
483             </li>
484         </ul>
485         <input type="hidden" name="budget_users_ids" id="budget_users_id" value="[% budget_users_ids %]" />
486     <li>
487     <label for="budget_branchcode">Library: </label>
488     <select name="budget_branchcode" id="budget_branchcode">
489     <option value=""></option>
490     [% FOREACH branchloop_selec IN branchloop_select %]
491         [% UNLESS ( branchloop_selec.selected ) %] <option value="[% branchloop_selec.value %]" > [% ELSE %] <option value="[% branchloop_selec.value %]" selected="selected"> [% END %] [% branchloop_selec.value %]-[% branchloop_selec.branchname %]</option>
492     [% END %]
493     </select>
494     </li>
495
496     <li>
497     <label for="budget_permission">Restrict access to: </label>
498     <select name="budget_permission" id="budget_permission">
499         [% IF ( budget_perm_0 ) %]
500             <option value="0" selected="selected">
501         [% ELSE %]
502             <option value="0">
503         [% END %]
504             None
505         </option>
506
507         [% IF ( budget_perm_1 ) %]
508             <option value="1" selected="selected">
509         [% ELSE %]
510             <option value="1">
511         [% END %]
512             Owner
513         </option>
514
515         [% IF ( budget_perm_3) %]
516             <option value="3" selected="selected">
517         [% ELSE %]
518             <option value="3">
519         [% END %]
520             Owner and users
521         </option>
522
523         [% IF ( budget_perm_2 ) %]
524             <option value="2" selected="selected">
525         [% ELSE %]
526             <option value="2">
527         [% END %]
528             Owner, users and library
529         </option>
530     </select>
531     </li>
532
533     <li>
534     <label for="budget_notes">Notes: </label>
535     <textarea name="budget_notes" id="budget_notes"  cols="80" rows="6">[% budget_notes %]</textarea>
536     </li>
537
538     <li>
539     <label  style="white-space: nowrap;" for="authorised_value_category1">Statistic 1 done on: </label>
540         <select name="sort1_authcat" id="authorised_value_category1">
541             <option value=""></option>
542             [% FOREACH authorised_value_categories IN authorised_value_categories1 %]
543                 [% IF ( authorised_value_categories.selected ) %]
544                     <option value="[% authorised_value_categories.category %]" selected="selected">
545                         [% authorised_value_categories.category %]
546                     </option>
547                 [% ELSE %]
548                     <option value="[% authorised_value_categories.category %]">
549                         [% authorised_value_categories.category %]
550                     </option>
551                 [% END %]
552             [% END %]
553         </select>
554     </li>
555     <li>
556     <label  style="white-space: nowrap;" for="authorised_value_category2">Statistic 2 done on: </label>
557         <select name="sort2_authcat" id="authorised_value_category2">
558             <option value=""></option>
559             [% FOREACH authorised_value_categories IN authorised_value_categories2 %]
560                 [% IF ( authorised_value_categories.selected ) %]
561                     <option value="[% authorised_value_categories.category %]" selected="selected">
562                         [% authorised_value_categories.category %]
563                     </option>
564                 [% ELSE %]
565                     <option value="[% authorised_value_categories.category %]">
566                         [% authorised_value_categories.category %]
567                     </option>
568                 [% END %]
569             [% END %]
570         </select>
571     </li>
572     </ol>
573
574     [% IF ( budget_id ) %]
575         <input type="hidden" name="budget_id" value="[% budget_id %]" />
576     [% END %]
577     </fieldset>
578
579     <fieldset class="action">
580         <input type="submit" value="Submit" onclick="Check(this.form); return false;" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudgets.pl">Cancel</a>
581         <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
582     </fieldset>
583 </form>
584
585 [% END %] <!-- add_form -->
586
587 [% IF op == 'delete_confirm' %]
588 <div class="dialog alert"> <h3>Delete fund [% budget_name %]?</h3>
589 <table>
590     <tr>
591     <th scope="row">Fund amount:</th>
592     <td>[% budget_amount %]</td>
593     </tr>
594 </table>
595
596 <form action="/cgi-bin/koha/admin/aqbudgets.pl" method="post">
597     <input type="hidden" name="op" value="delete_confirmed" />
598     <input type="hidden" name="budget_id" value="[% budget_id %]" />
599     <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
600     <input type="submit" value="Delete" class="approve" />
601 </form>
602
603 <form action="/cgi-bin/koha/admin/aqbudgets.pl" method="get">
604     <input type="submit" class="deny" value="Cancel" />
605 </form>
606 </div>
607 [% END %]
608
609 </div>
610 </div>
611 <div class="yui-b">
612 [% IF op == 'list' %]
613   <form action="/cgi-bin/koha/admin/aqbudgets.pl" method="get">
614     <a href="#" id="filterbutton">Filters</a>
615     <fieldset class="brief" id="fundfilters">
616     <h4>Fund filters</h4>
617         <ol>
618         <li>
619             <label for="filter_budgetbranch2">Library: </label>
620             <select name="filter_budgetbranch" id="filter_budgetbranch2" style="width:10em;">
621                 <option value=""></option>
622                 [% FOREACH branchloo IN branchloop %]
623                 [% UNLESS ( branchloo.selected ) %]<option value="[% branchloo.value %]">
624                 [% ELSE %]<option value="[% branchloo.value %]" selected="selected">[% END %]
625                 [% branchloo.branchname %]</option>
626                 [% END %]
627             </select>
628         </li>
629         <li class="radio">
630
631         <label for="show_mine">Show my funds only</label>
632             [% IF ( show_mine ) %]
633                 <input type="checkbox" id="show_mine"  name="show_mine" value="1" checked="checked" />
634             [% ELSE %]
635                 <input type="checkbox" id="show_mine"  name="show_mine" value="1" />
636         [% END %]
637         </li>
638
639         [% IF periods %]
640           <li>
641             <label for="periods">Budget:</label>
642             <select id="periods" name="budget_period_id">
643               <option value="">All budgets</option>
644               [% FOR period IN periods %]
645                 [% IF budget_period_id && period.budget_period_id == budget_period_id %]
646                   <option value="[% period.budget_period_id %]" selected="selected">[% period.budget_period_description %]</option>
647                 [% ELSE %]
648                   <option value="[% period.budget_period_id %]">[% period.budget_period_description %]</option>
649                 [% END %]
650               [% END %]
651             </select>
652           </li>
653         [% END %]
654         </ol>
655
656         <input type="hidden" name="op" value="list" />
657         <input type="submit" class="submit" name="filter" value="Go" />
658     </fieldset>
659 </form>[% END %]
660 [% INCLUDE 'acquisitions-menu.inc' %]
661 </div>
662 </div>
663 [% INCLUDE 'intranet-bottom.inc' %]