css fixes remove the need for a padding div after grids to prevent horizontal scroll
[working/Evergreen.git] / Open-ILS / web / templates / default / conify / global / acq / provider.tt2
1 [% WRAPPER default/base.tt2 %]
2 <script src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/provider.js'> </script>
3
4 <script type="text/javascript"> 
5     var providerId = '[% ctx.page_args.0 %]';
6
7
8
9 function formatName(inDatum) {
10     switch (inDatum) {
11     case 'owning_lib':
12         return 'Owning Library';
13     case 'quantity':
14         return 'Quantity';
15     case 'call_number':
16         return 'Call Number';
17     case 'fund_code':
18         return 'Fund Code';
19     case 'local_note':
20         return 'Local Note';
21     case 'price':
22         return 'Price';
23     case 'circ_modifier':
24         return 'Circulation Modifier';
25     case 'copy_location':
26         return 'Copy Location';
27     case 'collection_code':
28         return 'Collection Code';
29     }
30 }
31
32 function getProviderName(rowIndex, item) {
33     if(!item) return '';
34     var name = this.grid.store.getValue(item, 'name');
35     var id = this.grid.store.getValue(item, 'id');
36     return id + ':' + name;
37 }
38
39 function formatName(value) {
40     if(value) {
41         var vals = value.split(/:/);
42         return '<a href="[% ctx.base_path %]/conify/global/acq/provider/'+vals[0]+'">'+vals[1]+'</a>';
43     }
44 }
45
46
47
48
49 </script>
50
51
52 <div class="hidden">
53     <select dojoType="dijit.form.FilteringSelect" jsId="nameSelect">
54         <option value='owning_lib'>Owning Library</option>
55         <option value='quantity'>Quantity</option>
56         <option value='call_number'>Call Number</option>
57         <option value='fund_code'>Fund Code</option>
58         <option value='local_note'>Local Note</option>
59         <option value='price'>Price</option>
60         <option value='circ_modifier'>Circulation Modifier</option>
61         <option value='copy_location'>Copy Location</option>
62         <option value='collection_code'>Collection Code</option>
63     </select>
64 </div> 
65
66 <div id='provider-list-div' style='height: 600px;'>
67     <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
68         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
69             <div>Provider</div>
70             <div>
71                 <button dojoType='dijit.form.Button' onClick='pListGrid.showCreateDialog()'>New Provider</button>
72                 <button dojoType='dijit.form.Button' onClick='pListGrid.deleteSelected()'>Delete Selected</button> 
73             </div>
74         </div>
75     </div>
76     <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
77         <table  jsId="pListGrid"
78                 dojoType="openils.widget.AutoGrid"
79                 fieldOrder="['id', 'name', 'code', 'owner', 'currency_type']"
80                 query="{id: '*'}"
81                 defaultCellWidth='"auto"'
82                 autoHeight='true'
83                 fmClass='acqpro'
84                 editOnEnter='true'>
85             <thead>
86                 <tr><th field='name' get='getProviderName' formatter='formatName'/></tr>
87             </thead>
88         </table>
89     </div>
90 </div>
91
92 <div id='provider-summary-pane'></div>     
93 <div id='provider-details-div' style='height:600px;'>
94 <div dojoType="dijit.layout.TabContainer" style='height:100%;' jsId='providerTabs'>
95
96     <div dojoType="dijit.layout.ContentPane" title='Provider Address' select='true' id='provider-address'>
97
98         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
99             <div> Provider Address</div>
100             <div>
101             <button dojoType='dijit.form.Button' onClick='paListGrid.showCreateDialog()'>New Provider Address</button>
102             <button dojoType='dijit.form.Button' onClick='paListGrid.deleteSelected()'>Delete Selected</button>
103             </div>
104         </div>
105         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:100px'>
106             <table  jsId="paListGrid"
107                     dojoType="openils.widget.AutoGrid"
108                     fieldOrder="['id', 'address_type', 'provider', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
109                     query="{id: '*'}"
110                     fmClass='acqpa'
111                     defaultCellWidth='"auto"' 
112                     editOnEnter='true'>
113             </table>
114         </div>
115     </div>
116
117     <div dojoType="dijit.layout.ContentPane" title='Provider Contact' id='tab-pro-contact'>
118         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
119             <div> Provider Contact</div>
120             <div>
121             <button dojoType='dijit.form.Button' onClick='pcListGrid.showCreateDialog()'>New Contact</button>
122             <button dojoType='dijit.form.Button' onClick='pcListGrid.deleteSelected()'>Delete Selected</button>
123             </div>
124         </div>
125         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
126             <table  jsId="pcListGrid"
127                     dojoType="openils.widget.AutoGrid"
128                     fieldOrder="['id', 'name', 'provider', 'role', 'email']"
129                     defaultCellWidth='"auto"'
130                     query="{id: '*'}"
131                     fmClass='acqpc'
132                     editOnEnter='true'>
133             </table>
134         </div>
135
136     <div id='contact-addr-div'>
137         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
138             <div>Contact Address</div>
139             <div>
140             <button dojoType='dijit.form.Button' onClick='pcaListGrid.showCreateDialog()'>New Contact Address</button>
141             <button dojoType='dijit.form.Button' onClick='pcaListGrid.deleteSelected()'>Delete Selected</button>
142             </div>
143         </div>
144         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
145             <table  jsId="pcaListGrid"
146                     dojoType="openils.widget.AutoGrid"
147                     fieldOrder="['id', 'address_type', 'contact', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
148                     query="{id: '*'}"
149                     fmClass='acqpca'
150                     defaultCellWidth='"auto"' 
151                     editOnEnter='true'>
152
153             </table>
154         </div>
155     </div>
156     </div>
157     <div dojoType="dijit.layout.ContentPane" title='Attribute Definitions' id='tab-attr'>
158         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
159             <div> Attribute Definitions</div>
160             <div>
161             <button dojoType='dijit.form.Button' onClick='padListGrid.showCreateDialog()'>New Attribute Definition</button>
162             <button dojoType='dijit.form.Button' onClick='padListGrid.deleteSelected()'>Delete Selected</button>
163             </div>
164         </div>
165         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
166             <table  jsId="padListGrid"
167                     dojoType="openils.widget.AutoGrid"
168                     fieldOrder="['id', 'provider', 'code', 'description',  'provider', 'ident', 'remove',  'tag', 'subfield', 'xpath']"
169                     query="{id: '*'}"
170                     fmClass='acqlipad'
171                     editOnEnter='true'>
172                 <thead>
173                     <tr>
174                         <th field="xpath" width='auto'/>
175                         <th field="tag" get='getParsedTag'/>
176                         <th field="subfield" get='getParsedSubf'/>
177                     </tr>
178                 </thead>
179             </table>
180         </div>
181     </div>
182
183     <div dojoType="dijit.layout.ContentPane" title='Holding Subfield' id='tab-hold'>
184         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
185             <div>Holding Subfield</div>
186             <div>
187             <button dojoType='dijit.form.Button' onClick='phsListGrid.showCreateDialog()'>New Holding Subfield</button>
188             <button dojoType='dijit.form.Button' onClick='phsListGrid.deleteSelected()'>Delete Selected</button>
189             </div>
190         </div>
191         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
192             <table  jsId="phsListGrid"
193                     dojoType="openils.widget.AutoGrid"
194                     fieldOrder="['id', 'provider', 'name', 'subfield']"
195                     query="{id: '*'}"
196                     fmClass='acqphsm'
197                     editOnEnter='true'>
198
199             </table>
200         </div>
201     </div>
202 </div>
203 </div>
204 [% END %]
205