From: Bill Erickson Date: Mon, 14 Feb 2011 09:23:46 +0000 (-0500) Subject: fixed holds sorting; my-account link redirects to my-account; i18n cleanup X-Git-Tag: opac-tt-poc-demo2~27^2~14 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e1e3421f212da4307afdc777214191a53014008b;p=evergreen%2Fequinox.git fixed holds sorting; my-account link redirects to my-account; i18n cleanup --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index f576c65102..7dd760561d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -81,6 +81,8 @@ sub load { my $path = $self->apache->path_info; + $self->apache->log->info("path = $path; referer = " . $self->cgi->referer); + return $self->load_simple("home") if $path =~ /opac\/home/; return $self->load_simple("advanced") if $path =~ /opac\/advanced/; return $self->load_login if $path =~ /opac\/login/; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index ce275d4729..dd8985290d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -84,9 +84,8 @@ sub fetch_user_holds { }; my $first = 1; - my @collected; - my @holds; - my @ses; + my(@collected, @holds, @ses); + while(1) { @ses = $mk_req_batch->() if $first; last if $first and not @ses; @@ -108,7 +107,13 @@ sub fetch_user_holds { $first = 0; } - return \@holds; + # put the holds back into the original server sort order + my @sorted; + for my $id (@$hold_ids) { + push @sorted, grep { $_->{hold}->{hold}->id == $id } @holds; + } + + return \@sorted; } sub handle_hold_update { diff --git a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 index 5f3ad5d0d6..7156e5551b 100644 --- a/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/searchbar.tt2 @@ -4,7 +4,7 @@
- Search the Catalog + [% l('Search the Catalog') %] Advanced Search diff --git a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 b/Open-ILS/web/templates/default/opac/parts/topnav.tt2 index 243fc52475..635c5c0ffb 100644 --- a/Open-ILS/web/templates/default/opac/parts/topnav.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/topnav.tt2 @@ -1,13 +1,14 @@ - [% # XXX TODO: some kind of standard helper - # function in TT2 to render human names, - # i18n aware. - ctx.user.first_given_name %] - [% ctx.user.family_name %] + [% l('[_1] [_2]', ctx.user.first_given_name, ctx.user.family_name) %] + [% l('My Account') %] + [% l('Logout') %]