]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
LP 2061136 follow-up: ng lint --fix
[Evergreen.git] / Open-ILS / src / templates / opac / parts / myopac / main_base.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/misc_util.tt2";
3     WRAPPER "opac/parts/myopac/base.tt2";
4 %]
5
6 <div id='myopac_summary_div'>
7
8     <div class='div-left'>
9         <div class="header_middle">[% l('Account Summary') %]</div>
10     </div>
11
12     <!-- fines summary along the right of the page -->
13     [% IF myopac_main_page == "payment_form" OR (
14         !ctx.fines.circulation.size AND !ctx.fines.grocery.size
15     ) %]
16     <div id="myopac_sum_fines_placehold"></div>
17     [% ELSE %]
18     <div id="myopac_sum_fines">
19         [% l('Charges:') %]
20         <span class='[% ctx.user_stats.fines.balance_owed ? "alert" : ""%]'>
21             [% money(ctx.user_stats.fines.balance_owed) %]
22         </span><br />
23         [%
24             allow_pay_all_charges = 0;
25             IF (ctx.fines.grocery.size OR ctx.fines.circulation.size) AND ctx.get_org_setting(ctx.user.home_ou, 'credit.payments.allow') == 1;
26                 allow_pay_all_charges = 1;
27             END;
28             neg_or_zero = 0;
29             FOR f IN ctx.fines.circulation;
30                 IF f.xact.balance_owed <= 0; neg_or_zero = neg_or_zero + 1; END;
31             END;
32             FOR f IN ctx.fines.grocery;
33                 IF f.xact.balance_owed <= 0; neg_or_zero = neg_or_zero + 1; END;
34             END;
35             IF neg_or_zero > 0; allow_pay_all_charges = 0; END
36         %]
37         [% IF allow_pay_all_charges %]
38        <form action="[% ctx.opac_root %]/myopac/main_payment_form" method="get"><input
39             type="submit" title="[% l('Pay All Charges') %]"
40             value="[% l('Pay All Charges') %]" class="pos-rel-top-5 opac-button" /></form>
41         <br />
42           <a href="#selected_fines" class="opac-button">[% l('View Charges') %]</a>
43           <img alt="[% l('Credit Card Logo') %]" src="[% ctx.media_prefix %]/images/credit_card_logo.png" class="cc_logo_img"/>
44          <!--added next two lines to add spacing when not accepting credit card payments -->
45        [% ELSE %]
46           <br />
47        [% END %]
48     </div>
49     [% END %]
50
51     <div>
52         <div id="acct_sum_block">
53             <div style="padding:10px 0px;">
54             [%- IF date.format(ctx.parse_datetime(ctx.user.expire_date), '%s') < date.format(date.now , '%s');
55                fmt_expire_date = date.format(ctx.parse_datetime(ctx.user.expire_date), DATE_FORMAT);
56             %]
57             <span class="alert">[% l("Your library card expired on [_1]. Please contact a librarian to resolve this issue.", fmt_expire_date) %]</span>
58             [% END %]
59             </div>
60             <table class="acct_sum_table" title="[% l('Account Summary') %]">
61                 <tr>
62                     <td>[% l("Account Expiration Date") %]</td>
63                     <td class='td-right'>
64                         [% date.format(ctx.parse_datetime(ctx.user.expire_date), DATE_FORMAT) %]
65                     </td>
66                 </tr>
67                 <tr>
68                     <td>[% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %]</td>
69                     <td class='td-right'>
70                         <a href="[% mkurl(ctx.opac_root _ '/myopac/circs') %]"
71                             title="[% l('View My Checked Out Items') %]">
72                             [% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %]
73                         </a>
74                     </td>
75                     <td class="td-right hidden" id="acct_sum_ebook_circs">
76                         <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_circs') %]"
77                             title="[% l('View My Checked Out E-Items') %]">
78                             [% l("E-Items Currently Checked out") %] (<span id="acct_sum_ebook_circ_total">-</span>)
79                         </a>
80                     </td>
81                 </tr>
82                 <tr>
83                     <td>[% l('Items Currently on Hold ([_1])', ctx.user_stats.holds.total) %]</td>
84                     <td class='td-right'>
85                         <a href="[% mkurl(ctx.opac_root _ '/myopac/holds') %]"
86                             title="[% l('View My Holds') %]">
87                             [% l('Items Currently on Hold ([_1])', ctx.user_stats.holds.total) %]
88                         </a>
89                     </td>
90                     <td class="td-right hidden" id="acct_sum_ebook_holds">
91                         <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_holds') %]"
92                             title="[% l('View My E-Items On Hold') %]">
93                             [% l("E-Items Currently on Hold") %] (<span id="acct_sum_ebook_hold_total">-</span>)
94                         </a>
95                     </td>
96                 </tr>
97                 <tr>
98                     <td>[% l('Items ready for pickup ([_1])', ctx.user_stats.holds.ready) %]</td>
99                     <td class='td-right'>
100                         <a href="[% mkurl(ctx.opac_root _ '/myopac/holds', {available => 1}) %]"
101                             title="[% l('View My Holds Ready for Pickup') %]">
102                             [% l('Items ready for pickup ([_1])', ctx.user_stats.holds.ready) %]
103                         </a>
104                     </td>
105                     <td class="td-right hidden" id="acct_sum_ebook_holds_ready">
106                         <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_holds_ready') %]"
107                             title="[% l('View My E-Items Ready for Pickup') %]">
108                             [% l("E-Items ready for pickup") %] (<span id="acct_sum_ebook_hold_ready_total">-</span>)
109                         </a>
110                     </td>
111                 </tr>
112             </table>
113         </div>
114     </div>
115     <div class="clear-both"></div>
116
117     <div id='fines_payments_wrapper'>
118         <div id='acct_fines_tabs'>
119             [% IF myopac_main_page == 'main' %]
120             <a href='#' class="acct-tab-on">[% l("Charges") %]</a>
121             <a href='[% mkurl(ctx.opac_root _ '/myopac/main_payments') %]' class="acct-tab-off">[% l("Payments") %]</a>
122             [% ELSE %]
123             <a href='[% mkurl(ctx.opac_root _ '/myopac/main') %]' class="acct-tab-off">[% l("Charges") %]</a>
124             <a href='#' class="acct-tab-on">[% l("Payments") %]</a>
125             [% END %]
126         </div>
127     </div>
128     [% content %]
129 </div>
130 [% END %]