From 9c17d8b6dd34075935318d504348d000c99c4144 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 5 Apr 2012 15:31:49 -0400 Subject: [PATCH] kpac : wire up home search; auth timeout redirect fixes Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- .../src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm | 12 ++++---- Open-ILS/src/templates/kpac/home.tt2 | 33 ++++++++++++++-------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm index 01e2b359c9..1aab231baa 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm @@ -171,6 +171,7 @@ sub load_getit_results { sub load_kpac_config { my $self = shift; + my $ctx = $self->ctx; if (!$kpac_config) { my $path = $self->apache->dir_config('KPacConfigFile'); @@ -188,19 +189,20 @@ sub load_kpac_config { ); } - my $ou = $self->ctx->{physical_loc} || $self->_get_search_lib; + my $ou = $ctx->{physical_loc} || $self->_get_search_lib; my $layout; # Search up the org tree to find the nearest config for the context org unit - while (my $org = $self->ctx->{get_aou}->($ou)) { + while (my $org = $ctx->{get_aou}->($ou)) { ($layout) = grep {$_->{owner} eq $org->id} @{$kpac_config->{layout}}; last if $layout; $ou = $org->parent_ou; } - $self->ctx->{kpac_layout} = $layout; - $self->ctx->{kpac_config} = $kpac_config; - $self->ctx->{kpac_root} = $self->ctx->{base_path} . "/kpac"; + $ctx->{kpac_layout} = $layout; + $ctx->{kpac_config} = $kpac_config; + $ctx->{kpac_root} = $ctx->{base_path} . "/kpac"; + $ctx->{home_page} = 'http://' . $self->apache->hostname . $ctx->{kpac_root} . "/home"; } diff --git a/Open-ILS/src/templates/kpac/home.tt2 b/Open-ILS/src/templates/kpac/home.tt2 index 500e336cfe..513d8fe2c5 100644 --- a/Open-ILS/src/templates/kpac/home.tt2 +++ b/Open-ILS/src/templates/kpac/home.tt2 @@ -19,18 +19,27 @@

Search your Library

for books, movies, music, magazines, and more!

- - - - - - - - - - - -
search
+
+ [% qtype = CGI.param('qtype') %] + + + + + + + + + + + + + + +
+

Or click on an image to get started:

-- 2.11.0