]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/circ/hold_pull_list.tt2
New pull list interface taking advantage of flattener for speed,
[working/Evergreen.git] / Open-ILS / src / templates / circ / hold_pull_list.tt2
1 [% WRAPPER base.tt2 %]
2 [% ctx.page_title = 'Hold Pull List' %]
3 <script type="text/javascript">
4     dojo.require("dijit.form.Button");
5     dojo.require("openils.widget.OrgUnitFilteringSelect");
6     dojo.require("openils.widget.FlattenerGrid");
7
8     var map_extras = {
9         "copy_circ_lib": {
10             "path": "current_copy.circ_lib",
11             "filter": true
12         },
13         "call_number_sort_key": {
14             "path": "current_copy.call_number.label_sortkey",
15             "sort" :true
16         }
17     };
18
19     function set_grid_query_from_org_selector() {
20         grid.query = {
21             "copy_circ_lib": org_selector.attr("value")
22         };
23         grid.refresh();
24     }
25
26     function prepare_org_selector(perm) {
27         new openils.User().buildPermOrgSelector(
28             perm, org_selector, null,
29             function() {
30                 dojo.connect(
31                     org_selector, "onChange", set_grid_query_from_org_selector
32                 );
33                 set_grid_query_from_org_selector();
34             }
35         );
36     }
37
38     openils.Util.addOnLoad(
39         function() {
40             prepare_org_selector("VIEW_HOLD");
41         }
42     );
43
44 </script>
45 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
46     <div dojoType="dijit.layout.ContentPane"
47          layoutAlign="top" class="oils-header-panel">
48         <div>Hold Pull List</div>
49         <div>
50             <button dojoType="dijit.form.Button"
51                 onClick="grid.print();">Print Pull List</button>
52         </div>
53     </div>
54     <div class="oils-acq-basic-roomy">
55         <label for="org_selector">Show the pull list for:</label>
56         <select
57             id="org_selector" jsId="org_selector"
58             dojoType="openils.widget.OrgUnitFilteringSelect"
59             searchAttr="name" labelAttr="name">
60         </select>
61     </div>
62     <table
63         jsid="grid"
64         dojoType="openils.widget.FlattenerGrid"
65         columnPersistKey='"circ.hold_pull_list"'
66         autoHeight="10"
67         editOnEnter="false"
68         hideSelector="true"
69         autoCoreFields="true"
70         autoFieldFields="['current_copy','current_copy.call_number.record.simple_record']"
71         editStyle="pane"
72         showLoadFilter="true"
73         fmClass="'ahopl'"
74         defaultSort="['copy_location_sort_order','call_number_sort_key']"
75         mapExtras="map_extras"
76         sortFieldReMap="{call_number_label: 'call_number_sort_key'}"
77         fetchLock="true"
78         query="{}">
79         <thead>
80             <tr>
81                 <th field="shelving_loc" fpath="current_copy.location.name" ffilter="true">Shelving Location</th>
82                 <th field="call_number_label" fpath="call_number_label"></th>
83                 <th field="author" fpath="current_copy.call_number.record.simple_record.author">Author</th>
84                 <th field="title" fpath="current_copy.call_number.record.simple_record.title">Title</th>
85                 <th field="barcode" fpath="current_copy.barcode"></th>
86                 <th field="parts" fpath="current_copy.parts.label" fsort="false">Parts</th>
87                 <th field="notes" fpath="notes.body" fsort="false" _visible="false">Hold Notes</th>
88                 <th field="patron_barcode" fpath="usr.card.barcode" _visible="false">Patron Barcode</th>
89                 <th field="pickup_lib_name" fpath="pickup_lib.name" _visible="false">Pickup Library</th>
90                 <th field="pickup_lib_shortname" fpath="pickup_lib.shortname" _visible="false">Pickup Library (Shortname)</th>
91                 <th field="request_lib_name" fpath="request_lib.name" _visible="false">Request Library</th>
92                 <th field="request_lib_shortname" fpath="request_lib.shortname" _visible="false">Request Library (Shortname)</th>
93                 <th field="selection_ou" fpath="selection_ou.shortname" _visible="false">Selection Locus</th>
94                 <th field="sms_carrier_name" fpath="sms_carrier.name" _visible="false">SMS Carrier</th>
95             </tr>
96         </thead>
97     </table>
98 </div>
99 [% END %]