]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/acq/financial/list_funds.tt2
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
[working/Evergreen.git] / Open-ILS / src / templates / acq / financial / list_funds.tt2
1 [% WRAPPER 'base.tt2' %]
2 [% ctx.page_title = '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/financial/view_fund/" +
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;'>Funds</td>
39         <td style='text-align:right;width:90%;'>
40
41             <button dojoType='dijit.form.Button' onClick='createNewFund()'>New Fund</button>
42             <button dojoType='dijit.form.Button' onClick='lfGrid.deleteSelected()'>Delete Selected</button>
43
44             <div dojoType="dijit.form.DropDownButton">
45                 <span>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                                 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">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                                 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>
76                             <td>Context Org Unit:</td>
77                             <td><span id='oils-acq-rollover-ctxt-org'></span></td>
78                         </tr>
79                         <tr>
80                             <td>Include Funds for Descendant Org Units:</td>
81                             <td><input dojoType=dijit.form.CheckBox name='child_orgs'/></td>
82                         </tr>
83                         <tr>
84                             <td><label for="dry_run">Dry Run: </label></td>
85                             <td>
86                                 <input dojoType="dijit.form.CheckBox" name="dry_run" checked='checked'> </input>
87                             </td>
88                         </tr>
89                         <tr>
90                             <td colspan='2'>
91                                 <div style='width:400px;'>
92                                 When Dry Run is selected, the system will generate a summary of
93                                 the changes that would occur during the selected operation(s).
94                                 No data will be changed.
95                                 </div>
96                             </td>
97                         </tr>
98                         <tr>
99                             <td colspan='2' align='center'>
100                                 <button dojoType=dijit.form.Button type="submit">Process</button>
101                             </td>
102                         </tr>
103                     </table>
104                 </div>
105             </div>
106         </td>
107     </tr>
108 </table>
109
110 <div class="oils-acq-basic-roomy">
111     <span>Context Org Unit</span>
112     <select
113         dojoType="openils.widget.OrgUnitFilteringSelect"
114         jsId="contextOrgSelector"
115         searchAttr="shortname"
116         labelAttr="shortname">
117     </select>
118
119     <span>Year</span>
120     <select dojoType="dijit.form.FilteringSelect"
121         jsId="fundFilterYearSelect"
122         labelAttr="year"
123         searchAttr="year">
124     </select>
125
126     <div dojoType='dijit.form.Button' jsId='refreshButton'>Refresh</div>
127 </div>
128
129 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
130     <div id='acq-fund-list-rollover-summary-wrapper'>
131         <div id='acq-fund-list-rollover-summary' class='hidden'>
132             <div id='acq-fund-list-rollover-summary-header'> </div>
133             <ul>
134                 <li id='acq-fund-list-rollover-summary-dry-run'>These changes have <span class='oils-notify-text'>not</span> been committed yet.</li>
135                 <li id='acq-fund-list-rollover-summary-funds'></li>
136                 <li id='acq-fund-list-rollover-summary-rollover-amount'></li>
137             </ul>
138         </div>
139     </div>
140 </div>
141
142 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
143     <table  jsId="lfGrid"
144             dojoType="openils.widget.AutoGrid"
145             fieldOrder="['id', 'name', 'code', 'year', 'org', 'currency_type', 'combined_balance']"
146             requiredFields="['name', 'code', 'year', 'org', 'currency_type']"
147             query="{id: '*'}"
148             defaultCellWidth='"auto"'
149             fmClass='acqf'
150             showPaginator='true'
151             editOnEnter='true'>
152         <thead>
153             <tr>
154                 <th field="name" get="getFundName" formatter="formatName"></th>
155                 <th field="combined_balance" name="Combined Balance" get="getBalanceInfo"></th>
156             </tr>
157         </thead>
158     </table>
159 </div>
160 <div dojoType="openils.widget.ProgressDialog" jsId="progressDialog"></div>
161 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funds.js'> </script>
162 [% END %]