From 33e75c06ce05826eac9e5abdf2bd2c813db58f88 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 14 Feb 2012 14:34:21 -0500 Subject: [PATCH] kpac : rename files/paths for tpac consistency Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- .../src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm | 22 ++++++++------------- .../src/templates/kpac/{checkout.tt2 => getit.tt2} | 2 +- .../{checkout_results.tt2 => getit_results.tt2} | 0 .../src/templates/kpac/{index.tt2 => home.tt2} | 0 Open-ILS/src/templates/kpac/parts/breadcrumb.tt2 | 4 ++-- Open-ILS/src/templates/kpac/parts/grid.tt2 | 2 +- Open-ILS/src/templates/kpac/parts/header.tt2 | 2 +- Open-ILS/src/templates/kpac/parts/record_row.tt2 | 8 ++++---- Open-ILS/src/templates/kpac/parts/searchbox.tt2 | 2 +- Open-ILS/src/templates/kpac/parts/subpage.tt2 | 2 +- .../templates/kpac/{detailed.tt2 => record.tt2} | 10 +++++----- .../kpac/{search_results.tt2 => results.tt2} | 0 Open-ILS/web/images/kpac/{stars!.png => stars.png} | Bin .../kpac/{stars!_gray.png => stars_grey.png} | Bin 14 files changed, 24 insertions(+), 30 deletions(-) rename Open-ILS/src/templates/kpac/{checkout.tt2 => getit.tt2} (97%) rename Open-ILS/src/templates/kpac/{checkout_results.tt2 => getit_results.tt2} (100%) rename Open-ILS/src/templates/kpac/{index.tt2 => home.tt2} (100%) rename Open-ILS/src/templates/kpac/{detailed.tt2 => record.tt2} (95%) rename Open-ILS/src/templates/kpac/{search_results.tt2 => results.tt2} (100%) rename Open-ILS/web/images/kpac/{stars!.png => stars.png} (100%) rename Open-ILS/web/images/kpac/{stars!_gray.png => stars_grey.png} (100%) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm index 93e88913ab..34a81f6278 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm @@ -25,29 +25,25 @@ sub load { my $path = $self->apache->path_info; ($self->ctx->{page} = $path) =~ s#.*/(.*)#$1#g; - return $self->load_simple("index") if $path =~ m|kpac/index|; + return $self->load_simple("home") if $path =~ m|kpac/home|; return $self->load_simple("category") if $path =~ m|kpac/category|; - - # note: sets page=rresult - return $self->load_rresults if $path =~ m|kpac/search_results|; # inherited from tpac - - # note: sets page=record - return $self->load_record(no_search => 1) if $path =~ m|kpac/detailed|; + return $self->load_rresults if $path =~ m|kpac/results|; # inherited + return $self->load_record(no_search => 1) if $path =~ m|kpac/record|; # inherited # ---------------------------------------------------------------- # Everything below here requires SSL # ---------------------------------------------------------------- return $self->redirect_ssl unless $self->cgi->https; - if ($path =~ m|kpac/checkout|) { + # XXX auth vs. no-auth, pending list answers + return $self->load_simple("getit_results") if $path =~ m|kpac/getit_results|; + + if ($path =~ m|kpac/getit|) { # after getit_results my $stat = $self->load_record(no_search => 1); - $self->ctx->{page} = 'checkout'; # repair the page + $self->ctx->{page} = 'getit'; # repair the page return $stat; } - # XXX auth vs. no-auth, pending list answers - return $self->load_simple("checkout_results") if $path =~ m|kpac/checkout_results|; - # ---------------------------------------------------------------- # Everything below here requires authentication # ---------------------------------------------------------------- @@ -89,6 +85,4 @@ sub load_kpac_config { } - 1; - diff --git a/Open-ILS/src/templates/kpac/checkout.tt2 b/Open-ILS/src/templates/kpac/getit.tt2 similarity index 97% rename from Open-ILS/src/templates/kpac/checkout.tt2 rename to Open-ILS/src/templates/kpac/getit.tt2 index d392168df9..71ab91b800 100644 --- a/Open-ILS/src/templates/kpac/checkout.tt2 +++ b/Open-ILS/src/templates/kpac/getit.tt2 @@ -104,7 +104,7 @@ [% # in the absence of a sane referer, return to the detail page - url = ctx.kpac_root _ (ctx.referer.match('search_results') ? '/search_results' : '/detailed/' _ ctx.bre_id) %] + url = ctx.kpac_root _ (ctx.referer.match('results') ? '/results' : '/record/' _ ctx.bre_id) %] diff --git a/Open-ILS/src/templates/kpac/checkout_results.tt2 b/Open-ILS/src/templates/kpac/getit_results.tt2 similarity index 100% rename from Open-ILS/src/templates/kpac/checkout_results.tt2 rename to Open-ILS/src/templates/kpac/getit_results.tt2 diff --git a/Open-ILS/src/templates/kpac/index.tt2 b/Open-ILS/src/templates/kpac/home.tt2 similarity index 100% rename from Open-ILS/src/templates/kpac/index.tt2 rename to Open-ILS/src/templates/kpac/home.tt2 diff --git a/Open-ILS/src/templates/kpac/parts/breadcrumb.tt2 b/Open-ILS/src/templates/kpac/parts/breadcrumb.tt2 index 665e928611..ff6198acff 100644 --- a/Open-ILS/src/templates/kpac/parts/breadcrumb.tt2 +++ b/Open-ILS/src/templates/kpac/parts/breadcrumb.tt2 @@ -1,7 +1,7 @@ [% ELSIF cell.type == 'link'; %] diff --git a/Open-ILS/src/templates/kpac/parts/header.tt2 b/Open-ILS/src/templates/kpac/parts/header.tt2 index e10889dc6d..e19c3899cd 100644 --- a/Open-ILS/src/templates/kpac/parts/header.tt2 +++ b/Open-ILS/src/templates/kpac/parts/header.tt2 @@ -15,7 +15,7 @@
[% IF ctx.user %] - [% redir = CGI.url('-base' => 1) _ ctx.kpac_root _ '/index' %] + [% redir = CGI.url('-base' => 1) _ ctx.kpac_root _ '/home' %] [% l('Logout') %] [% ELSE %] diff --git a/Open-ILS/src/templates/kpac/parts/record_row.tt2 b/Open-ILS/src/templates/kpac/parts/record_row.tt2 index 4522afb390..274fce8f72 100644 --- a/Open-ILS/src/templates/kpac/parts/record_row.tt2 +++ b/Open-ILS/src/templates/kpac/parts/record_row.tt2 @@ -6,12 +6,12 @@ img_src = ctx.media_prefix _ '/opac/extras/ac/jacket/medium/' _ ident; END; %] - [% l('Image of item') %]
- +
[% l('by [_1]', attrs.author) %]
[% attrs.holdings.0.label | html %]
@@ -20,9 +20,9 @@
[% IF show_actions %]
-
more info
-
get it
 
diff --git a/Open-ILS/src/templates/kpac/parts/searchbox.tt2 b/Open-ILS/src/templates/kpac/parts/searchbox.tt2 index 714eb92e18..1d6e39e6ff 100644 --- a/Open-ILS/src/templates/kpac/parts/searchbox.tt2 +++ b/Open-ILS/src/templates/kpac/parts/searchbox.tt2 @@ -1,5 +1,5 @@
[% l('New Search') %]
-
+
+
diff --git a/Open-ILS/src/templates/kpac/detailed.tt2 b/Open-ILS/src/templates/kpac/record.tt2 similarity index 95% rename from Open-ILS/src/templates/kpac/detailed.tt2 rename to Open-ILS/src/templates/kpac/record.tt2 index 7690773c82..8161ebb398 100644 --- a/Open-ILS/src/templates/kpac/detailed.tt2 +++ b/Open-ILS/src/templates/kpac/record.tt2 @@ -31,7 +31,7 @@
-
rating
+
rating
 
@@ -48,11 +48,11 @@
-
[% l('Get it') | html %]
- [% l('Go Back') | html %]
@@ -87,7 +87,7 @@
[% cell.name %]
- +
Average Ratingratingrating out of 132 reviews
@@ -109,7 +109,7 @@
- +
Ratingratingrating 1 = Poor, 5 = Awesome
diff --git a/Open-ILS/src/templates/kpac/search_results.tt2 b/Open-ILS/src/templates/kpac/results.tt2 similarity index 100% rename from Open-ILS/src/templates/kpac/search_results.tt2 rename to Open-ILS/src/templates/kpac/results.tt2 diff --git a/Open-ILS/web/images/kpac/stars!.png b/Open-ILS/web/images/kpac/stars.png similarity index 100% rename from Open-ILS/web/images/kpac/stars!.png rename to Open-ILS/web/images/kpac/stars.png diff --git a/Open-ILS/web/images/kpac/stars!_gray.png b/Open-ILS/web/images/kpac/stars_grey.png similarity index 100% rename from Open-ILS/web/images/kpac/stars!_gray.png rename to Open-ILS/web/images/kpac/stars_grey.png -- 2.11.0