1 [% PROCESS "default/opac/parts/header.tt2";
2 PROCESS "default/opac/parts/misc_util.tt2";
3 WRAPPER "default/opac/parts/myopac/main_base.tt2";
5 myopac_main_page = "main";
7 <form action="[% ctx.opac_root %]/myopac/main_payment_form" method="GET">
8 [% IF ctx.fines.circulation.size > 0 %]
9 <div id='myopac_circ_trans_div'>
10 <table width='100%' class='data_grid'>
13 <td colspan='10' style='padding: 6px'>
14 <strong>[% l("Fines") %]</strong>
18 <td>[% l("Title") %]</td>
19 <td>[% l("Author") %]</td>
20 <td>[% l("Checkout Date") %]</td>
21 <td>[% l("Due Date") %]</td>
22 <td>[% l("Date Returned") %]</td>
23 <td>[% l("Balance Owed") %]</td>
24 <td nowrap="nowrap" style="white-space:nowrap;">
25 <!-- XXX TODO select all js --><input id="pay_fines_box1" checked="checked"
26 type="checkbox" title="[% l('Click to (un)select all fines') %]" />
27 <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
31 <tbody id='myopac_circ_trans_tbody'>
32 [% FOR f IN ctx.fines.circulation;
33 attrs = {marc_xml => f.marc_xml};
35 PROCESS get_marc_attrs args=attrs;
36 ELSIF f.xact.reservation;
37 attrs.title = f.xact.reservation.target_resource_type.name;
39 <tr id='myopac_circ_trans_row'>
41 [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id;
43 <a href="[% ctx.opac_root %]/record/[% recid %]">[% attrs.title %]</a>
49 <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
51 <td name='myopac_circ_trans_start'>
52 [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
54 date.format(ctx.parse_datetime(ts), DATE_FORMAT);
57 <td name='myopac_circ_trans_due'>
58 [% ts = f.xact.circulation.due_date || f.xact.reservation.end_time || 0;
60 date.format(ctx.parse_datetime(ts), DATE_FORMAT);
63 <td name='myopac_circ_trans_finished'>
64 [% ts = f.xact.circulation.checkin_time || f.xact.reservation.return_time || 0;
66 date.format(ctx.parse_datetime(ts), DATE_FORMAT);
68 <!-- XXX TODO fines aren't really accruing
69 if circ has hit maxfines. more clarity
71 <span class="red">[% l('(fines accruing)') %]</span>
76 [% money(f.xact.balance_owed) %]
80 <input type="checkbox" checked="checked"
81 title="[% l('Pay this fine') %]" name="xact" value="[% f.xact.id %]" />
90 [% IF ctx.fines.grocery.size > 0 %]
91 <!-- Table for all non-circulation transactions -->
92 <div id='myopac_trans_div'>
94 <hr class='opac-auto-013' color="#dcdbdb" />
96 <table width='100%' class='data_grid data_grid_center'
97 id='myopac_trans_table'>
100 <td colspan='8' style='padding: 6px'>
101 <b>[% l("Other Fees") %]</b>
105 <td width='16%'>[% l("Transaction Start Time") %]</td>
106 <td width='16%'>[% l("Last Payment Time") %]</td>
107 <td width='16%'>[% l("Initial Amount Owed") %]</td>
108 <td width='16%'>[% l("Total Amount Paid") %]</td>
109 <td width='16%'>[% l("Balance Owed") %]</td>
110 <td width='16%'>[% l("Billing Type") %]</td>
111 <td width='4%' align="center" nowrap="nowrap"
112 style="white-space:nowrap;">
113 <input id="pay_fines_box2" checked="checked"
115 title="[% l('Click to (un)select all fines') %]" />
116 <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
120 <tbody id='myopac_trans_tbody'>
121 [% FOR f IN ctx.fines.grocery %]
122 <tr id='myopac_trans_row'>
124 ctx.parse_datetime(f.xact.xact_start),
128 [% IF f.xact.last_payment_ts;
131 f.xact.last_payment_ts
136 <td>[% money(f.xact.total_owed) %]</td>
137 <td>[% money(f.xact.total_paid) %]</td>
140 [% money(f.xact.balance_owed) %]
143 <td>[% f.xact.last_billing_type %]</td>
145 <input type="checkbox" title='[% l("Pay this fine") %]'
146 name="xact" value="[% f.xact.id %]" />
154 [% UNLESS ctx.fines.grocery.size OR ctx.fines.circulation.size %]
155 <div>[% l('You have no current fines.') %]</div>
157 <div class="text-right pad-top-ten">
159 alt="[% l('Pay selected fines') %]"
160 title="[% l('Pay selected fines') %]"
161 onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
162 onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
163 src="[% ctx.media_prefix %]/images/pay-fines-btn.png" />