more tweaks based on feedback from CW/MARS
authorJason Etheridge <jason@esilibrary.com>
Mon, 25 Feb 2013 20:20:43 +0000 (15:20 -0500)
committerJason Etheridge <jason@esilibrary.com>
Thu, 28 Mar 2013 16:49:13 +0000 (12:49 -0400)
Thanks! This restores the original address scheme to the patron display summary,
where the mailing address is displayed under the patron name, if set and valid,
otherwise the billing address is displayed, if set and valid.  No address is
displayed if there is no valid address set for mailing or billing.

This also adds a potential 'Account has EXPIRED' message to the alerts column.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/templates/opac/PatronSummary.tt2

index 9832bdd..ccae83f 100644 (file)
                                 ctx.user.suffix
                             ) | html %]
                         </span><br/>
+                        [% IF ctx.addr %]
+                        <span>
+                            [% ctx.addr.street1 | html %]<br/>
+                            [% ctx.addr.street2 | html %]<br/>
+                            [% ctx.addr.city | html %],
+                            [% ctx.addr.state | html %]
+                            [% ctx.addr.post_code | html %]
+                        </span><br/>
+                        [% END %]
+                    </div>
+                </div><div class="cell">
+                    <div class="textBackground alerts">
                         [% IF ctx.barred %]
                         <span>
                             [% l('Patron is BARRED') | html %]
                         </span><br/>
                         [% END %]
+                        [% expire_date = ctx.parse_datetime(ctx.user.expire_date); %]
+                        [% IF (date.format(expire_date, '%s') < date.now) %]
+                        <span>
+                            [% l('Account has EXPIRED') | html %]
+                        </span><br/>
+                        [% END %]
                         [% IF ctx.holds_count.ready > 0 %]
                         <span>
                             [% IF ctx.holds_count.ready == 1 %]
                             [% ctx.user.alert_message | html %]
                         </span><br/>
                         [% END %]
+                        [% IF ctx.user.notes.size > 0 %]
+                        <span>
                         [% IF ctx.user.notes.size == 1 %]
                             [% l('1 note') | html %]
                         [% ELSIF ctx.user.notes.size > 1 %]
                             [% l('[_1] notes', ctx.user.notes.size) | html %]
                         [% END %]
-                    </div>
-                </div><div class="cell">
-                    <div class="textBackground alerts">
+                        </span><br/>
+                        [% END %]
                         [% FOREACH p IN ctx.user.standing_penalties %]
                         <span>
                             [% p.standing_penalty.label | html %]