]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates-bootstrap/opac/myopac/hold_history.tt2
1ee35895ac8423995b16113d6527361d2968c562
[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 = "holds";
6     limit = ctx.hold_history_limit;
7     offset = ctx.hold_history_offset;
8     count = ctx.hold_history_ids.size;
9 %]
10
11 <h3 class="sr-only">[% l('Holds History') %]</h3>
12 <div id='myopac_holds_div'>
13
14
15         <div>
16         <ul class="nav nav-pills nav-justified">
17         <li class="nav-item m-2">
18             <a href='[% mkurl('holds',{},['limit','offset']) %]' class="nav-link not_active_pill">[% l("Items on Hold") %]</a>
19         </li>
20         [% IF ebook_api.enabled == 'true' %]
21         <li class="nav-item m-2">
22             <a href='[% mkurl('ebook_holds', {}, ['limit','offset','available','sort','sort_type']) %]' class="nav-link not_active_pill">[% l("E-Items on Hold") %]</a>
23         </li>
24         <li class="nav-item m-2">
25             <a href='[% mkurl('ebook_holds_ready', {}, ['limit','offset','available','sort','sort_type']) %]' class="nav-link not_active_pill">[% l("E-Items Ready for Checkout") %]</a>
26         </li>
27         [% END %]
28         <li class="nav-item m-2">
29             <a href='#' class="nav-link active">[% l("Holds History") %]</a>
30         </li>
31         </ul>
32     </div>
33     
34   
35 <div class="my-4">
36     <div class="header_middle">
37         <span style="float:left;">[% l("Previously Held Items") %]</span>
38         <span class='float-left' style='padding-left: 10px;'>
39             <a href='[% mkurl('hold_history', {limit => limit,offset => (offset - limit)}) %]'
40                 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
41             [% IF offset > 0 || count > limit;
42                 curpage = 0;
43                 WHILE curpage * limit < count;
44                     IF curpage * limit == offset;
45             %]
46             [% curpage + 1 %]
47                     [%- ELSE %]
48             <a href='[% mkurl('hold_history', {limit => limit, offset => (curpage * limit)}) %]'>[% curpage + 1 %]</a>
49                     [%- END;
50                     curpage = curpage + 1;
51                 END;
52             END %]
53             <a href='[% mkurl('hold_history', {limit => limit, offset => (offset + limit)}) %]'
54                [% IF count <= limit + offset %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
55         </span>
56         <span style="float:right;">
57             <a class="hide_me" href="#">[% l('Export List') %]</a>
58         </span>
59     </div>
60     <div class="clear-both"></div>
61
62     <div id='holds_main'>
63         [% IF ctx.holds.size && ctx.holds.size < 1 %]
64         <div class="warning_box">
65             <big><strong>[% l('No holds found.') %]</strong></big>
66         </div>
67         [% ELSE %]
68         <table id='acct_holds_hist_header' class='table table-hover miniTable holdHistoryTable' title="[% l('History of items on hold') %]">
69             <thead>
70                 <tr>
71                     <th><span>[% l('Title') %]</span></th>
72                     <th><span>[% l('Author') %]</span></th>
73                     <th> <span>[% l('Format') %]</span></th>
74                     <th><span>[% l('Pickup Location') %]</span> </th>
75                     <th><span>[% l('Status') %]</span></th>
76                 </tr>
77             </thead>
78             <tbody>
79                 [% FOR hold IN ctx.holds;
80                     attrs = {marc_xml => hold.marc_xml};
81                     PROCESS get_marc_attrs args=attrs;
82                     ahr = hold.hold.hold %]
83
84                 <tr name="acct_holds_temp">
85                    
86                     <td>
87                     <span class="sr-only">Title</span>
88                         <div>
89                             <a href="[% mkurl(ctx.opac_root _ '/record/' _ hold.hold.bre_id) %]">[% attrs.title | html %]</a>
90                         </div>
91                     </td>
92                     <td>
93                     <span class="sr-only">Author</span>
94                         <div>
95                             <a href="[% mkurl(ctx.opac_root _ '/results',
96                                 {qtype => author, query => attrs.author.replace('[,\.:;]', '')}
97                             ) %]">[% attrs.author | html %]</a>
98                         </div>
99                     </td>
100                     <td>
101                         <div class='format_icon'>
102                             [% IF attrs.format_icon %]
103                             <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %][% ctx.cache_key %]" />
104                             [% END %]
105                         </div>
106                          <span class="sr-only">Format [% attrs.format_label | html %]</span>
107                     </td>
108                     <td>
109                     <span class="sr-only">Pickup Location</span>
110                         [% ctx.get_aou(ahr.pickup_lib).name | html %]
111                     </td>
112                     <td>
113                     <span class="sr-only">Hold Status</span>
114                         <div name="acct_holds_status">
115                             [% PROCESS get_hold_status hold=hold; %]
116                         </div>
117                     </td>
118                 </tr>
119                 [% END %]
120             </tbody>
121         </table>
122         [% END %]
123     </div></div>
124 </div>
125 [% END %]