4945db19275c5bf67fab5f149efcef2a5a6e25db
[working/Evergreen.git] / Open-ILS / web / templates / default / acq / po / search.tt2
1 [% WRAPPER default/base.tt2 %]
2 <div id='oils-acq-list-header' class='container'>
3     <div id='oils-acq-list-header-label'>PO Search</div>
4 </div>
5
6 <!-- load the page-specific JS -->
7 <script src='[% ctx.media_prefix %]/js/ui/default/acq/po/search.js'> </script>
8
9 <script>
10     function getId(rowIndex, item) {
11         if(!item) return;
12         var data = this.grid.store.getValue(item, 'id');
13         return '<a href="[% ctx.base_uri %]/acq/po/view/' + data + '">'+data;
14     }
15 </script>
16
17
18 <form dojoType='dijit.form.Form' action='' method='' id='oils-acq-po-search-form'>
19
20     <script type="dojo/method" event="onSubmit">
21         doSearch(this.getValues());
22         return false; /* don't redirect */
23     </script>
24
25     <div class='oils-acq-basic-form-div'>
26
27         <label for='id'>ID</label>
28         <input dojoType='dijit.form.NumberTextBox' name='id'> </input>
29
30         <label for='provider'>Provider</label>
31         <input id='po-search-provider-selector'/>
32
33         <label for='state'>State</label></td>
34         <select dojoType='dijit.form.FilteringSelect' name='state' required='false'>
35             <option value='new'>New</option>
36             <option value='in-process'>In Process</option>
37         </select>
38
39         <label for='ordering_agency'>Ordering Agency</label>
40         <input id='po-search-agency-selector'/>
41
42         <span dojoType='dijit.form.Button' type='submit'>Search</span>
43     </div>
44 </form>
45 <br/>
46 <div dojoType="dijit.layout.ContentPane" layoutAlign="top"> 
47     <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'> 
48         <table 
49                 id="po-grid" 
50                 jsId="poGrid" 
51                 dojoType="openils.widget.AutoGrid" 
52                 query="{id: '*'}" 
53                 fieldOrder="['id', 'owner', 'ordering_agency', 'provider', 'create_time', 'edit_time', 'state']"
54                 suppressFields="['editor', 'creator']"
55                 query="{id: '*'}"
56                 defaultCellWidth='"auto"'
57                 showSequenceFields='true'
58                 fmClass='acqpo'> 
59             <thead> 
60                 <tr> 
61                     <th field="id" get='getId'>ID</th> 
62                     <th field="owner" get='getPOOwner'/>
63                 </tr> 
64             </thead> 
65         </table>     
66     </div> 
67 </div>
68 [% END %]
69