1 [% PROCESS "opac/parts/header.tt2";
2 PROCESS "opac/parts/misc_util.tt2";
3 PROCESS "opac/parts/myopac/column_sort_support.tt2";
4 WRAPPER "opac/parts/myopac/base.tt2";
7 <h3 class="sr-only">[% l('Current Items Checked Out') %]</h3>
8 <div id='myopac_checked_div'>
10 <ul class="nav nav-pills nav-fill">
11 <li class="nav-item m-2">
12 <a class="nav-link active" href='#'>[% l("Current Items Checked Out") %]</a>
14 [%- IF ebook_api.enabled == 'true' %]
15 <li class="nav-item m-2">
16 <a class="nav-link not_active_pill" href="[% mkurl('ebook_circs',{},1) %]">[% l("E-Items Currently Checked Out") %]</a>
19 <li class="nav-item active m-2">
20 <a class="nav-link not_active_pill" href="[% mkurl('circ_history',{},1) %]">[% l("Check Out History") %]</a>
25 <div class="header_middle">
26 <span class="float-left">[% l('Current Items Checked Out') %]</span>
28 <div class="clear-both"></div>
29 [% IF ctx.circs.size < 1 %]
30 <div class="warning_box">[% l('You have no items checked out.') %]</div>
32 [% IF ctx.success_renewals %]
33 <div class="renew-summary">
34 [% l("Successfully renewed [_1] item(s)", ctx.success_renewals) %]
37 [% IF ctx.failed_renewals %]
38 <div class="renew-summary alert">
39 [% l("Failed to renew [_1] item(s)", ctx.failed_renewals) %]
42 <div id='checked_main'>
43 <form method="post" id="circ-form"
44 onsubmit="return confirm('[% l("Are you sure you wish to renew the selected item(s)?") %]');">
46 <span class="col-md-11 my-2">
47 <select class="form-control" name="action" title="[% l('Select Action') %]">
48 <option value="renew">[% l('Renew Selected Titles') %]</option>
51 <span class="col-md-1 my-2">
55 class="btn btn-confirm" />
57 <!-- <span style="padding-left:5px;">
59 alt="[% l('Renewing Help') %]"
60 title="[% l('Actions for checked out items') %]"
61 src="[% ctx.media_prefix %]/images/question-mark.png[% ctx.cache_key %]" /></a>
65 <table id="acct_checked_main_header" title="[% l('Items Checked Out') %]"
66 class="table table-hover miniTable circTable">
69 <th class="checkbox_column">
70 <input type="checkbox" id="check_all_checked"
71 title="[% l('Select All Items') %]"
72 onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'circ' && !inputs[i].disabled) inputs[i].checked = this.checked;}"
75 <th>[% sort_head("sort_title", l("Title")) %]</th>
76 <th>[% sort_head("author", l("Author")) %]</th>
77 <th>[% sort_head("renews", l("Renewals Left")) %]</th>
78 <th>[% sort_head("due", l("Due Date")) %]</th>
79 <th>[% sort_head("barcode", l("Barcode")) %]</th>
80 <th>[% sort_head("callnum", l("Call Number")) %]</th>
81 [% IF ctx.get_org_setting(ctx.user.home_ou, 'opac.show_owning_lib_column'); %]
82 <th>[% sort_head("lib", l("Owning Library")) %]</th>
90 [%# Copy the ctx.circs into a local array, then add a SORT field
91 that contains the value to sort on. Since we need the item attrs,
92 invoke it and save the result in ATTRS.
95 circ_items = ctx.circs; # Array assignment
97 sort_field = CGI.param('sort'); # unless changed below...
99 FOR circ IN circ_items;
100 circ.ATTRS = {marc_xml => circ.marc_xml};
101 PROCESS get_marc_attrs args=circ.ATTRS;
106 circ.SORTING = circ.ATTRS.sort_title;
109 circ.SORTING = circ.ATTRS.author;
112 circ.SORTING = circ.circ.renewal_remaining;
115 circ.SORTING = circ.circ.due_date;
118 circ.SORTING = circ.circ.target_copy.barcode;
121 circ.SORTING = circ.circ.target_copy.call_number.label;
123 circ.SORTING = circ.circ.target_copy.call_number.owning_lib.name;
130 IF (sort_field != "sort_title");
131 deemphasize_class = "";
133 deemphasize_class = " class=\"sort_deemphasize\"";
136 # Apply sorting to circ_items
138 circ_items = circ_items.sort("SORTING");
139 IF (CGI.param("sort_type") == "desc");
140 circ_items = circ_items.reverse;
144 # circ_items list is now sorted. Traverse and dump the information.
146 FOR circ IN circ_items; %]
148 <td class="checkbox_column" valign="top">
149 <input type="checkbox" name="circ"
150 title="[% l('Item Selected') %]"
151 [% IF circ.circ.renewal_remaining < 1 %] disabled="disabled" [% END %]
152 value="[% circ.circ.id %]" />
155 <span class="sr-only">Title</span>
156 [% IF circ.circ.target_copy.call_number.id == -1 %]
157 [% circ.circ.target_copy.dummy_title | html %]
158 [% ELSIF circ.ATTRS.title %]
159 <a href="[% mkurl(ctx.opac_root _ '/record/' _
160 circ.circ.target_copy.call_number.record.id, {}, 1) %]"
161 name="[% l('Catalog record') %]"><span[%- deemphasize_class -%]>
162 [%- circ.ATTRS.title.substr(0,circ.ATTRS.nonfiling_characters) | html %]</span>
163 [%- circ.ATTRS.title.substr(circ.ATTRS.nonfiling_characters) | html %]</a>
167 [% IF circ.circ.target_copy.call_number.id == -1 %]
168 <span class="sr-only">Author</span>
169 [% circ.circ.target_copy.dummy_author | html %]
170 [% ELSIF circ.ATTRS.author %]
171 <span class="sr-only">Author</span>
172 <a href="[% mkurl(ctx.opac_root _ '/results',
173 {qtype => 'author', query => circ.ATTRS.author.replace('[,\.:;]', '')},
175 ) %]">[% circ.ATTRS.author | html %]</a>
181 <span class="sr-only">Renewals Remaining</span>
182 [% circ.circ.renewal_remaining %]
185 due_date = ctx.parse_datetime(circ.circ.due_date, circ.circ.circ_lib);
186 due_class = (date.now > date.format(due_date, '%s')) ? 'error' : '';
188 <td name="due_date" class='[% due_class %]'>
189 <span class="sr-only">Due Date</span>
190 [% date.format(due_date, DATE_FORMAT) %]
193 <span class="sr-only">Barcode</span>
194 <span class="speak:spell-out;">[% circ.circ.target_copy.barcode | html %]</span>
196 <td name="call_number">
197 <span class="sr-only">Call Number</span>
198 [% circ.circ.target_copy.call_number.label | html %]
200 [% IF ctx.get_org_setting(ctx.user.home_ou, 'opac.show_owning_lib_column'); %]
202 [%- fleshed_ou = circ.circ.target_copy.call_number.owning_lib;
203 INCLUDE "opac/parts/library_name_link_from_ou.tt2";
208 [% IF circ.renewal_response AND
209 circ.renewal_response.textcode != 'SUCCESS' %]
211 <td colspan="[% column_count %]">[%# XXX colspan="0" does not work in IE %]
212 <span class="failure-text" title="[% circ.renewal_response.textcode | html %] / [% circ.renewal_response.fail_part | html %]">
215 IF circ.renewal_response.textcode == 'TOTAL_HOLD_COPY_RATIO_EXCEEDED' OR
216 circ.renewal_response.textcode == 'AVAIL_HOLD_COPY_RATIO_EXCEEDED';
217 # the stock hold ratio message may not be patron friendly
218 renew_fail_msg = l('Item is needed for a hold');
220 renew_fail_msg = circ.renewal_response.desc ||
221 circ.renewal_response.fail_part ||
222 circ.renewal_response.textcode;
224 renew_fail_msg | html;