]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/main_payments.tt2
LP#1268636 additional myopac nav headers
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / main_payments.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/misc_util.tt2";
3     WRAPPER "opac/parts/myopac/main_base.tt2";
4     myopac_page = "main";
5     myopac_main_page = "payments";
6     limit = ctx.payment_history_limit;
7     offset = ctx.payment_history_offset;
8 %]
9
10 <h3 class="sr-only">[% l('Transaction Payments') %]</h3>
11 <div>
12     <div class="header_middle">
13         <span class="float-left">[% l('Payments History') %]</span>
14         <span class='float-left' style='padding-left: 10px;'>
15             <a href='main_payments?limit=[% limit %]&amp;offset=[% offset - limit %]'
16                 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
17             [%# TODO: get total to prevent paging off then end of the list.. %]
18             <a href='main_payments?limit=[% limit %]&amp;offset=[% offset + limit %]'
19                [% IF ctx.payments.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
20         </span>
21     </div>
22     <div class="clear-both"></div>
23
24     [% IF ctx.payments.size %]
25     <table title="[% l('Payments') %]" 
26         class='myopac_payments_table data_grid' width='100%'>
27         <thead><tr>
28             <th>[% l('Payment Date') %]</th>
29             <th>[% l('Payment For') %]</th>
30             <th>[% l('Amount') %]</th>
31             <th>[% l('Receipt') %]</th> 
32         </tr></thead>
33         <tbody>
34             [% FOR payment IN ctx.payments %]
35             <tr>
36                 <td>[% date.format(ctx.parse_datetime(payment.mp.payment_ts), DATE_FORMAT) %]</td>
37                 <td>[% 
38                     btype = payment.last_billing_type | html;
39                     ptitle = payment.title | html;
40                     (payment.xact_type == 'grocery') ? btype : ptitle
41                 %]</td>
42                 <td>[% money(payment.mp.amount) %]</td>
43                 <td>
44                     <form action="[% ctx.opac_root %]/myopac/receipt_print" method="post">
45                         <input type="hidden" name="payment" value="[% payment.mp.id %]" />
46                         <input type="submit" value="[% l('Print') %]" />
47                     </form>
48                     <form action="[% ctx.opac_root %]/myopac/receipt_email" method="post">
49                         <input type="hidden" name="payment" value="[% payment.mp.id %]" />
50                         <input type="submit" value="[% l('Email') %]" />
51                     </form>
52                 </td>
53             </tr>
54             [% END %]
55         </tbody>
56     </table>
57     [% ELSE %]
58     <div>[% l('You have no historical payments to display.') %]</div>
59     [% END %]
60 </div>
61 [% END %]