]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates-bootstrap/opac/myopac/hold_history.tt2
LP1778972 A slew of updates
[Evergreen.git] / Open-ILS / src / templates-bootstrap / opac / myopac / hold_history.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/misc_util.tt2";
3     PROCESS "opac/parts/hold_status.tt2";
4     WRAPPER "opac/parts/myopac/base.tt2";
5     myopac_page = "hold_history";
6     parent="holds";
7     limit = ctx.hold_history_limit;
8     offset = ctx.hold_history_offset;
9     count = ctx.hold_history_ids.size;
10 %]
11
12 <h3>[% l('Holds History') %]</h3>
13 <div id='myopac_holds_div'> 
14   
15 <div>
16     <div>
17         <div>   
18           [% IF offset != 0 %]<a href='[% mkurl('hold_history', {limit => limit,offset => (offset - limit)}) %]'
19               ><span class="np_nav_link classic_link btn btn-action">&#9668;[% l('Previous') %]</span></a> [% END %]
20
21              [% IF offset > 0 || count > limit; curpage = 0; WHILE curpage * limit < count; IF curpage * limit == offset; %]
22                   <span class="np_nav_link classic_link btn btn-action disabled">[% curpage + 1 %]</span>
23
24                     [%- ELSE %]
25                 <a href='[% mkurl('hold_history', {limit => limit, offset => (curpage * limit)}) %]' class="np_nav_link classic_link btn btn-action">[% curpage + 1 %]</a>
26                     [%- END; curpage = curpage + 1; END; END %]
27                
28             
29               
30                 [% IF count > limit + offset %]<a href='[% mkurl('hold_history', {limit => limit, offset => (offset + limit)}) %]'
31                   ><span class="np_nav_link classic_link btn btn-action">[% l('Next') %]&#9658;</span></a>[% END %]
32            </div>
33
34
35
36            
37           <p style="padding-left:5px;" class='error'>
38                     [%  IF ctx.hold_suspend_post_capture; l('One or more holds could not be suspended because the item is at (or en route to) the pickup library.'); END; %]
39                 </p>
40         <p style="float:right;">
41             <a class="hide_me" href="#">[% l('Export List') %]</a>
42         </p>
43     </div>
44
45     <div id='holds_main'>
46         [% IF ctx.holds.size && ctx.holds.size < 1 %]
47         <div class="warning_box">
48             <big><strong>[% l('No holds found.') %]</strong></big>
49         </div>
50         [% ELSE %]
51         <table id='acct_holds_hist_header' class='table table-hover table-bordered miniTable holdHistoryTable' title="[% l('History of items on hold') %]">
52             <thead>
53                 <tr>
54                     <th><span>[% l('Title') %]</span></th>
55                     <th><span>[% l('Author') %]</span></th>
56                     <th> <span>[% l('Format') %]</span></th>
57                     <th><span>[% l('Pickup Location') %]</span> </th>
58                     <th><span>[% l('Status') %]</span></th>
59                 </tr>
60             </thead>
61             <tbody>
62                 [% FOR hold IN ctx.holds;
63                     attrs = {marc_xml => hold.marc_xml};
64                     PROCESS get_marc_attrs args=attrs;
65                     ahr = hold.hold.hold %]
66
67                 <tr>
68                    
69                     <td>
70                     <span class="sr-only">Title</span>
71                         <div>
72                             <a href="[% mkurl(ctx.opac_root _ '/record/' _ hold.hold.bre_id) %]">[% attrs.title | html %]</a>
73                         </div>
74                     </td>
75                     <td>
76                      [% IF attrs.author; %]
77                     <span class="sr-only">Author</span>
78                         <div>
79                        
80                             <a href="[% mkurl(ctx.opac_root _ '/results',
81                                 {qtype => author, query => attrs.author.replace('[,\.:;]', '')}
82                             ) %]">[% attrs.author | html %]</a>
83                           
84                         </div>
85                           [% END %]
86                     </td>
87                     <td>
88                         <div>
89                             [% IF attrs.format_icon %]
90                             <img alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %][% ctx.cache_key %]" />
91                             [% END %]
92                              <span>[% attrs.format_label | html %]</span>
93                         </div>
94                          <span class="sr-only">Format [% attrs.format_label | html %]</span>
95                     </td>
96                     <td>
97                     <span class="sr-only">Pickup Location</span>
98                         [% ctx.get_aou(ahr.pickup_lib).name | html %]
99                     </td>
100                     <td>
101                     <span class="sr-only">Hold Status</span>
102                         <div> [% PROCESS get_hold_status hold=hold; %]
103                         </div>
104                     </td>
105                 </tr>
106                 [% END %]
107             </tbody>
108         </table>
109         [% END %]
110     </div></div>
111 </div>
112 [% END %]