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 FOR f IN ctx.fines.circulation;
12 IF f.xact.balance_owed <= 0; neg_or_zero = neg_or_zero + 1; END;
14 FOR f IN ctx.fines.grocery;
15 IF f.xact.balance_owed <= 0; neg_or_zero = neg_or_zero + 1; END;
17 IF neg_or_zero > 0; myopac_cc_allowed = 0; END
19 <h3 class="sr-only">[% l('My Account Summary') %]</h3>
20 [% IF myopac_cc_allowed;
21 # http://www.w3.org/TR/WCAG20-TECHS/H32.html
22 # avoid forms w/ no submit action %]
23 <form action="[% ctx.opac_root %]/myopac/main_payment_form#payment" method="get" id="selected_fines">
26 [% IF ctx.fines.circulation.size > 0 %]
27 <div id='myopac_circ_trans_div'>
28 <!--moved tables heading to outside of the table itself - took internal styling -->
29 <div class="header_middle">
30 <span class="acct_fines_header">
31 <!-- Different heading when not able to pay -->
32 [% IF myopac_cc_allowed %]
33 [% l("Pay Selected Circulation Charges") %]
35 [% l("Circulation Charges") %]
41 <table id="acct_fines_main_header" class="table_no_border_space table_no_cell_pad" title="[% l('Items Checked Out') %]">
46 [% IF myopac_cc_allowed %]
47 <th nowrap="nowrap" style="white-space:nowrap;">
48 <input id="pay_fines_box1" checked="checked"
49 type="checkbox" onclick="select_all_checkboxes('xact', this.checked)"
50 title="[% l('Click to (un)select all charges') %]" />
53 <th>[% l("Owed") %]</th>
54 <th class="mobile_hide">[% l("Billing Type") %]</th>
55 <th>[% l("Title") %]</th>
56 <th class='mobile_hide'>[% l("Checkout") %]</th>
57 <th>[% l(" Due ") %]</th>
59 <span class="mobile_hide">[% l(" Returned/Renewed") %]</span>
60 <span class="mobile_view">[% l(" Returned*") %]</span>
65 <tbody id='myopac_circ_trans_tbody'>
66 [% FOR f IN ctx.fines.circulation;
67 attrs = {marc_xml => f.marc_xml};
69 PROCESS get_marc_attrs args=attrs;
70 ELSIF f.xact.reservation;
71 attrs.title = f.xact.reservation.target_resource_type.name;
73 <tr id='myopac_circ_trans_row'>
74 [% IF myopac_cc_allowed %]
76 <input type="checkbox" checked="checked"
77 title="[% l('Pay this fine') %]" name="xact"
78 value="[% f.xact.id %]" />
83 <strong class="alert">
84 [% money(f.xact.balance_owed)%]
88 <td class="mobile_hide">
89 [% f.xact.last_billing_type %]
93 [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id;
95 <a href="[% mkurl(ctx.opac_root _ '/record/' _ recid,
96 {loc => ctx.search_ou}) %]">[% attrs.title | html %]</a>
98 [% attrs.title | html %]
102 <td name='myopac_circ_trans_start' class='mobile_hide'>
103 [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
105 date.format(ctx.parse_datetime(ts), DATE_FORMAT);
109 <td name='myopac_circ_trans_due' >
110 [% ts = f.xact.circulation.due_date || f.xact.reservation.end_time || 0;
111 due_org = f.xact.circulation.circ_lib || f.xact.reservation.pickup_lib;
113 date.format(ctx.parse_datetime(ts, due_org), DATE_FORMAT);
117 <td name='myopac_circ_trans_finished' >
118 [% ts = f.xact.circulation.checkin_time || f.xact.reservation.return_time || 0;
120 date.format(ctx.parse_datetime(ts), DATE_FORMAT);
122 <!-- XXX TODO fines aren't really accruing
123 if circ has hit maxfines. more clarity
125 <span class="alert">[% l('(fines accruing)') %]</span>
133 <!-- Disclaimer for mobile -->
134 <span class="mobile_view cc_disclaimer"> <strong>*</strong>Items may have been renewed. </span>
138 [% IF ctx.fines.grocery.size > 0 %]
139 <!-- Table for all non-circulation transactions -->
140 <div id='myopac_trans_div'>
142 <div class="header_middle">
143 <span class="acct_fines_header">
145 [% IF myopac_cc_allowed %]
146 [% l("Pay Selected Other Charges") %]
148 [% l("Other Charges") %]
154 <table id="acct_fees_main_header" class="table_no_border_space table_no_cell_pad"title="[% l('Other Fines and Fees') %]">
158 [% IF myopac_cc_allowed %]
159 <th nowrap="nowrap" style="white-space:nowrap;">
160 <input id="pay_fines_box2" checked="checked"
161 type="checkbox" onclick="select_all_checkboxes('xact_misc', this.checked)"
162 title="[% l('Click to (un)select all fines') %]" />
165 <th >[% l("Owed") %]</th>
166 <th >[% l("Billing Type") %]</th>
167 <th >[% l("Note") %]</th>
168 <th >[% l("Date") %]</th>
173 <tbody id='myopac_trans_tbody'>
174 [% FOR f IN ctx.fines.grocery %]
175 <tr id='myopac_trans_row'>
177 [% IF myopac_cc_allowed %]
179 <input type="checkbox" title='[% l("Pay this fine") %]'
180 name="xact_misc" value="[% f.xact.id %]"
187 [% money(f.xact.balance_owed) %]
191 <td>[% f.xact.last_billing_type %]</td>
194 [% f.xact.last_billing_note %]
198 ctx.parse_datetime(f.xact.xact_start),
209 [% UNLESS ctx.fines.grocery.size OR ctx.fines.circulation.size %]
210 <div>[% l('You have no current fines.') %]</div>
211 [% ELSIF myopac_cc_allowed %]
212 [% IF neg_or_zero > 0 %]
213 <div class="text-left pad-top-ten">[% l('There are negative bills on your account that must be resolved before you are able to make a payment. Please contact your library for assistance.') %]
215 <div class="text-left pad-top-ten">
217 value="[% l('Pay selected charges') %]"
218 title="[% l('Pay selected charges') %]"
219 class="opac-button" />
223 [% IF myopac_cc_allowed %]