]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/circ/hold_pull_list.tt2
91a2fdc067f045777a81dd5b6f3a4bc08bf5c414
[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     /* We're going to supress copy_circ_lib from the actual filter dialog later,
9        but we still want it here so we can use a special widget ot filter on
10        it.  This is the widget that's basically saying, "show me the pull list
11        for /what/ library." */
12     var map_extras = {
13         "copy_circ_lib": {
14             "path": "current_copy.circ_lib",
15             "filter": true
16         },
17         "call_number_sort_key": {
18             "path": "current_copy.call_number.label_sortkey",
19             "sort" :true
20         }
21     };
22
23     function set_grid_query_from_org_selector() {
24         grid.query = {
25             "copy_circ_lib": org_selector.attr("value")
26         };
27         grid.refresh();
28     }
29
30     function prepare_org_selector(perm) {
31         new openils.User().buildPermOrgSelector(
32             perm, org_selector, null,
33             function() {
34                 dojo.connect(
35                     org_selector, "onChange", set_grid_query_from_org_selector
36                 );
37                 set_grid_query_from_org_selector();
38             }
39         );
40     }
41
42     openils.Util.addOnLoad(
43         function() {
44             prepare_org_selector("VIEW_HOLD");
45         }
46     );
47
48 </script>
49 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
50     <div dojoType="dijit.layout.ContentPane"
51          layoutAlign="top" class="oils-header-panel">
52         <div>Hold Pull List</div>
53         <div>
54             <button dojoType="dijit.form.Button"
55                 onClick="grid.print();">Print Pull List</button>
56         </div>
57     </div>
58     <div class="oils-acq-basic-roomy">
59         <label for="org_selector">Show the pull list for:</label>
60         <select
61             id="org_selector" jsId="org_selector"
62             dojoType="openils.widget.OrgUnitFilteringSelect"
63             searchAttr="name" labelAttr="name">
64         </select>
65     </div>
66     <table
67         jsid="grid"
68         dojoType="openils.widget.FlattenerGrid"
69         columnPersistKey='"circ.hold_pull_list"'
70         autoHeight="10"
71         editOnEnter="false"
72         hideSelector="true"
73         autoCoreFields="true"
74         autoFieldFields="['current_copy','current_copy.call_number.record.simple_record']"
75         editStyle="pane"
76         showLoadFilter="true"
77         fmClass="'ahopl'"
78         defaultSort="['copy_location_order_position','call_number_sort_key']"
79         mapExtras="map_extras"
80         suppressFilterFields="['copy_circ_lib']"
81         sortFieldReMap="{call_number_label:'call_number_sort_key',shelving_loc:'copy_location_order_position'}"
82         fetchLock="true"
83         query="{}">
84         <thead>
85             <tr>
86                 <th field="shelving_loc" fpath="current_copy.location.name" ffilter="true">Shelving Location</th>
87                 <th field="call_number_label" fpath="call_number_label" ffilter="true"></th>
88                 <th field="author" fpath="current_copy.call_number.record.simple_record.author" ffilter="true">Author</th>
89                 <th field="title" fpath="current_copy.call_number.record.simple_record.title" ffilter="true">Title</th>
90                 <th field="barcode" fpath="current_copy.barcode" ffilter="true"></th>
91                 <th field="parts" fpath="current_copy.parts.label" fsort="false">Parts</th>
92                 <th field="copy_status" fpath="current_copy.status.name">Copy Status</th>
93                 <th field="notes" fpath="notes.body" fsort="false" _visible="false">Hold Notes</th>
94                 <th field="patron_barcode" fpath="usr.card.barcode" _visible="false" ffilter="true">Patron Barcode</th>
95                 <th field="pickup_lib_name" fpath="pickup_lib.name" _visible="false" ffilter="true">Pickup Library</th>
96                 <th field="pickup_lib_shortname" fpath="pickup_lib.shortname" _visible="false" ffilter="true">Pickup Library (Shortname)</th>
97                 <th field="request_lib_name" fpath="request_lib.name" _visible="false" ffilter="true">Request Library</th>
98                 <th field="request_lib_shortname" fpath="request_lib.shortname" _visible="false" ffilter="true">Request Library (Shortname)</th>
99                 <th field="selection_ou" fpath="selection_ou.shortname" _visible="false" ffilter="true">Selection Locus</th>
100                 <th field="sms_carrier_name" fpath="sms_carrier.name" _visible="false" ffilter="true">SMS Carrier</th>
101             </tr>
102         </thead>
103     </table>
104 </div>
105 [% END %]