]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2
bbf1c0a56f0a6ba3f33fee682e88fe1750ee951a
[working/Evergreen.git] / Open-ILS / web / templates / default / conify / global / acq / exchange_rate.tt2
1 [% WRAPPER default/base.tt2 %]
2 <!--
3 <script src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/billing_type.js'> </script>
4 -->
5
6 <script>
7     dojo.require('openils.widget.AutoGrid');
8     dojo.require('openils.PermaCrud');
9     dojo.require('openils.Util');
10     function renderGrid() {
11         var pcrud = new openils.PermaCrud();
12         pcrud.retrieveAll('acqexr', 
13             {   async : true,
14                 streaming : true,
15                 onresponse : function(r) {
16                     var item = openils.Util.readResponse(r);
17                     erGrid.store.newItem(item.toStoreItem());
18                }     
19             }
20         );
21     }
22     openils.Util.addOnLoad(renderGrid);
23 </script>
24 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
25     <div>Exchange Rates</div>
26     <div><button dojoType='dijit.form.Button' onClick='erGrid.showCreateDialog()'>New</button></div>
27 </div>
28
29 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
30     <table jsId="erGrid" dojoType="openils.widget.AutoGrid" 
31             fieldOrder="['id', 'from_currency', 'to_currency', 'ratio']" defaultCellWidth='12'
32             query="{id: '*'}" rowSelector='20px' fmClass='acqexr' editOnEnter='true'>
33     </table>
34 </div>
35 [% END %]
36
37