1 [% PROCESS "opac/parts/header.tt2";
2 PROCESS "opac/parts/misc_util.tt2";
3 WRAPPER "opac/parts/myopac/main_base.tt2";
5 myopac_main_page = "main";
7 IF (ctx.fines.grocery.size OR ctx.fines.circulation.size) AND ctx.get_org_setting(ctx.user.home_ou, 'credit.payments.allow') == 1;
11 <h3 class="sr-only">[% l('My Account Summary') %]</h3>
12 [% IF myopac_cc_allowed;
13 # http://www.w3.org/TR/WCAG20-TECHS/H32.html
14 # avoid forms w/ no submit action %]
15 <form action="[% ctx.opac_root %]/myopac/main_payment_form#payment" method="get" id="selected_fines">
18 [% IF ctx.fines.circulation.size > 0 %]
19 <div id='myopac_circ_trans_div'>
20 <!--moved tables heading to outside of the table itself - took internal styling -->
21 <div class="header_middle">
22 <span class="acct_fines_header">
23 <!-- Different heading when not able to pay -->
24 [% IF myopac_cc_allowed %]
25 [% l("Pay Selected Circulation Charges") %]
27 [% l("Circulation Charges") %]
33 <table id="acct_fines_main_header" class="table_no_border_space table_no_cell_pad" title="[% l('Items Checked Out') %]">
38 [% IF myopac_cc_allowed %]
39 <th nowrap="nowrap" style="white-space:nowrap;">
40 <input id="pay_fines_box1" checked="checked"
41 type="checkbox" onclick="select_all_checkboxes('xact', this.checked)"
42 title="[% l('Click to (un)select all charges') %]" />
45 <th>[% l("Owed") %]</th>
46 <th class="mobile_hide">[% l("Billing Type") %]</th>
47 <th>[% l("Title") %]</th>
48 <th class='mobile_hide'>[% l("Checkout") %]</th>
49 <th>[% l(" Due ") %]</th>
51 <span class="mobile_hide">[% l(" Returned/Renewed") %]</span>
52 <span class="mobile_view">[% l(" Returned*") %]</span>
57 <tbody id='myopac_circ_trans_tbody'>
58 [% FOR f IN ctx.fines.circulation;
59 attrs = {marc_xml => f.marc_xml};
61 PROCESS get_marc_attrs args=attrs;
62 ELSIF f.xact.reservation;
63 attrs.title = f.xact.reservation.target_resource_type.name;
65 <tr id='myopac_circ_trans_row'>
66 [% IF myopac_cc_allowed %]
68 <input type="checkbox" checked="checked"
69 title="[% l('Pay this fine') %]" name="xact"
70 value="[% f.xact.id %]" />
75 <strong class="alert">
76 [% money(f.xact.balance_owed)%]
80 <td class="mobile_hide">
81 [% f.xact.last_billing_type %]
85 [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id;
87 <a href="[% mkurl(ctx.opac_root _ '/record/' _ recid,
88 {loc => ctx.search_ou}) %]">[% attrs.title | html %]</a>
90 [% attrs.title | html %]
94 <td name='myopac_circ_trans_start' class='mobile_hide'>
95 [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
97 date.format(ctx.parse_datetime(ts), DATE_FORMAT);
101 <td name='myopac_circ_trans_due' >
102 [% ts = f.xact.circulation.due_date || f.xact.reservation.end_time || 0;
103 due_org = f.xact.circulation.circ_lib || f.xact.reservation.pickup_lib;
105 date.format(ctx.parse_datetime(ts, due_org), DATE_FORMAT);
109 <td name='myopac_circ_trans_finished' >
110 [% ts = f.xact.circulation.checkin_time || f.xact.reservation.return_time || 0;
112 date.format(ctx.parse_datetime(ts), DATE_FORMAT);
114 <!-- XXX TODO fines aren't really accruing
115 if circ has hit maxfines. more clarity
117 <span class="alert">[% l('(fines accruing)') %]</span>
125 <!-- Disclaimer for mobile -->
126 <span class="mobile_view cc_disclaimer"> <strong>*</strong>Items may have been renewed. </span>
130 [% IF ctx.fines.grocery.size > 0 %]
131 <!-- Table for all non-circulation transactions -->
132 <div id='myopac_trans_div'>
134 <div class="header_middle">
135 <span class="acct_fines_header">
137 [% IF myopac_cc_allowed %]
138 [% l("Pay Selected Other Charges") %]
140 [% l("Other Charges") %]
146 <table id="acct_fees_main_header" class="table_no_border_space table_no_cell_pad"title="[% l('Other Fines and Fees') %]">
150 [% IF myopac_cc_allowed %]
151 <th nowrap="nowrap" style="white-space:nowrap;">
152 <input id="pay_fines_box2" checked="checked"
153 type="checkbox" onclick="select_all_checkboxes('xact_misc', this.checked)"
154 title="[% l('Click to (un)select all fines') %]" />
157 <th >[% l("Owed") %]</th>
158 <th >[% l("Billing Type") %]</th>
159 <th >[% l("Note") %]</th>
160 <th >[% l("Date") %]</th>
165 <tbody id='myopac_trans_tbody'>
166 [% FOR f IN ctx.fines.grocery %]
167 <tr id='myopac_trans_row'>
169 [% IF myopac_cc_allowed %]
171 <input type="checkbox" title='[% l("Pay this fine") %]'
172 name="xact_misc" value="[% f.xact.id %]"
179 [% money(f.xact.balance_owed) %]
183 <td>[% f.xact.last_billing_type %]</td>
186 [% f.xact.last_billing_note %]
190 ctx.parse_datetime(f.xact.xact_start),
201 [% UNLESS ctx.fines.grocery.size OR ctx.fines.circulation.size %]
202 <div>[% l('You have no current fines.') %]</div>
203 [% ELSIF myopac_cc_allowed %]
204 <div class="text-left pad-top-ten">
206 value="[% l('Pay selected charges') %]"
207 title="[% l('Pay selected charges') %]"
208 class="opac-button" />
211 [% IF myopac_cc_allowed %]