]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2
start of single label + action bar to sit above the grid
[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
25 <style>
26
27 .oils-header-panel {
28     width:99%;
29     margin-top:20px;
30 }
31 .oils-header-panel div:first-child {
32     width:48%;
33     text-align:left;
34     float:left;
35     font-size:130%;
36     font-weight: bold;
37     vertical-align:bottom;
38     position:relative;
39     bottom:0px;
40     left:5px;
41 }
42 .oils-header-panel div:last-child {
43     width:48%;
44     text-align:right;
45     float:right;
46     vertical-align:bottom;
47     position:relative;
48     bottom:0px;
49     right:5px;
50 }
51 </style>
52
53 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
54     <div>Exchange Rates</div>
55     <div><button dojoType='dijit.form.Button' onClick='erGrid.showCreateDialog()'>New</button></div>
56 </div>
57
58 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
59     <table jsId="erGrid" dojoType="openils.widget.AutoGrid" 
60             fieldOrder="['id', 'from_currency', 'to_currency', 'ratio']" 
61             query="{id: '*'}" rowSelector='20px' fmClass='acqexr' editOnEnter='true'>
62     </table>
63 </div>
64 [% END %]
65
66