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