]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/ebook_holds.tt2
LP#1673870: Add ebook API place hold functionality to OPAC
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / ebook_holds.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/misc_util.tt2";
3     PROCESS "opac/parts/hold_status.tt2";
4     PROCESS "opac/parts/myopac/column_sort_support.tt2";
5     WRAPPER "opac/parts/myopac/base.tt2";
6     myopac_page = "ebook_holds";
7     IF CGI.param("action") == 'place_hold';
8         ebook_holds_title = l('Place Hold on E-Item');
9     ELSIF CGI.param("action") == 'cancel_hold';
10         ebook_holds_title = l('Cancel Hold on E-Item');
11     ELSE;
12         ebook_holds_title = l('E-Items on Hold');
13     END;
14     limit = (ctx.holds_limit.defined) ? ctx.holds_limit : 0;
15     offset = (ctx.holds_offset.defined) ? ctx.holds_offset : 0;
16     count = (ctx.holds_ids.size.defined) ? ctx.holds_ids.size : 0;
17 %]
18 <h3 class="sr-only">[% l('My E-Item Holds') %]</h3>
19 <div id='myopac_holds_div'>
20
21     <div id="acct_holds_tabs">
22         <div class="align">
23             <a href='[% mkurl('holds', {}, ['limit','offset','available','sort','sort_type']) %]'>[% l("Items on Hold") %]</a>
24         </div>
25         <div class="align selected">
26             <a href='#'>[% l("E-Items on Hold") %]</a>
27         </div>
28         <div class="align">
29             <a href='[% mkurl('ebook_holds_ready', {}, ['limit','offset','available','sort','sort_type']) %]'>[% l("E-Items Ready for Checkout") %]</a>
30         </div>
31         <div class="align">
32             <a href='[% mkurl('hold_history', {}, ['limit','offset','available','sort','sort_type']) %]'>[% l("Holds History") %]</a>
33         </div>
34     </div>
35
36     <div class="header_middle">
37         <span class="float-left">[% ebook_holds_title %]</span>
38     </div>
39     <div class="clear-both"></div>
40     <div id="no_ebook_holds" class="warning_box hidden">[% l('You have no e-item holds.') %]</div>
41     <div id="ebook_place_hold_failed" class="warning_box hidden">[% l('Hold could not be placed.') %]</div>
42     <div id="ebook_place_hold_succeeded" class="success hidden">[% l('E-item is now on hold.') %]</div>
43     <div id="ebook_cancel_hold_failed" class="warning_box hidden">[% l('Hold could not be canceled.') %]</div>
44     <div id="ebook_cancel_hold_succeeded" class="success hidden">[% l('Your hold has been canceled.') %]</div>
45     <div id='ebook_holds_main' class="hidden">
46         <table id="ebook_holds_main_table"
47             title="[% ebook_holds_title %]"
48             class="table_no_border_space table_no_cell_pad item_list_padding">
49             <thead>
50             <tr>
51                 <th>[% l("Title") %]</th>
52                 <th>[% l("Author") %]</th>
53                 <th>[% l("Expire Date") %]</th>
54                 <th>[% l("Status") %]</th>
55                 <th>[% l("Actions") %]</th>
56             </tr>
57             </thead>
58             <tbody id="ebook_holds_main_table_body"></tbody>
59         </table>
60     </div>
61 </div>
62 [% END %]