From 552928cee45238127b188c078bf309a20f8a8259 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 8 Jan 2014 16:29:15 -0500 Subject: [PATCH] LP#1268636 My account various repairs Signed-off-by: Bill Erickson Signed-off-by: Dan Scott --- Open-ILS/src/templates/opac/css/style.css.tt2 | 1 + .../templates/opac/myopac/circ_history.tt2 | 11 +- Open-ILS/src/templates/opac/myopac/circs.tt2 | 54 +++++---- .../templates/opac/myopac/hold_history.tt2 | 37 +++--- Open-ILS/src/templates/opac/myopac/holds.tt2 | 44 ++++--- Open-ILS/src/templates/opac/myopac/lists.tt2 | 26 +++-- Open-ILS/src/templates/opac/myopac/main.tt2 | 15 ++- .../opac/myopac/main_payment_form.tt2 | 61 ++++++---- .../templates/opac/myopac/main_payments.tt2 | 3 +- Open-ILS/src/templates/opac/myopac/prefs.tt2 | 107 +++++------------- .../templates/opac/myopac/prefs_my_lists.tt2 | 5 +- .../templates/opac/myopac/prefs_notify.tt2 | 36 +++--- .../templates/opac/myopac/prefs_settings.tt2 | 29 +++-- .../templates/opac/parts/bookbag_actions.tt2 | 5 +- Open-ILS/src/templates/opac/parts/header.tt2 | 22 ++-- .../src/templates/opac/parts/myopac/base.tt2 | 39 ++++--- .../templates/opac/parts/myopac/main_base.tt2 | 49 +++++--- .../opac/parts/myopac/prefs_base.tt2 | 5 +- .../src/templates/opac/parts/result/table.tt2 | 9 +- 19 files changed, 293 insertions(+), 265 deletions(-) diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index 3beb4ee26f..a5220fbf57 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -2004,3 +2004,4 @@ a.preflib_change { table#acct_holds_main_header td:nth-of-type(9):before { content: "[% l('Status') %]"; } table#acct_holds_main_header td.hold_notes:before { content: "[% l('Notes') %]"; } } + diff --git a/Open-ILS/src/templates/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates/opac/myopac/circ_history.tt2 index 4582e81d0b..025f5684fe 100644 --- a/Open-ILS/src/templates/opac/myopac/circ_history.tt2 +++ b/Open-ILS/src/templates/opac/myopac/circ_history.tt2 @@ -26,7 +26,7 @@ limit, offset => (offset + limit)}) %]' [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %] - +
[%- INCLUDE "opac/parts/preserve_params.tt2" %] @@ -36,7 +36,7 @@ [% END %]
- +
@@ -45,7 +45,8 @@ [% ELSE %]
- +
@@ -63,7 +64,9 @@
[% l('Title / Author') %]
[% attrs.title | html %] + [% html_text_attr('title', l('Catalog record [_1]', attrs.title)) %]> + [% attrs.title | html %] + [% IF attrs.author %] / - - - - - - -
- - - - - [% l('Renewing Help') %] -
- +
+ + + + + + + + [% l('Renewing Help') %] + +
+ +
@@ -67,13 +71,14 @@ - + [% FOR circ IN ctx.circs; attrs = {marc_xml => circ.marc_xml}; PROCESS get_marc_attrs args=attrs; %] @@ -121,9 +126,8 @@ [% END; END %] -
[% l('Title / Author') %][% l('Call number') %]
- - + +
[% END %] diff --git a/Open-ILS/src/templates/opac/myopac/hold_history.tt2 b/Open-ILS/src/templates/opac/myopac/hold_history.tt2 index 7276c9dadd..60e9b13ca8 100644 --- a/Open-ILS/src/templates/opac/myopac/hold_history.tt2 +++ b/Open-ILS/src/templates/opac/myopac/hold_history.tt2 @@ -51,17 +51,18 @@ [% l('No holds found.') %] [% ELSE %] - +
- - - - - - - - + + + + + + + + @@ -70,44 +71,44 @@ PROCESS get_marc_attrs args=attrs; ahr = hold.hold.hold %] - + - - - - - - - -
[% l('Title') %][% l('Author') %] [% l('Format') %][% l('Pickup Location') %] [% l('Active On') %][% l('Active') %][% l('Date Fulfilled') %][% l('Status') %][% l('Title') %][% l('Author') %] [% l('Format') %][% l('Pickup Location') %] [% l('Active On') %][% l('Active') %][% l('Date Fulfilled') %][% l('Status') %]
+ + +
[% IF attrs.format_icon %] [% attrs.format_label | html %] [% END %]
+ [% ctx.get_aou(ahr.pickup_lib).name | html %] + [% IF ahr.frozen == 't' AND ahr.thaw_date; date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT); END %] + [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %] + [% IF ahr.fulfillment_time; date.format(ctx.parse_datetime(ahr.fulfillment_time), DATE_FORMAT); END %] +
[% PROCESS get_hold_status hold=hold; %] diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2 index e8ecea93d1..6443b13d2c 100644 --- a/Open-ILS/src/templates/opac/myopac/holds.tt2 +++ b/Open-ILS/src/templates/opac/myopac/holds.tt2 @@ -53,12 +53,13 @@
- +
- - -
- + + + title="[% l('Go') %]" class="opac-button" /> + [% l('Holds Help') %] @@ -92,26 +93,19 @@ [% l("Show all holds") %] | [% l("Show only available holds") %] [% END -%] -
[% IF ctx.holds.size < 1 %]
[% l('No holds found.') %]
[% ELSE %] -
- -
- +
@@ -129,10 +123,11 @@ attrs = {marc_xml => hold.marc_xml}; PROCESS get_marc_attrs args=attrs; ahr = hold.hold.hold %] - [% END %] diff --git a/Open-ILS/src/templates/opac/myopac/lists.tt2 b/Open-ILS/src/templates/opac/myopac/lists.tt2 index 36adee2b0c..e0e1181211 100644 --- a/Open-ILS/src/templates/opac/myopac/lists.tt2 +++ b/Open-ILS/src/templates/opac/myopac/lists.tt2 @@ -5,6 +5,11 @@ limit = ctx.bookbags_limit; offset = ctx.bookbags_offset; item_page = ctx.bookbags_item_page; + bb_publish_text = l( +"Sharing a Bookbag means that the contents " _ +"of the Bookbag will be visible to others. " _ +"To see the public view of a shared Bookbag, " _ +"click on the Bookbag\\'s name in the Bookbag list."); %]
@@ -33,8 +38,12 @@
@@ -450,12 +459,5 @@ [% END %] [% END %] - - -[% l("Sharing a Bookbag means that the contents " _ -"of the Bookbag will be visible to others. " _ -"To see the public view of a shared Bookbag, " _ -"click on the Bookbag's name in the Bookbag list.") %] - [% END %] diff --git a/Open-ILS/src/templates/opac/myopac/main.tt2 b/Open-ILS/src/templates/opac/myopac/main.tt2 index 38d5b4f171..f4c139b3c2 100644 --- a/Open-ILS/src/templates/opac/myopac/main.tt2 +++ b/Open-ILS/src/templates/opac/myopac/main.tt2 @@ -8,10 +8,15 @@ myopac_cc_allowed = 1; END %] +[% IF myopac_cc_allowed; + # http://www.w3.org/TR/WCAG20-TECHS/H32.html + # avoid forms w/ no submit action %] +[% END %] + [% IF ctx.fines.circulation.size > 0 %]
-
- + [% l('Title') %] [% l('Author') %]
- +
@@ -192,7 +187,10 @@ [%- END; END; %]
- Edit + + [% l('Edit') %] + ]
-
+
@@ -107,11 +112,11 @@

+ id='myopac_trans_table' title="[% l('Other Fines and Fees') %]"> @@ -175,10 +180,12 @@
[% END %] +[% IF myopac_cc_allowed %] [% END %] + +[% END %] diff --git a/Open-ILS/src/templates/opac/myopac/main_payment_form.tt2 b/Open-ILS/src/templates/opac/myopac/main_payment_form.tt2 index 93ac28348c..dbc2ca1e47 100644 --- a/Open-ILS/src/templates/opac/myopac/main_payment_form.tt2 +++ b/Open-ILS/src/templates/opac/myopac/main_payment_form.tt2 @@ -34,13 +34,14 @@ [% END %] -
- [% l("Other Fees") %] + [% l("Other Fees") %]
+
[% l('Billing Information') %]

[% l('Selected fines you are paying for:') %]

- +
@@ -84,35 +85,43 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + @@ -130,19 +139,21 @@ --> - - + + - + - + - +
[% l('Name') %]
[% l('First Name') %]
[% l('Last Name') %]
[% l('Email Address') %] - - [% l("Update") %] + + [% l("Update") %]
[% l('Street Address') %]
[% l('City' )%]
[% l('State or Province') %]
[% l('ZIP or Postal Code') %]
[% l('Credit Card Information') %]
[% l('Credit Card #') %]
[% l('Security Code') %] - +
[% l('Expiration Month') %] - @@ -159,9 +170,9 @@
[% l('Expiration Year') %] - [% year = date.format(date.now, '%Y'); y = year; WHILE y < year + 10; # show ten years starting now %] diff --git a/Open-ILS/src/templates/opac/myopac/main_payments.tt2 b/Open-ILS/src/templates/opac/myopac/main_payments.tt2 index c3caa584f2..7351315eb0 100644 --- a/Open-ILS/src/templates/opac/myopac/main_payments.tt2 +++ b/Open-ILS/src/templates/opac/myopac/main_payments.tt2 @@ -21,7 +21,8 @@
[% IF ctx.payments.size %] - +
diff --git a/Open-ILS/src/templates/opac/myopac/prefs.tt2 b/Open-ILS/src/templates/opac/myopac/prefs.tt2 index df1d444148..a495dee1c2 100644 --- a/Open-ILS/src/templates/opac/myopac/prefs.tt2 +++ b/Open-ILS/src/templates/opac/myopac/prefs.tt2 @@ -4,44 +4,9 @@ prefs_page = 'prefs' %]
-
-
[% l('Payment Date') %] [% l('Payment For') %]
- - - - - -
- [% l("Your account expired on") %] - ! - [% l("Please see a librarian to renew your account.") %]
- -
- - - - - - - - - - - - -
- [% l("* Staff Notes *") %]
:

-
- - +
[%- IF ctx.username_change_disallowed %] [%- ELSE %] - + [%- END %] @@ -96,7 +59,8 @@ [%- IF disable_password_change == 'true' %] [%- ELSE %] - + [%- END %] @@ -105,7 +69,8 @@ [%- IF disable_email_change == 'true' %] [%- ELSE %] - + [%- END %] @@ -145,7 +110,7 @@

-
-
- [% l('Username Help') %] -
-
[% l("Username") %] + [% l("Username") %]
[% ctx.user.usrname | html %][% l("Change") %][% l("Change") %]
[% l("Change") %][% l("Change") %]
[% l('Change') %][% l('Change') %]
+
@@ -175,7 +140,7 @@
[% l("Addresses") %]
- +
@@ -205,40 +170,26 @@ [% ELSE %] [% END %] -
[% l("Address Type") %][% addr.address_type | html %]
[% l("Street") %][% addr.street1 | html %]
[% l("Street") %][% addr.street2 | html %]
- - - - - - - - - - - - - - - - +
[% l("Address Type") %]
[% l("Street") %]
[% l("Street") %]
[% l("City") %]
+ [% addr_fields = [ + {label => l("Address Type"), name => 'address_type', value => update_addr.address_type}, + {label => l("Street"), name => 'street1', value => update_addr.street1}, + {label => l("Street"), name => 'street2', value => update_addr.street2}, + {label => l("City"), name => 'city', value => update_addr.city}, + {label => l("County"), name => 'county', value => update_addr.county}, + {label => l("State"), name => 'state', value => update_addr.state}, + {label => l("Country"), name => 'country', value => update_addr.country}, + {label => l("ZIP"), name => 'post_code', value => update_addr.post_code}, + ]; + FOR field IN addr_fields %] - - - - - - - - - - - - - - + + + [% END %]
[% l("County") %]
[% l("State") %] -
[% l("Country") %]
[% l("Zip") %] +
diff --git a/Open-ILS/src/templates/opac/myopac/prefs_my_lists.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_my_lists.tt2 index 441ba3ec76..4a9da106b5 100644 --- a/Open-ILS/src/templates/opac/myopac/prefs_my_lists.tt2 +++ b/Open-ILS/src/templates/opac/myopac/prefs_my_lists.tt2 @@ -6,7 +6,8 @@
- +
[% IF ctx.updated_user_settings %] @@ -59,7 +60,7 @@
- +
[% INCLUDE "opac/parts/myopac/prefs_hints.tt2" %] [% END %] diff --git a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 index 46bce63ee8..edbf5673a9 100644 --- a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 +++ b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 @@ -8,7 +8,8 @@ - +
[% IF ctx.updated_user_settings %] @@ -21,11 +22,17 @@ [% setting = 'opac.hold_notify' %] - + [%# WCAG insists that labels for checkboxes contain the input + or directly follow the input, which would not look right + with the rest of the table. As an alternative, we can + repeat the label as a title attr. + http://www.w3.org/TR/WCAG20-TECHS/H44.html %] + [% email_label = l('Notify by Email by default when a hold is ready for pickup?') %] + + @@ -33,11 +40,11 @@ setting = 'opac.hold_notify'; -%] - + [% phone_label = l('Notify by Phone by default when a hold is ready for pickup?') %] + @@ -54,11 +61,11 @@ setting = 'opac.hold_notify'; -%] - + [% sms_label = l('Notify by Text by default when a hold is ready for pickup?') %] + @@ -93,6 +100,7 @@ @@ -101,7 +109,7 @@
-
-
-
[% END %] - + [% END %] diff --git a/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2 index 30323825a5..a2b9461218 100644 --- a/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2 +++ b/Open-ILS/src/templates/opac/myopac/prefs_settings.tt2 @@ -7,7 +7,8 @@
- +
[% IF ctx.updated_user_settings %] @@ -65,33 +66,41 @@ [%- setting = 'history.circ.retention_start' -%] - + [% circ_name = l('Keep history of checked out items?') %] + [%- setting = 'history.hold.retention_start' -%] - + [% hold_name = l('Keep history of holds?') %] + [%- setting = 'opac.temporary_list_no_warn' -%] - + [% skip_warn = l('Skip warning when adding to temporary book list?') %] + [%- setting = 'circ.holds_behind_desk'; IF ctx.behind_desk_supported -%] - + [% behind_desk = l('Pickup holds from behind the desk when possible?') %] + @@ -111,7 +120,7 @@
-
-
-
-
- +
[% INCLUDE "opac/parts/myopac/prefs_hints.tt2" %] [% END %] diff --git a/Open-ILS/src/templates/opac/parts/bookbag_actions.tt2 b/Open-ILS/src/templates/opac/parts/bookbag_actions.tt2 index 5aca80dfbc..76bd0ce016 100644 --- a/Open-ILS/src/templates/opac/parts/bookbag_actions.tt2 +++ b/Open-ILS/src/templates/opac/parts/bookbag_actions.tt2 @@ -22,6 +22,8 @@ rec_anchor => ctx.bre_id; END; + record_title = attrs.title; # same for either context + IF ctx.user_setting_map.defined(dsetting); default_list = ctx.user_setting_map.$dsetting; END; @@ -36,7 +38,8 @@ %]
  • - + [% l("Add to my list") %]
      diff --git a/Open-ILS/src/templates/opac/parts/header.tt2 b/Open-ILS/src/templates/opac/parts/header.tt2 index 1d93bc403d..7c9b95fbc5 100644 --- a/Open-ILS/src/templates/opac/parts/header.tt2 +++ b/Open-ILS/src/templates/opac/parts/header.tt2 @@ -109,14 +109,20 @@ want_dojo = 1; END; - # Recommend max length for image alt text is 75 for screen - # reader support / WCAG compliance. This macro trims the text - # to this length and and produces a full alt="abc" attribute. + # Especially useful for image 'alt' tags and link title tags, + # where the content may need to be unique (making it longer) + # but should not exceed 75 chars for ideal screen reader support. + # usage: html_text_attr('title', 'Link to item I Have A Super Long Title') + # the full HTML attribute key="value" is produced + MACRO html_text_attr(name, value) BLOCK; + IF value.length >= 75; + value = value.substr(71, value.length, '...'); + END; + value = value.replace('\s*$', ''); # remove trailing whitespace + HTML.attributes($name => value); + END; + MACRO img_alt(text) BLOCK; - IF text.length >= 75; - text = text.substr(71, text.length, '...'); - END; - text = text.replace('\s*$', ''); # remove trailing whitespace - HTML.attributes(alt => text); + html_text_attr('alt', text); END; %] diff --git a/Open-ILS/src/templates/opac/parts/myopac/base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/base.tt2 index 3dae62fdcd..93c50d9ece 100644 --- a/Open-ILS/src/templates/opac/parts/myopac/base.tt2 +++ b/Open-ILS/src/templates/opac/parts/myopac/base.tt2 @@ -27,25 +27,30 @@ class="[% cls_which %]">[% page.name; %] [% END %] - -
      -
      - -
      - - + + +
      +
      + + +
      +
      +
      [% content %]
      - + [% END %] diff --git a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 index 420bd3ec4d..7ac523cae8 100644 --- a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 +++ b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 @@ -18,22 +18,26 @@
      - + [% l('Account Fines Border Image 1') %]
      - + [% l('Account Fines Border Image 2') %]
      - + [% l('Account Fines Border Image 3') %]
      - + [% l('Account Fines Border Image 4') %]
      [% l('Fines:') %] @@ -42,7 +46,7 @@
      [% IF (ctx.fines.grocery.size OR ctx.fines.circulation.size) AND ctx.get_org_setting(ctx.user.home_ou, 'credit.payments.allow') == 1 %]
      [% END %]
      @@ -57,24 +61,33 @@ [% l("Your library card expired on [_1]. Please contact a librarian to resolve this issue.", fmt_expire_date) %] [% END %] - +
      - - + + - - + + - - + +
      [% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %] - [% l("View All") %] - [% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %] + + [% l("View All") %] + +
      [% l('Items Currently on Hold ([_1])', ctx.user_stats.holds.total) %] - [% l('View All') %] - [% l('Items Currently on Hold ([_1])', ctx.user_stats.holds.total) %] + + [% l('View All') %] + +
      [% l('Items ready for pickup ([_1])', ctx.user_stats.holds.ready) %] - [% l('View All') %] - [% l('Items ready for pickup ([_1])', ctx.user_stats.holds.ready) %] + + [% l('View All') %] + +
      diff --git a/Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2 index 34c156d44a..cf38a6270a 100644 --- a/Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2 +++ b/Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2 @@ -39,7 +39,10 @@ [%- # Select box navigation for mobile view %]
      - [% FOREACH page IN acct_prefs_pages; IF page.url != prefs_page; -%] diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index 7c715763b8..7fbf955910 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -49,7 +49,7 @@ l('Display record details for "[_1]"', attrs.title)) %] + [% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %] >[% attrs.title | html %] [%- FOR entry IN attrs.graphic_titles; @@ -297,7 +297,7 @@ END;