]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
Clean up the account summary table HTML.
[working/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' style="padding:0px;">
7
8     <div style="width:742px;float: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         <div style="position:absolute;">
20             <div style="position:relative;top:-15px;left:-23px;">
21                 <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tl.png" />
22             </div>
23         </div>
24         <div style="position:absolute;">
25             <div style="position:relative;top:-15px;left:172px;">
26                 <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tr.png" />
27             </div>
28         </div>
29         <div style="position:absolute;">
30             <div style="position:relative;top:161px;left:-23px;">
31                 <img src="[% ctx.media_prefix %]/images/acct_sum_fines_bl.png" />
32             </div>
33         </div>
34         <div style="position:absolute;">
35             <div style="position:relative;top:161px;left:172px;">
36                 <img src="[% ctx.media_prefix %]/images/acct_sum_fines_br.png" />
37             </div>
38         </div>
39         [% l('Fines:') %]
40         <span class='[% ctx.user_stats.fines.balance_owed ? "alert" : ""%]'>
41             [% money(ctx.user_stats.fines.balance_owed) %]
42         </span><br />
43         [% IF (ctx.fines.grocery.size OR ctx.fines.circulation.size) AND ctx.get_org_setting(ctx.user.home_ou, 'credit.payments.allow') == 1 %]
44         <form action="[% ctx.opac_root %]/myopac/main_payment_form" method="get"><input
45             type="submit" title="[% l('Pay Fines') %]" alt="[% l('Pay Fines') %]"
46             value="[% l('Pay Fines') %]" class="pos-rel-top-5 opac-button" /></form>
47         [% END %]
48     </div>
49     [% END %]
50
51     <div style="width:662px;">
52         <div style="float:left;">
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">
61                 <tr>
62                         <td>[% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %]</td>
63                         <td align="right">
64                             <a href="[% mkurl(ctx.opac_root _ '/myopac/circs') %]">[% l("View All") %]</a>
65                         </td>
66                 </tr>
67                 <tr>
68                         <td>[% l('Items Currently on Hold ([_1])', ctx.user_stats.holds.total) %]</td>
69                         <td align="right">
70                             <a href="[% mkurl(ctx.opac_root _ '/myopac/holds') %]">[% l('View All') %]</a>
71                         </td>
72                 </tr>
73                 <tr>
74                         <td>[% l('Items ready for pickup ([_1])', ctx.user_stats.holds.ready) %]</td>
75                         <td align="right">
76                             <a href="[% mkurl(ctx.opac_root _ '/myopac/holds', {available => 1}) %]">[% l('View All') %]</a>
77                         </td>
78                 </tr>
79             </table>
80         </div>
81     </div>
82     <div class="clear-both"></div>
83
84     [% IF ctx.user.notes.0 %]
85     <table class="acct_notes">
86         <thead><th>[% l('Note title') %]</th><th>[% l('Content') %]</th></thead>
87         <tbody>
88         [% FOR note IN ctx.user.notes %]
89             <tr><td class='public-note-title'>[% note.title | html %]</td><td>[% note.value | html %]</td></tr>
90         [% END %]
91         </tbody>
92     </table>
93     [% END %]
94
95     <div id='fines_payments_wrapper'>
96         <div id='acct_fines_tabs'>
97             [% IF myopac_main_page == 'main' %]
98             <a href='#' class="acct-tab-on">[% l("Fines") %]</a>
99             <a href='[% mkurl(ctx.opac_root _ '/myopac/main_payments') %]' class="acct-tab-off">[% l("Payments") %]</a>
100             [% ELSE %]
101             <a href='[% mkurl(ctx.opac_root _ '/myopac/main') %]' class="acct-tab-off">[% l("Fines") %]</a>
102             <a href='#' class="acct-tab-on">[% l("Payments") %]</a>
103             [% END %]
104         </div>
105     </div>
106     [% content %]
107 </div>
108 [% END %]