From: Jason Etheridge Date: Mon, 16 Sep 2013 18:52:44 +0000 (-0400) Subject: tweaks to Patron Summary X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=25ef09c2ddb5bf40db299ad602d8345273e544c7;p=working%2FEvergreen.git tweaks to Patron Summary This commit re-uses the same template for the Patron Summary in both display and search contexts. The original one for the display context was the one kept and is the base for these additional changes: * Card: has been repositioned * DOB: and EXP: have been added * only one phone number is displayed, the order of precedence being Day, Evening, and Other. In other words, if the Day phone is not set, then the Evening phone is displayed instead. And if Evening phone is not set, then Other phone is displayed * Bills: is styled in red and bold, if the amount is greater than $0.00 * If an email address is not set, then the text "Confirm the email address" is displayed in the alerts/messages column * Card: is hyperlinked and copies the barcode to the clipboard if clicked Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/src/templates/base_nodojo.tt2 b/Open-ILS/src/templates/base_nodojo.tt2 index dc2197d378..619630e4e9 100644 --- a/Open-ILS/src/templates/base_nodojo.tt2 +++ b/Open-ILS/src/templates/base_nodojo.tt2 @@ -6,6 +6,7 @@ + [% INCLUDE "opac/parts/xuljs.tt2" IF ctx.page == 'patron_summary' AND ctx.is_staff %] [% content %] diff --git a/Open-ILS/src/templates/opac/PatronSearchSummary.tt2 b/Open-ILS/src/templates/opac/PatronSearchSummary.tt2 deleted file mode 100644 index 14cc52a981..0000000000 --- a/Open-ILS/src/templates/opac/PatronSearchSummary.tt2 +++ /dev/null @@ -1,135 +0,0 @@ -[% PROCESS "opac/parts/header.tt2"; - WRAPPER "base_nodojo.tt2" - extracss="/eg/opac/css/PatronSummary.css"; - ctx.page_title = l("Patron Summary") %] -
-
-
- [% IF NOT ctx.error %] -
-
-
- - [% l( - HUMAN_NAME_FORMAT, - ctx.user.prefix, ctx.user.first_given_name, - ctx.user.second_given_name, ctx.user.family_name, - ctx.user.suffix - ) | html %] -
- - [% l( - 'Card: [_1]', - ctx.user.card.barcode - ) | html %] -
- [% IF ctx.user.mailing_address %] - - [% ctx.user.mailing_address.street1 | html %]
- [% ctx.user.mailing_address.street2 | html %]
- [% ctx.user.mailing_address.city | html %], - [% ctx.user.mailing_address.state | html %] - [% ctx.user.mailing_address.post_code | html %] -

- [% END %] -
-
-
- - [% ctx.user.email OR ' ' | html %] -
- - [% l( - 'OPAC: [_1]', - ctx.user.usrname - ) | html %] -
- [% IF ctx.user.billing_address %] - - [% ctx.user.billing_address.street1 | html %]
- [% ctx.user.billing_address.street2 | html %]
- [% ctx.user.billing_address.city | html %], - [% ctx.user.billing_address.state | html %] - [% ctx.user.billing_address.post_code | html %] -

- [% END %] -
-
-
- - [% l('D: [_1] ', ctx.user.day_phone) | html %]
- [% l('E: [_1] ', ctx.user.evening_phone) | html %]
- [% l('O: [_1] ', ctx.user.other_phone) | html %]
-
- [% IF ctx.user.ident_value %] - - [% l( - '[_1]: [_2]', - ctx.user.ident_type.name, - ctx.user.ident_value - ) | html %] -
- [% END %] - [% IF ctx.user.ident_value2 %] - - [% l( - '[_1]: [_2]', - ctx.user.ident_type2.name, - ctx.user.ident_value2 - ) | html %] -
- [% END %] -
-
-
- [% ctx.user.profile.name | html %]
- [% ctx.user.home_ou.shortname | html %]
- - [% l( - 'Items Overdue: [_1] Total: [_2]', - ctx.checked_out_count.overdue + ctx.checked_out_count.long_overdue, - ctx.checked_out_count.out - ) | html %] -
- - [% l( - 'Holds Ready: [_1] Total: [_2]', - ctx.holds_count.ready, - ctx.holds_count.total - ) | html %] -
- - [% IF ctx.money_open_user_summary %] - [% l( - 'Bills: [_1]', - ctx.money_open_user_summary.balance_owed - ) | html %] - [% ELSE %] - [% l( - 'Bills: [_1]', - '0.00' - ) | html %] - [% END %] -
-
-
-
- [% ELSE %] -
- - Error loading user with database id = [% ctx.au_id | html %] -
- - Description: [% ctx.error.desc | html %] -
- Server Time: [% ctx.error.servertime | html %]
- Text Code: [% ctx.error.textcode | html %]
- ILS Event: [% ctx.error.ilsevent | html %]
- PID: [% ctx.error.pid | html %]
- Stack Trace: [% ctx.error.stacktrace | html %]
-
- [% END %] -
-
-
-[% END %] diff --git a/Open-ILS/src/templates/opac/PatronSearchSummary.tt2 b/Open-ILS/src/templates/opac/PatronSearchSummary.tt2 new file mode 120000 index 0000000000..04db751be1 --- /dev/null +++ b/Open-ILS/src/templates/opac/PatronSearchSummary.tt2 @@ -0,0 +1 @@ +PatronSummary.tt2 \ No newline at end of file diff --git a/Open-ILS/src/templates/opac/PatronSummary.tt2 b/Open-ILS/src/templates/opac/PatronSummary.tt2 index ccae83fc56..36c932cd10 100644 --- a/Open-ILS/src/templates/opac/PatronSummary.tt2 +++ b/Open-ILS/src/templates/opac/PatronSummary.tt2 @@ -17,6 +17,12 @@ ctx.user.suffix ) | html %]
+ + [% l( + 'Card: [_1]', + ctx.user.card.barcode + ) | html %] +
[% IF ctx.addr %] [% ctx.addr.street1 | html %]
@@ -40,6 +46,9 @@ [% l('Account has EXPIRED') | html %]

[% END %] + [% IF NOT ctx.user.email %] + [% l('Confirm the email address') | html %] + [% END %] [% IF ctx.holds_count.ready > 0 %] [% IF ctx.holds_count.ready == 1 %] @@ -75,22 +84,40 @@
- [% l('D: [_1] ', ctx.user.day_phone) | html %]
- [% l('E: [_1] ', ctx.user.evening_phone) | html %]
- [% l('O: [_1] ', ctx.user.other_phone) | html %]
+ [% IF ctx.user.day_phone %] + [% l('D: [_1] ', ctx.user.day_phone) | html %]
+ [% ELSIF ctx.user.evening_phone %] + [% l('E: [_1] ', ctx.user.evening_phone) | html %]
+ [% ELSIF ctx.user.other_phone %] + [% l('O: [_1] ', ctx.user.other_phone) | html %]
+ [% END %]
+ [% ctx.user.email OR ' ' | html %] +
+ [% l( - 'Card: [_1]', - ctx.user.card.barcode + 'OPAC: [_1]', + ctx.user.usrname ) | html %]
[% l( - 'OPAC: [_1]', - ctx.user.usrname + 'DOB: [_1]', + ctx.user.dob + ? date.format( ctx.parse_datetime(ctx.user.dob), DATE_FORMAT) + : '' + ) | html %] +
+ + [% l( + 'EXP: [_1]', + ctx.user.expire_date + ? date.format( ctx.parse_datetime(ctx.user.expire_date), DATE_FORMAT) + : '' ) | html %]
+
@@ -110,13 +137,14 @@ ctx.holds_count.total ) | html %]
- [% IF ctx.money_open_user_summary %] + [% l( 'Bills: [_1]', ctx.money_open_user_summary.balance_owed ) | html %] [% ELSE %] + [% l( 'Bills: [_1]', '0.00' diff --git a/Open-ILS/src/templates/opac/css/PatronSummary.css.tt2 b/Open-ILS/src/templates/opac/css/PatronSummary.css.tt2 index 0ccccdd9d2..b1b46d9238 100644 --- a/Open-ILS/src/templates/opac/css/PatronSummary.css.tt2 +++ b/Open-ILS/src/templates/opac/css/PatronSummary.css.tt2 @@ -33,6 +33,7 @@ body { font-weight: bold; overflow: auto; } +.click_link { text-decoration: underline; color: blue; -moz-user-focus: normal; cursor: pointer; } .patronNameLarge { font-weight: bold; } .patronSummaryDiv { border: solid thick transparent; padding: 10px; } .NO_PENALTIES .patronSummaryDiv { border-color: lime; } @@ -40,6 +41,7 @@ body { .MULTIPLE_PENALTIES .patronSummaryDiv { border-color: #FF6633; } .PATRON_HAS_STAFF_ALERT .patronSummaryDiv { border-color: blue; } .PATRON_HAS_BILLS .patronSummaryDiv { border-color: #FFC266; } +.PATRON_HAS_BILLS .bills_line { font-weight: bold; color: red; } .PATRON_HAS_OVERDUES .patronSummaryDiv { border-color: #FFC266; } .PATRON_EXCEEDS_CHECKOUT_COUNT .patronSummaryDiv { border-color: #C99DFF; } .PATRON_EXCEEDS_OVERDUE_COUNT .patronSummaryDiv { border-color: #C99DFF; } diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2 index ed68480402..529aff89eb 100644 --- a/Open-ILS/src/templates/opac/parts/js.tt2 +++ b/Open-ILS/src/templates/opac/parts/js.tt2 @@ -38,6 +38,7 @@ [% END %] [% END %] + [% INCLUDE "opac/parts/xuljs.tt2" IF ctx.page == 'patron_summary' %] [%- END %] [%- IF ENV.OILS_NOVELIST_URL AND ctx.page == 'record'; diff --git a/Open-ILS/src/templates/opac/parts/xuljs.tt2 b/Open-ILS/src/templates/opac/parts/xuljs.tt2 new file mode 100644 index 0000000000..a1baf1a6d7 --- /dev/null +++ b/Open-ILS/src/templates/opac/parts/xuljs.tt2 @@ -0,0 +1,16 @@ + +