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