LP1454879: Add Account Expiration Date to OPAC
authorTerran McCanna <tmccanna@georgialibraries.org>
Fri, 15 May 2015 17:18:15 +0000 (10:18 -0700)
committerBen Shum <bshum@biblio.org>
Tue, 28 Jul 2015 20:47:06 +0000 (16:47 -0400)
Added Account Expiration Date to OPAC My Account display on
Account Summary page and Account Preferences page. This is in
response to patron requests to know when their accounts will
expire before the point at which they actually expire.

To test, log into My Account through the OPAC - a new table row
with account expiration date should appear on the main account
summary page, and another new row should appear on the main
account preferences page.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/myopac/prefs.tt2
Open-ILS/src/templates/opac/parts/myopac/main_base.tt2

index a8e1d19..f2462a5 100644 (file)
                 <td class='light_border'>[% date.format(ctx.parse_datetime(ctx.user.create_date), DATE_FORMAT) %]</td>
                 <td></td>
             </tr>
+            <tr>
+                <td class='color_4 light_border'>[% l("Account Expiration Date") %]</td>
+                <td class='light_border'>
+                    [%- IF date.format(ctx.parse_datetime(ctx.user.expire_date), '%s') < date.format(date.now , '%s'); -%]
+                        <span class="alert" style="font-weight:bold;">[% date.format(ctx.parse_datetime(ctx.user.expire_date), DATE_FORMAT) %]</span>
+                        </td>
+                    [% ELSE %]
+                        [% date.format(ctx.parse_datetime(ctx.user.expire_date), DATE_FORMAT) %]
+                    [% END %]
+                </td>
+                <td></td>
+            </tr>
         </tbody>
     </table><br />
     <hr class='opac-auto-013' color="#DCDBDB" />
index 86f3488..bf84e80 100644 (file)
             </div>
             <table class="acct_sum_table" title="[% l('Account Summary') %]">
                 <tr>
+                    <td>[% l("Account Expiration Date") %]</td>
+                    <td align="right">
+                        [% date.format(ctx.parse_datetime(ctx.user.expire_date), DATE_FORMAT) %]
+                    </td>
+                </tr>
+                <tr>
                     <td>[% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %]</td>
                     <td align="right">
                         <a href="[% mkurl(ctx.opac_root _ '/myopac/circs') %]"