Bug 11578: (follow-up) hide inactive budgets by default
[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         $("#hide_inactive").click(function(e){
206             e.preventDefault();
207             oTable.fnFilter( 0, 0 ); // Hide active=0
208         });
209         $("#show_inactive").click(function(e){
210             e.preventDefault();
211             oTable.fnFilter( '', 0 );
212         });
213
214         $("#filterbutton").click(function() {
215             $("#fundfilters").slideToggle(0);
216         });
217         $("#hide_inactive").click();
218     });
219 //]]>
220 </script>
221 [% END %]
222
223 </head>
224 <body id="admin_aqbudgets" class="admin">
225 [% INCLUDE 'header.inc' %]
226 [% INCLUDE 'budgets-admin-search.inc' %]
227
228 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
229     <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 %]
230     [% IF op == 'add_form' %]
231       <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 %]
232     [% END %]
233     [% IF op == 'delete_confirm' %]
234       <a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a> &rsaquo; Delete fund?
235     [% END %]
236 </div>
237
238 <div id="doc3" class="yui-t2">
239 <div id="bd">
240 <div id="yui-main">
241 <div class="yui-b" id="content">
242
243
244 [% UNLESS op == 'delete_confirm' %][% INCLUDE 'budgets-admin-toolbar.inc' %][% END %]
245
246 [% IF (error_not_authorised_to_modify) %]
247     <div class="error">
248         <p>You are not authorized to modify this fund</p>
249     </div>
250 [% END %]
251
252 [% IF op == 'list' %]
253
254 <h1>
255   [% IF budget_period_id %]
256     Funds for '[% budget_period_description %]'
257   [% ELSE %]
258     All funds
259   [% END %]
260 </h1>
261
262 [% INCLUDE 'budgets-active-currency.inc' %]
263
264 [% IF budgets %]
265
266 <table id="budgeth">
267     <caption>
268         <span class="actions"><a href="#" id="expand_all">Expand all</a>
269         | <a href="#" id="collapse_all">Collapse all</a>
270         | <a href="#" id="hide_inactive">Hide inactive budgets</a>
271         | <a href="#" id="show_inactive">Show inactive budgets</a></span>
272     </caption>
273     <thead>
274         <tr>
275             <th>Active</th>
276             <th>Budget period description</th>
277             <th>Fund code</th>
278             <th>Fund name</th>
279             <th>Base-level allocated</th>
280             <th>Base-level ordered</th>
281             <th>Total ordered</th>
282             <th>Base-level spent</th>
283             <th>Total spent</th>
284             <th>Base-level available</th>
285             <th>Total available</th>
286             <th>Actions</th>
287         </tr>
288     </thead>
289     <tfoot>
290     <tr>
291     <th></th>
292     <th></th>
293     <th colspan="2" style="text-align: left;" nowrap="nowrap">Period allocated [% IF ( budget_period_total ) %][% budget_period_total %][% END %]  </th>
294     <th nowrap="nowrap" class="data"> [% period_alloc_total %]</th>
295     <th></th>
296     <th class="data">[% ordered_total %]</th>
297     <th></th>
298     <th class="data">[% spent_total %]</th>
299     <th></th>
300     <th class="data">[% available_total %]</th>
301     <th></th>
302     </tr>
303     </tfoot>
304     <tbody>
305     [% FOREACH budget IN budgets %]
306     <tr data-tt-id="[% budget.budget_id %]" [% IF ( budget.budget_parent_id ) %]data-tt-parent-id="[% budget.budget_parent_id %]"[% END %]>
307     <td>[% budget.budget_period_active %]</td>
308     <td>Budget [% budget.budget_period_description %]</td>
309     <td>[% budget.budget_code_indent %]</td>
310     <td>[% budget.budget_name %]</td>
311     <td class="data">
312       [% IF budget.budget_parent_id %]
313         <span class="child_fund_amount">[% budget.budget_amount %]</span>
314       [% ELSE %]
315         [% budget.budget_amount %]
316       [% END %]
317     </td>
318     <td class="data">
319       [% IF budget.budget_parent_id %]
320         <span class="child_fund_amount">[% budget.budget_ordered %]</span>
321       [% ELSE %]
322         [% budget.budget_ordered %]
323       [% END %]
324     </td>
325     <td class="data">
326       [% IF budget.budget_parent_id %]
327         <span class="child_fund_amount">[% budget.total_ordered %]</span>
328       [% ELSE %]
329         [% budget.total_ordered %]
330       [% END %]
331     </td>
332     <td class="data">
333       [% IF budget.budget_parent_id %]
334         <span class="child_fund_amount">[% budget.budget_spent %]</span>
335       [% ELSE %]
336         [% budget.budget_spent %]
337       [% END %]
338     </td>
339     <td class="data">
340       [% IF budget.budget_parent_id %]
341         <span class="child_fund_amount">[% budget.total_spent %]</span>
342       [% ELSE %]
343         [% budget.total_spent %]
344       [% END %]
345     </td>
346
347
348     [% BLOCK colorcellvalue %]
349         [% IF parent %]
350             [% IF (value > 0) %]
351                 <span class="child_fund_amount" style="color: green;">
352             [% ELSIF (value < 0) %]
353                 <span class="child_fund_amount" style="color: red;">
354             [% ELSE %]
355                 <span class="child_fund_amount">
356             [% END %]
357          [% ELSE %]
358             [% IF (value > 0) %]
359                 <span style="color: green;">
360             [% ELSIF (value < 0) %]
361                 <span style="color: red;">
362             [% ELSE %]
363                 <span>
364             [% END %]
365         [% END %]
366             [% text %]
367         </span>
368     [% END %]
369     <td class="data">
370         [% INCLUDE colorcellvalue value=budget.budget_remaining text=budget.budget_remaining_display parent=budget.budget_parent_id %]
371     </td>
372     <td class="data">
373         [% INCLUDE colorcellvalue value=budget.total_remaining text=budget.total_remaining_display parent=budget.budget_parent_id %]
374     </td>
375     [% IF ( budget.budget_lock ) %]
376         <td> <span style="color: gray;"> Edit Delete </span> </td>
377     [% ELSE %]
378         <td>
379             <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>
380             <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>
381             <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>
382         </td>
383     [% END %]
384     </tr>
385     [% END %]
386     </tbody>
387 </table>
388
389 [% ELSE %]
390     No fund found
391 [% END %]
392
393 [% END %] <!-- list -->
394
395 <!-- ********************************************************************************************** -->
396 <!-- create add/mod entry form -->
397 [% IF op == 'add_form' && !error_not_authorised_to_modify %]
398 <form action="/cgi-bin/koha/admin/aqbudgets.pl" name="Aform" method="post">
399     <fieldset class="rows">
400     <legend>[% IF ( budget_id ) %]Modify[% ELSE %]Add[% END %] Fund
401     [% IF ( budget_period_description ) %]
402         [% budget_name %] for Budget '[% budget_period_description %]'
403     [% END %]
404     </legend>
405
406     <input type="hidden" name="op" value="add_validate" />
407     <input type="hidden" name="checked" value="0" />
408     <ol>
409     [% IF ( budget_parent_id ) %]
410     <li>
411         <span class="label">Fund parent: </span>
412         [% budget_parent_name %]
413         [% budget_parent_id %] - [% budget_parent_name %]
414         <input type="hidden" name="budget_parent_id" value="[% budget_parent_id %]" />
415     </li>
416     [% END %]
417     <li>
418     <label class="required"  for="budget_code">Fund code: </label>
419     <input type="text" name="budget_code" id="budget_code" value="[% budget_code %]" size="30" />
420     </li>
421
422     <li>
423     <label class="required" for="budget_name">Fund name: </label>
424     <input type="text" name="budget_name" id="budget_name" value="[% budget_name %]" size="60" />
425     </li>
426
427     <li>
428     <label style="white-space: nowrap;" for="budget_amount" class="required">Amount: </label>
429     <input type="text" name="budget_amount" id="budget_amount" value="[% budget_amount %]" size="8" />
430     </li>
431
432     <li>
433       <label for="budget_encumb">Warning at (%): </label>
434       <input type="text" name="budget_encumb" id="budget_encumb" value="[% budget_encumb %]" size="10" />
435       <span style="color:grey">0 to disable</span>
436     </li>
437
438     <li>
439       <label for="budget_expend">Warning at (amount): </label>
440       <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 %]" />
441       <span style="color:grey">0 to disable</span>
442     </li>
443
444     <li>
445         <span class="label">Owner: </span>
446         <span  id="budget_owner_name">
447         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% budget_owner_id %]">
448             [% budget_owner_name %]
449         </a>
450         </span>
451         <input type="hidden" name="budget_owner_id" id="budget_owner_id"
452             value="[% budget_owner_id %]" />
453
454         <!-- FIXME: hardcoded button positions :/ -->
455         <input type="button" id="edit_owner" value="Edit owner"
456             onclick="ownerPopup(); return false;" />
457         <input type="button" id="remove_owner" value="Remove owner"
458             onclick="ownerRemove(); return false;" />
459     </li>
460
461     <li>
462         <span class="label">Users:</span>
463         <ul style="float:left;" id="budget_users">
464             [% FOREACH user IN budget_users %]
465                 <li id="user_[% user.borrowernumber %]">
466                     <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% user.borrowernumber %]">
467                         [% user.firstname %] [% user.surname %]
468                     </a>
469                     [<a style="cursor:pointer"
470                     onclick="del_user([% user.borrowernumber %])">Remove</a>]
471                 </li>
472             [% END %]
473             <li id="add_user_button">
474                 <input type="button" onclick="userPopup()" value="Add users" />
475             </li>
476         </ul>
477         <input type="hidden" name="budget_users_ids" id="budget_users_id" value="[% budget_users_ids %]" />
478     <li>
479     <label for="budget_branchcode">Library: </label>
480     <select name="budget_branchcode" id="budget_branchcode">
481     <option value=""></option>
482     [% FOREACH branchloop_selec IN branchloop_select %]
483         [% 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>
484     [% END %]
485     </select>
486     </li>
487
488     <li>
489     <label for="budget_permission">Restrict access to: </label>
490     <select name="budget_permission" id="budget_permission">
491         [% IF ( budget_perm_0 ) %]
492             <option value="0" selected="selected">
493         [% ELSE %]
494             <option value="0">
495         [% END %]
496             None
497         </option>
498
499         [% IF ( budget_perm_1 ) %]
500             <option value="1" selected="selected">
501         [% ELSE %]
502             <option value="1">
503         [% END %]
504             Owner
505         </option>
506
507         [% IF ( budget_perm_3) %]
508             <option value="3" selected="selected">
509         [% ELSE %]
510             <option value="3">
511         [% END %]
512             Owner and users
513         </option>
514
515         [% IF ( budget_perm_2 ) %]
516             <option value="2" selected="selected">
517         [% ELSE %]
518             <option value="2">
519         [% END %]
520             Owner, users and library
521         </option>
522     </select>
523     </li>
524
525     <li>
526     <label for="budget_notes">Notes: </label>
527     <textarea name="budget_notes" id="budget_notes"  cols="80" rows="6">[% budget_notes %]</textarea>
528     </li>
529
530     <li>
531     <label  style="white-space: nowrap;" for="authorised_value_category1">Statistic 1 done on: </label>
532         <select name="sort1_authcat" id="authorised_value_category1">
533             <option value=""></option>
534             [% FOREACH authorised_value_categories IN authorised_value_categories1 %]
535                 [% IF ( authorised_value_categories.selected ) %]
536                     <option value="[% authorised_value_categories.category %]" selected="selected">
537                         [% authorised_value_categories.category %]
538                     </option>
539                 [% ELSE %]
540                     <option value="[% authorised_value_categories.category %]">
541                         [% authorised_value_categories.category %]
542                     </option>
543                 [% END %]
544             [% END %]
545         </select>
546     </li>
547     <li>
548     <label  style="white-space: nowrap;" for="authorised_value_category2">Statistic 2 done on: </label>
549         <select name="sort2_authcat" id="authorised_value_category2">
550             <option value=""></option>
551             [% FOREACH authorised_value_categories IN authorised_value_categories2 %]
552                 [% IF ( authorised_value_categories.selected ) %]
553                     <option value="[% authorised_value_categories.category %]" selected="selected">
554                         [% authorised_value_categories.category %]
555                     </option>
556                 [% ELSE %]
557                     <option value="[% authorised_value_categories.category %]">
558                         [% authorised_value_categories.category %]
559                     </option>
560                 [% END %]
561             [% END %]
562         </select>
563     </li>
564     </ol>
565
566     [% IF ( budget_id ) %]
567         <input type="hidden" name="budget_id" value="[% budget_id %]" />
568     [% END %]
569     </fieldset>
570
571     <fieldset class="action">
572         <input type="submit" value="Submit" onclick="Check(this.form); return false;" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudgets.pl">Cancel</a>
573         <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
574     </fieldset>
575 </form>
576
577 [% END %] <!-- add_form -->
578
579 [% IF op == 'delete_confirm' %]
580 <div class="dialog alert"> <h3>Delete fund [% budget_name %]?</h3>
581 <table>
582     <tr>
583     <th scope="row">Fund amount:</th>
584     <td>[% budget_amount %]</td>
585     </tr>
586 </table>
587
588 <form action="/cgi-bin/koha/admin/aqbudgets.pl" method="post">
589     <input type="hidden" name="op" value="delete_confirmed" />
590     <input type="hidden" name="budget_id" value="[% budget_id %]" />
591     <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
592     <input type="submit" value="Delete" class="approve" />
593 </form>
594
595 <form action="/cgi-bin/koha/admin/aqbudgets.pl" method="get">
596     <input type="submit" class="deny" value="Cancel" />
597 </form>
598 </div>
599 [% END %]
600
601 </div>
602 </div>
603 <div class="yui-b">
604 [% IF op == 'list' %]
605   <form action="/cgi-bin/koha/admin/aqbudgets.pl" method="get">
606     <a href="#" id="filterbutton">Filters</a>
607     <fieldset class="brief" id="fundfilters">
608     <h4>Fund filters</h4>
609         <ol>
610         <li>
611             <label for="filter_budgetbranch2">Library: </label>
612             <select name="filter_budgetbranch" id="filter_budgetbranch2" style="width:10em;">
613                 <option value=""></option>
614                 [% FOREACH branchloo IN branchloop %]
615                 [% UNLESS ( branchloo.selected ) %]<option value="[% branchloo.value %]">
616                 [% ELSE %]<option value="[% branchloo.value %]" selected="selected">[% END %]
617                 [% branchloo.branchname %]</option>
618                 [% END %]
619             </select>
620         </li>
621         <li class="radio">
622
623         <label for="show_mine">Show my funds only</label>
624             [% IF ( show_mine ) %]
625                 <input type="checkbox" id="show_mine"  name="show_mine" value="1" checked="checked" />
626             [% ELSE %]
627                 <input type="checkbox" id="show_mine"  name="show_mine" value="1" />
628         [% END %]
629         </li>
630
631         [% IF periods %]
632           <li>
633             <label for="periods">Budget:</label>
634             <select id="periods" name="budget_period_id">
635               <option value="">All budgets</option>
636               [% FOR period IN periods %]
637                 [% IF budget_period_id && period.budget_period_id == budget_period_id %]
638                   <option value="[% period.budget_period_id %]" selected="selected">[% period.budget_period_description %]</option>
639                 [% ELSE %]
640                   <option value="[% period.budget_period_id %]">[% period.budget_period_description %]</option>
641                 [% END %]
642               [% END %]
643             </select>
644           </li>
645         [% END %]
646         </ol>
647
648         <input type="hidden" name="op" value="list" />
649         <input type="submit" class="submit" name="filter" value="Go" />
650     </fieldset>
651 </form>[% END %]
652 [% INCLUDE 'acquisitions-menu.inc' %]
653 </div>
654 </div>
655 [% INCLUDE 'intranet-bottom.inc' %]