]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/acq/funding_source/view.tt2
LP1873286: Fix Bad End Tags
[Evergreen.git] / Open-ILS / src / templates / acq / funding_source / view.tt2
1 [% WRAPPER 'base.tt2' %]
2 <script type="text/javascript"> var fundingSourceID = [% ctx.page_args.0 %]; </script>
3
4 <div id='oils-acq-list-header' class='container'>
5     <div id='oils-acq-list-header-label'>[% l('Funding Source Details') %]</div>
6 </div>
7
8 <div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
9
10     <!-- Dropdown menu for creating a new funding source credit -->
11     <div dojoType="dijit.form.DropDownButton">
12         <span>[% l('Apply Credit') %]</span>
13         <div dojoType="dijit.TooltipDialog" execute="applyFSCredit(arguments[0]);">
14             <table class='dijitTooltipTable'>
15                 <tr>
16                     <td><label for="amount">[% l('Amount: ') %]</label></td>
17                     <td>
18                         <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
19                     </td>
20                 </tr>
21                 <tr>
22                     <td><label for="note">[% l('Note: ') %]</label></td>
23                     <td>
24                         <input dojoType="dijit.form.TextBox" name="note"> </input>
25                     </td>
26                 </tr>
27                 <tr>
28                     <td colspan='2' align='center'>
29                         <button dojoType=dijit.form.Button type="submit">[% l('Apply') %]</button>
30                     </td>
31                 </tr>
32             </table>
33         </div>
34     </div> 
35     <div dojoType="dijit.form.DropDownButton">
36         <span>[% l('Allocate to Fund') %]</span>
37         <div dojoType="dijit.TooltipDialog" execute="applyFSAllocation(arguments[0]);">
38             <table class='dijitTooltipTable'>
39                 <tr>
40                     <td><label for="fund">[% l('Fund: ') %]</label></td>
41                     <td>
42                         <div id="oils-acq-funding-source-fund-allocate"></div>
43                     </td>
44                 </tr>
45                 <tr>
46                     <td><label for="amount">[% l('Amount: ') %]</label></td>
47                     <td>
48                         <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
49                     </td>
50                 </tr>
51                 <!-- Percent-based allocations are not supported.  Will implement or remove later.
52                 <tr>
53                     <td><label for="percent">[% l('Percent: ') %]</label></td>
54                     <td>
55                         <input 
56                             dojoType="dijit.form.NumberTextBox" 
57                             constraints="{min:0,max:100}" 
58                             promptMessage="[% l('Please enter an amount between 0 and 100') %]"
59                             name="percent"> 
60                         </input>
61                     </td>
62                 </tr>
63                 -->
64                 <tr>
65                     <td><label for="note">[% l('Note: ') %]</label></td>
66                     <td>
67                         <input dojoType="dijit.form.TextBox" name="note"> </input>
68                     </td>
69                 </tr>
70                 <tr>
71                     <td colspan='2' align='center'>
72                         <button dojoType=dijit.form.Button type="submit">[% l('Apply') %]</button>
73                     </td>
74                 </tr>
75             </table>
76         </div>
77     </div> 
78 </div>
79
80 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
81     <div dojoType="dijit.layout.TabContainer">
82
83         <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="[% l('Summary') %]" selected='true'>
84             <script type='dojo/connect' event='onShow'>loadFSGrid();</script>
85
86             <div dojoType="dijit.layout.ContentPane" layoutAlign="top"> 
87                 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'> 
88                     <table jsId="fundingSourceGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'> 
89                         <thead> 
90                             <tr> 
91                                 <th field="id">[% l('ID') %]</th> 
92                                 <th field="name" width='auto'>[% l('Name') %]</th> 
93                                 <th field="code">[% l('Code') %]</th> 
94                                 <th field="balance" get='getSummaryInfo'>[% l('Balance') %]</th>
95                                 <th field="credit_total" get='getSummaryInfo'>[% l('Total Credits') %]</th>
96                                 <th field="allocation_total" get='getSummaryInfo'>[% l('Total Debits') %]</th>
97                                 <th field="currency_type">[% l('Currency Type') %]</th> 
98                                 <th field="owner" width='auto' get='getOrgInfo'>[% l('Owner') %]</th>
99                             </tr> 
100                         </thead> 
101                     </table>     
102                 </div> 
103             </div>               
104         </div>
105  
106         <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="[% l('Credits') %]">
107             <script type='dojo/connect' event='onShow'>loadCreditGrid(); </script> 
108
109             <div dojoType="dijit.layout.ContentPane" layoutAlign="top"> 
110                 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
111
112                     <table 
113                         jsId="fsCreditGrid"
114                         autoheight="true"
115                         dojoType="openils.widget.AutoGrid"
116                         fieldOrder="['amount', 'effective_date', 'deadline_date', 'note']"
117                         suppressFields="['id', 'funding_source']"
118                         defaultCellWidth='"auto"'
119                         fmClass="acqfscred"
120                         query="{id: '*'}"
121                         showPaginator='true'>
122                     </table>
123                 </div> 
124             </div> 
125         </div>
126
127         <!-- Fund Allocations -->
128         <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="[% l('Allocations') %]">
129             <script type='dojo/connect' event='onShow'>loadAllocationGrid();</script>
130             
131             <div dojoType="dijit.layout.ContentPane" layoutAlign="top"> 
132                 <div dojoType="dijit.layout.ContentPane" layoutAlign="client"> 
133
134                     <table 
135                         jsId="fsAllocationGrid" 
136                         autoHeight='true'
137                         dojoType="openils.widget.AutoGrid"
138                         fieldOrder="['fund', 'amount', 'create_time', 'allocator', 'note']"
139                         suppressFields="['id', 'funding_source']"
140                         defaultCellWidth='"auto"'
141                         fmClass="acqfa"
142                         query="{id: '*'}"
143                         showPaginator='true'>
144
145                         <thead>
146                             <tr>
147                                 <th field='fund' get='getFund' formatter='formatFund'></th>
148                             </tr>
149                         </thead>
150                     </table>
151                 </div> 
152             </div> 
153         </div>
154
155     </div>
156 </div>
157
158 <!-- load the page-specific JS -->
159 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_funding_source.js'> </script>
160
161 [% END %]
162