]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/acq/fund/list.tt2
LP#1287370: apply filter/offset persistence to the fund search page
[working/Evergreen.git] / Open-ILS / src / templates / acq / fund / list.tt2
1 [% WRAPPER 'base.tt2' %]
2 [% ctx.page_title = l('Funds') %]
3
4 <!-- load the page-specific JS -->
5 <script type="text/javascript">
6     function getFundName(rowIndex, item) {
7         if (!item) return null;
8         return {
9             "name": this.grid.store.getValue(item, "name"),
10             "id": this.grid.store.getValue(item, "id")
11         };
12     }
13
14     function formatName(value) {
15         if (!value) return ""; // XXX
16
17         var link = "<a href='/eg/acq/fund/view/" +
18             value.id + "'>" +
19             value.name + "</a>";
20
21         /* TODO: add another element here to which we can attach a tooltip
22            showing tags */
23         return link;
24     }
25
26     function createNewFund() {
27         /* Set the display constraints before drawing the edit dialog;
28            introduce Y2K and Y2K2C problem */
29         lfGrid.overrideWidgetArgs = {year: { dijitArgs: {constraints : {min: 2000, max: 2200, pattern : '####'}}}};
30         lfGrid.showCreateDialog();
31     }
32
33 </script>
34
35 <table style='width:100%;'>
36     <tr>
37         <!-- TODO CSS -->
38         <td style='text-align:left;font-size:130%;font-weight: bold;'>[% l('Funds') %]</td>
39         <td style='text-align:right;width:90%;'>
40
41             <button dojoType='dijit.form.Button' onClick='createNewFund()'>[% l('New Fund') %]</button>
42             <button dojoType='dijit.form.Button' onClick='lfGrid.deleteSelected()'>[% l('Delete Selected') %]</button>
43
44             <div dojoType="dijit.form.DropDownButton">
45                 <span>[% l('Fund Propagation &amp; Rollover') %]</span>
46                 <div dojoType="dijit.TooltipDialog" execute="performRollover(arguments[0]);">
47                     <table class='dijitTooltipTable' id='oils-acq-rollover-tooltip-table'>
48                         <tr>
49                             <td colspan='2'>
50                                 <div style='width:400px;'>
51                                 [% l('Propagation creates new funds for the subsequent fiscal year based on the ' _
52                                 'funds for the selected fiscal year.  Only funds with the propagate setting ' _
53                                 'enabled will be affected.  No money or encumbrances are altered ' _
54                                 'during this process.') %]
55                                 </div>
56                             </td>
57                         </tr>
58                         <tr>
59                             <td><label for="rollover">[% l('Perform Fiscal Year Close-out Operation: ') %]</label></td>
60                             <td>
61                                 <input dojoType="dijit.form.CheckBox" name="rollover"> </input>
62                             </td>
63                         </tr>
64                         <tr>
65                             <td colspan='2'>
66                                 <div style='width:400px;'>
67                                 [% l('The year end close out operation moves encumbrances from the selected fiscal ' _
68                                 'year to the analogous funds in the subsequent fiscal year and it deactivates ' _
69                                 'funds for the selected fiscal year.  Additionally, for all funds that have ' _
70                                 'the "Rollover" setting enabled, this process will move all unspent money to ' _
71                                 'the analogous fund in the subsequent fiscal year.') %]
72                                 </div>
73                             </td>
74                         </tr>
75                         <tr class="encumb_only hidden">
76                             <td><label for="encumb_only">[% l('Limit Fiscal Year Close-out Operation to Encumbrances: ') %]</label></td>
77                             <td>
78                                 <input dojoType="dijit.form.CheckBox" name="encumb_only"> </input>
79                             </td>
80                         </tr>
81                         <tr class="encumb_only hidden">
82                             <td colspan='2'>
83                                 <div style='width:400px;'>
84                                 [% l('This modifies the above described Close-out Operation, causing funds to be ' _
85                                 'transfered into the void (that is, entirely removed) instead of being transfered ' _
86                                 'to the analogous funds in the subsequent fiscal year.') %]
87                                 </div>
88                             </td>
89                         </tr>
90                         <tr>
91                             <td>[% l('Context Org Unit:') %]</td>
92                             <td><span id='oils-acq-rollover-ctxt-org'></span></td>
93                         </tr>
94                         <tr>
95                             <td>[% l('Include Funds for Descendant Org Units:') %]</td>
96                             <td><input dojoType=dijit.form.CheckBox name='child_orgs'/></td>
97                         </tr>
98                         <tr>
99                             <td><label for="dry_run">[% l('Dry Run: ') %]</label></td>
100                             <td>
101                                 <input dojoType="dijit.form.CheckBox" name="dry_run" checked='checked'> </input>
102                             </td>
103                         </tr>
104                         <tr>
105                             <td colspan='2'>
106                                 <div style='width:400px;'>
107                                 [% l('When Dry Run is selected, the system will generate a summary of ' _
108                                 'the changes that would occur during the selected operation(s). ' _
109                                 'No data will be changed.') %]
110                                 </div>
111                             </td>
112                         </tr>
113                         <tr>
114                             <td colspan='2' align='center'>
115                                 <button dojoType=dijit.form.Button type="submit">[% l('Process') %]</button>
116                             </td>
117                         </tr>
118                     </table>
119                 </div>
120             </div>
121         </td>
122     </tr>
123 </table>
124
125 <div class="oils-acq-basic-roomy">
126     <span>[% l('Context Org Unit') %]</span>
127     <select
128         dojoType="openils.widget.OrgUnitFilteringSelect"
129         jsId="contextOrgSelector"
130         searchAttr="shortname"
131         labelAttr="shortname">
132     </select>
133
134     <span>[% l('Year') %]</span>
135     <select dojoType="dijit.form.FilteringSelect"
136         jsId="fundFilterYearSelect"
137         labelAttr="year"
138         searchAttr="year">
139     </select>
140
141     <div dojoType='dijit.form.Button' jsId='refreshButton'>[% l('Refresh') %]</div>
142 </div>
143
144 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
145     <div id='acq-fund-list-rollover-summary-wrapper'>
146         <div id='acq-fund-list-rollover-summary' class='hidden'>
147             <div id='acq-fund-list-rollover-summary-header'> </div>
148             <ul>
149                 <li id='acq-fund-list-rollover-summary-dry-run'>[% l('These changes have [_1]not[_2] been committed yet.', '<span class="oils-notify-text">', '</span>') %]</li>
150                 <li id='acq-fund-list-rollover-summary-funds'></li>
151                 <li id='acq-fund-list-rollover-summary-rollover-amount'></li>
152             </ul>
153         </div>
154     </div>
155 </div>
156
157 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:80%'>
158     <table  jsId="lfGrid"
159             dojoType="openils.widget.AutoGrid"
160             fieldOrder="['id', 'name', 'code', 'year', 'org', 'currency_type', 'combined_balance']"
161             requiredFields="['name', 'code', 'year', 'org', 'currency_type']"
162             query="{id: '*'}"
163             fmClass='acqf'
164             showLoadFilter='true'
165             showPaginator='true'
166             urlNavigation='true'
167             editOnEnter='true'>
168         <thead>
169             <tr>
170                 <th field="name" get="getFundName" formatter="formatName"></th>
171                 <th field="combined_balance" name="Combined Balance" get="getBalanceInfo"></th>
172             </tr>
173         </thead>
174     </table>
175 </div>
176 <div dojoType="openils.widget.ProgressDialog" jsId="progressDialog"></div>
177 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funds.js'> </script>
178 [% END %]