]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates-bootstrap/opac/myopac/hold_history.tt2
LP#1778972: Tweaks and fixes to Bootstrap 4 template
[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                     [%- ELSE %]
24                 <a href='[% mkurl('hold_history', {limit => limit, offset => (curpage * limit)}) %]' class="np_nav_link classic_link btn btn-action">[% curpage + 1 %]</a>
25                     [%- END; curpage = curpage + 1; END; END %]
26                
27             
28               
29                 [% IF count > limit + offset %]<a href='[% mkurl('hold_history', {limit => limit, offset => (offset + limit)}) %]'
30                   ><span class="np_nav_link classic_link btn btn-action">[% l('Next') %]&#9658;</span></a>[% END %]
31            </div>
32
33
34
35            
36           <p style="padding-left:5px;" class='error'>
37                     [%  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; %]
38                 </p>
39         <p style="float:right;">
40             <a class="hide_me" href="#">[% l('Export List') %]</a>
41         </p>
42     </div>
43
44     <div id='holds_main'>
45         [% IF ctx.holds.size && ctx.holds.size < 1 %]
46         <div class="warning_box">
47             <big><strong>[% l('No holds found.') %]</strong></big>
48         </div>
49         [% ELSE %]
50         <table id='acct_holds_hist_header' class='table table-hover table-bordered miniTable holdHistoryTable' title="[% l('History of items on hold') %]">
51             <thead>
52                 <tr>
53                     <th><span>[% l('Title') %]</span></th>
54                     <th><span>[% l('Author') %]</span></th>
55                     <th> <span>[% l('Format') %]</span></th>
56                     <th><span>[% l('Pickup Location') %]</span> </th>
57                     <th><span>[% l('Status') %]</span></th>
58                 </tr>
59             </thead>
60             <tbody>
61                 [% FOR hold IN ctx.holds;
62                     attrs = {marc_xml => hold.marc_xml};
63                     PROCESS get_marc_attrs args=attrs;
64                     ahr = hold.hold.hold %]
65
66                 <tr>
67
68                     <td>
69                     <span class="sr-only">Title</span>
70                         <div>
71                             <a href="[% mkurl(ctx.opac_root _ '/record/' _ hold.hold.bre_id) %]">[% attrs.title | html %]</a>
72                         </div>
73                     </td>
74                     <td>
75                      [% IF attrs.author; %]
76                     <span class="sr-only">Author</span>
77                         <div>
78                        
79                             <a href="[% mkurl(ctx.opac_root _ '/results',
80                                 {qtype => author, query => attrs.author.replace('[,\.:;]', '')}
81                             ) %]">[% attrs.author | html %]</a>
82                           
83                         </div>
84                           [% END %]
85                     </td>
86                     <td>
87                         <div>
88                             [% IF attrs.format_icon %]
89                             <img alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %][% ctx.cache_key %]" />
90                             [% END %]
91                              <span>[% attrs.format_label | html %]</span>
92                         </div>
93                          <span class="sr-only">Format [% attrs.format_label | html %]</span>
94                     </td>
95                     <td>
96                     <span class="sr-only">Pickup Location</span>
97                         [% ctx.get_aou(ahr.pickup_lib).name | html %]
98                     </td>
99                     <td>
100                     <span class="sr-only">Hold Status</span>
101                         <div> [% PROCESS get_hold_status hold=hold; %]
102                         </div>
103                     </td>
104                 </tr>
105                 [% END %]
106             </tbody>
107         </table>
108         [% END %]
109     </div></div>
110 </div>
111 [% END %]