]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/circ/hold_pull_list.tt2
LP #1092921: Display of/sorting by CN affixes in Simplified Hold Pull List
[working/Evergreen.git] / Open-ILS / src / templates / circ / hold_pull_list.tt2
1 [% WRAPPER base.tt2 %]
2 [% ctx.page_title = l('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_prefix_sort_key": {
18             "path": "current_copy.call_number.prefix.label_sortkey",
19             "sort": true
20         },
21         "call_number_suffix_sort_key": {
22             "path": "current_copy.call_number.suffix.label_sortkey",
23             "sort": true
24         },
25         "call_number_sort_key": {
26             "path": "current_copy.call_number.label_sortkey",
27             "sort": true
28         }
29     };
30
31     function set_grid_query_from_org_selector() {
32         grid.baseQuery = {  /* Don't optimize away this assignment.  It's
33                                important to store this data so that the filter
34                                dialog doesn't clobber it later. */
35             "copy_circ_lib": org_selector.attr("value")
36         };
37         grid.filter(
38             dojo.mixin(grid.query, grid.baseQuery),
39             true    /* re-fetch */
40         );
41         grid.refresh();
42     }
43
44     function prepare_org_selector(perm) {
45         new openils.User().buildPermOrgSelector(
46             perm, org_selector, null,
47             function() {
48                 dojo.connect(
49                     org_selector, "onChange", set_grid_query_from_org_selector
50                 );
51                 set_grid_query_from_org_selector();
52             }
53         );
54     }
55
56     openils.Util.addOnLoad(
57         function() {
58             prepare_org_selector("VIEW_HOLD");
59         }
60     );
61
62 </script>
63 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
64     <div dojoType="dijit.layout.ContentPane"
65          layoutAlign="top" class="oils-header-panel">
66         <div>[% l('Hold Pull List') %]</div>
67         <div>
68             <button dojoType="dijit.form.Button"
69                 onClick="grid.print();">[% l('Print Pull List') %]</button>
70         </div>
71     </div>
72     <div class="oils-acq-basic-roomy">
73         <label for="org_selector">[% l('Show the pull list for:') %]</label>
74         <select
75             id="org_selector" jsId="org_selector"
76             dojoType="openils.widget.OrgUnitFilteringSelect"
77             searchAttr="name" labelAttr="name">
78         </select>
79     </div>
80     <table
81         jsid="grid"
82         dojoType="openils.widget.FlattenerGrid"
83         columnPersistKey='"circ.hold_pull_list"'
84         autoHeight="10"
85         editOnEnter="false"
86         hideSelector="true"
87         autoCoreFields="true"
88         autoFieldFields="['current_copy','current_copy.call_number.record.simple_record']"
89         editStyle="pane"
90         showLoadFilter="true"
91         fmClass="'ahopl'"
92         defaultSort="['copy_location_order_position','call_number_sort_key']"
93         mapExtras="map_extras"
94         suppressFilterFields="['copy_circ_lib']"
95         sortFieldReMap="{call_number_label:'call_number_sort_key',cn_prefix:'call_number_prefix_sort_key',cn_suffix:'call_number_suffix_sort_key',shelving_loc:'copy_location_order_position'}"
96         fetchLock="true"
97         query="{}">
98         <thead>
99             <tr>
100                 <th field="shelving_loc" fpath="current_copy.location.name" ffilter="true">[% l('Shelving Location') %]</th>
101                 <th field="call_number_label" fpath="call_number_label" ffilter="true"></th>
102                 <th field="author" fpath="current_copy.call_number.record.simple_record.author" ffilter="true">[% l('Author') %]</th>
103                 <th field="title" fpath="current_copy.call_number.record.simple_record.title" ffilter="true">[% l('Title') %]</th>
104                 <th field="barcode" fpath="current_copy.barcode" ffilter="true"></th>
105                 <th field="parts" fpath="current_copy.parts.label" fsort="false">[% l('Parts') %]</th>
106                 <th field="copy_status" fpath="current_copy.status.name">[% l('Copy Status') %]</th>
107                 <th field="notes" fpath="notes.body" fsort="false" _visible="false">[% l('Hold Notes') %]</th>
108                 <th field="patron_barcode" fpath="usr.card.barcode" _visible="false" ffilter="true">[% l('Patron Barcode') %]</th>
109                 <th field="pickup_lib_name" fpath="pickup_lib.name" _visible="false" ffilter="true">[% l('Pickup Library') %]</th>
110                 <th field="pickup_lib_shortname" fpath="pickup_lib.shortname" _visible="false" ffilter="true">[% l('Pickup Library (Shortname)') %]</th>
111                 <th field="request_lib_name" fpath="request_lib.name" _visible="false" ffilter="true">[% l('Request Library') %]</th>
112                 <th field="request_lib_shortname" fpath="request_lib.shortname" _visible="false" ffilter="true">[% l('Request Library (Shortname)') %]</th>
113                 <th field="selection_ou" fpath="selection_ou.shortname" _visible="false" ffilter="true">[% l('Selection Locus') %]</th>
114                 <th field="sms_carrier_name" fpath="sms_carrier.name" _visible="false" ffilter="true">[% l('SMS Carrier') %]</th>
115                 <th field="cn_prefix" fpath="current_copy.call_number.prefix.label" _visible="false" ffilter="true" fsort="true">[% l('Call Number Prefix') %]</th>
116                 <th field="cn_suffix" fpath="current_copy.call_number.suffix.label" _visible="false" ffilter="true" fsort="true">[% l('Call Number Suffix') %]</th>
117             </tr>
118         </thead>
119     </table>
120 </div>
121 [% END %]