From 0c8b6939ad6a2a2f2159ee53fdf188d6a884fe54 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 25 Jan 2012 12:25:19 -0500 Subject: [PATCH] kpac : template-ifying Signed-off-by: Bill Erickson --- .../src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm | 5 + Open-ILS/src/templates/kpac/category.tt2 | 33 ++ .../kpac/{sub_checkout.html => checkout.tt2} | 361 ++++++++------------- Open-ILS/src/templates/kpac/checkout_results.tt2 | 23 ++ .../kpac/{sub_detailed.html => detailed.tt2} | 339 +++++++------------ Open-ILS/src/templates/kpac/home.tt2 | 10 - Open-ILS/src/templates/kpac/index.tt2 | 149 +++------ Open-ILS/src/templates/kpac/parts/base.tt2 | 41 ++- .../templates/kpac/parts/{page.tt2 => grid.tt2} | 2 +- .../{subpage_template.html => parts/subpage.tt2} | 168 ++++------ Open-ILS/src/templates/kpac/search_results.tt2 | 71 ++++ Open-ILS/src/templates/kpac/sub_category.html | 119 ------- .../src/templates/kpac/sub_checkout_results.html | 113 ------- .../src/templates/kpac/sub_search_results.html | 162 --------- 14 files changed, 546 insertions(+), 1050 deletions(-) create mode 100644 Open-ILS/src/templates/kpac/category.tt2 rename Open-ILS/src/templates/kpac/{sub_checkout.html => checkout.tt2} (59%) mode change 100755 => 100644 create mode 100644 Open-ILS/src/templates/kpac/checkout_results.tt2 rename Open-ILS/src/templates/kpac/{sub_detailed.html => detailed.tt2} (60%) mode change 100755 => 100644 delete mode 100644 Open-ILS/src/templates/kpac/home.tt2 mode change 100755 => 100644 Open-ILS/src/templates/kpac/index.tt2 rename Open-ILS/src/templates/kpac/parts/{page.tt2 => grid.tt2} (96%) rename Open-ILS/src/templates/kpac/{subpage_template.html => parts/subpage.tt2} (64%) create mode 100644 Open-ILS/src/templates/kpac/search_results.tt2 delete mode 100755 Open-ILS/src/templates/kpac/sub_category.html delete mode 100755 Open-ILS/src/templates/kpac/sub_checkout_results.html delete mode 100755 Open-ILS/src/templates/kpac/sub_search_results.html diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm index 481ec3f7e8..63cd098955 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm @@ -25,6 +25,11 @@ sub load { my $path = $self->apache->path_info; return $self->load_simple("index") if $path =~ m|kpac/index|; + return $self->load_simple("category") if $path =~ m|kpac/category|; + return $self->load_simple("checkout") if $path =~ m|kpac/checkout|; + return $self->load_simple("checkout_results") if $path =~ m|kpac/checkout_results|; + return $self->load_simple("detailed") if $path =~ m|kpac/detailed|; + return $self->load_simple("search_results") if $path =~ m|kpac/search_results|; # ---------------------------------------------------------------- # Everything below here requires SSL diff --git a/Open-ILS/src/templates/kpac/category.tt2 b/Open-ILS/src/templates/kpac/category.tt2 new file mode 100644 index 0000000000..24cfc452e8 --- /dev/null +++ b/Open-ILS/src/templates/kpac/category.tt2 @@ -0,0 +1,33 @@ +[% + WRAPPER "kpac/parts/subpage.tt2"; + ctx.page_title = l("Sub Page"); +%] + +

Living Creatures

+
 
+ + + + +[% END %] diff --git a/Open-ILS/src/templates/kpac/sub_checkout.html b/Open-ILS/src/templates/kpac/checkout.tt2 old mode 100755 new mode 100644 similarity index 59% rename from Open-ILS/src/templates/kpac/sub_checkout.html rename to Open-ILS/src/templates/kpac/checkout.tt2 index f1d0139840..437d5d3ddb --- a/Open-ILS/src/templates/kpac/sub_checkout.html +++ b/Open-ILS/src/templates/kpac/checkout.tt2 @@ -1,229 +1,132 @@ - - - - -Bibliomation - - - - -
- - - -
-
-
- -
-
- - - - - -
 
-
- - - - -
-
-
item image
-
-
Book Name
-
by Author Name
-
Call Number
-
Publisher, Year, Size
-
-
-
 book 
-
Book
-
-
 
-
-
- -
-
-
- - - - - - - - - - - - - -
-

get it!

-

If you would like to request this item, please enter the following information and click
Submit below:

-
-
-
 
-
-

Library Card Number without spaces:

-
- pin number help -
 
-
 
-

Pin Number:

-
- pin number help -
 
-
 
-

Choose a Pickup Library:

-
-
-
-
- submit -
-
-
-
-
-

save it!

-

If you would like to save this item to a list to be requested later, please choose a location and click
Submit below.

-
-
-
 
-
-

Choose a Pickup Library:

-
-
 
- -
-
-
- submit -
-
-
-
- - - - - - -
 
-
-
-
-
New Search
-
- - - - - - -
 
 
-
 
-
-
 
-
search
-
- -
 
-
-
 
-
-
- - - - -
- - +[% + WRAPPER "kpac/parts/subpage.tt2"; + ctx.page_title = l("Sub Page"); +%] + +
+
+
item image
+
+
Book Name
+
by Author Name
+
Call Number
+
Publisher, Year, Size
+
+
+
 book 
+
Book
+
+
 
+
+
+ +
+
+
+ + + + + + + + + + +
+

get it!

+

If you would like to request this item, please enter the following information and click
Submit below:

+
+
+
 
+
+

Library Card Number without spaces:

+
+ pin number help +
 
+
 
+

Pin Number:

+
+ pin number help +
 
+
 
+

Choose a Pickup Library:

+
+
+
+
+ submit +
+
+
+
+
+

save it!

+

If you would like to save this item to a list to be requested later, please choose a location and click
Submit below.

+
+
+
 
+
+

Choose a Pickup Library:

+
+
 
+ +
+
+
+ submit +
+
+
+
+ + + +[% END %] diff --git a/Open-ILS/src/templates/kpac/checkout_results.tt2 b/Open-ILS/src/templates/kpac/checkout_results.tt2 new file mode 100644 index 0000000000..ab22927fcd --- /dev/null +++ b/Open-ILS/src/templates/kpac/checkout_results.tt2 @@ -0,0 +1,23 @@ +[% + WRAPPER "kpac/parts/subpage.tt2"; + ctx.page_title = l("Sub Page"); +%] + + +

You Got It!

+ +
+

Your Request for Book Name was successful.
You will be able to pick up this material at Fairwood.

+
+ + + +[% END %] + diff --git a/Open-ILS/src/templates/kpac/sub_detailed.html b/Open-ILS/src/templates/kpac/detailed.tt2 old mode 100755 new mode 100644 similarity index 60% rename from Open-ILS/src/templates/kpac/sub_detailed.html rename to Open-ILS/src/templates/kpac/detailed.tt2 index 94c7551fbb..704959666c --- a/Open-ILS/src/templates/kpac/sub_detailed.html +++ b/Open-ILS/src/templates/kpac/detailed.tt2 @@ -1,215 +1,124 @@ - - - - -Bibliomation - - - -
- - - -
-
-
- -
-
- - - - - -
 
-
- - - - - -
-
item image
- -
-
Book Name
-
by Author Name
-
-
-
 book 
-
Book
-
- -
-
rating
- -
 
-
-
Call Number
-
Publisher, Year, Size
-
-
-
 
-
-
-
-
get it
-
go back
-
-
 
-
-
You can find this item at these locations:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Location StatusCall Number
Bellevue LibraryView Library InfoCheck ShelfJ613.71 CRE
Burien LibraryView Library InfoCheck ShelfJ613.71 CRE
Newport LibraryView Library InfoDue: 03-13-10J613.71 CRE
Redmond LibraryView Library InfoCheck ShelfJ613.71 CRE
-
-
About this item:
-
-

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit

-
-
- Reviews -
Rate this Item
- About the Author -
 
-
-
- - - - -
Average Ratingratingout of 132 reviews
-
 
-
-
-
 
-
-
- - - - -
Your email address will not
be displayed to other users.
-
-
- - - - -
Ratingrating1 = Poor, 5 = Awesome
- -
-
-
 
-
-
submit review
-
- - - - - -
 
-
-
-
-
New Search
-
- - - - - - -
 
 
-
 
-
-
 
-
search
-
-
 
-
-
 
-
-
- - - - -
- - +[% + WRAPPER "kpac/parts/subpage.tt2"; + ctx.page_title = l("Sub Page"); +%] + + +
+
item image
+ +
+
Book Name
+
by Author Name
+
+
+
 book 
+
Book
+
+ +
+
rating
+ +
 
+
+
Call Number
+
Publisher, Year, Size
+
+
+
 
+
+
+
+
get it
+
go back
+
+
 
+
+
You can find this item at these locations:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Location StatusCall Number
Bellevue LibraryView Library InfoCheck ShelfJ613.71 CRE
Burien LibraryView Library InfoCheck ShelfJ613.71 CRE
Newport LibraryView Library InfoDue: 03-13-10J613.71 CRE
Redmond LibraryView Library InfoCheck ShelfJ613.71 CRE
+
+
About this item:
+
+

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit

+
+
+ Reviews +
Rate this Item
+ About the Author +
 
+
+
+ + + + +
Average Ratingratingout of 132 reviews
+
 
+
+
+
 
+
+
+ + + + +
Your email address will not
be displayed to other users.
+
+
+ + + + +
Ratingrating1 = Poor, 5 = Awesome
+ +
+
+
 
+
+
submit review
+
+ + + +[% END %] diff --git a/Open-ILS/src/templates/kpac/home.tt2 b/Open-ILS/src/templates/kpac/home.tt2 deleted file mode 100644 index abd1faa7c5..0000000000 --- a/Open-ILS/src/templates/kpac/home.tt2 +++ /dev/null @@ -1,10 +0,0 @@ -[% - PROCESS "opac/parts/header.tt2"; - PROCESS "kpac/parts/page.tt2"; - WRAPPER "kpac/parts/base.tt2"; - ctx.page_title = l("Home") -%] - - [% render_kpac_page(ctx.kpac_layout); %] - -[% END %] diff --git a/Open-ILS/src/templates/kpac/index.tt2 b/Open-ILS/src/templates/kpac/index.tt2 old mode 100755 new mode 100644 index cb138f1929..f53ed0d5f9 --- a/Open-ILS/src/templates/kpac/index.tt2 +++ b/Open-ILS/src/templates/kpac/index.tt2 @@ -1,96 +1,53 @@ -[% - PROCESS "opac/parts/header.tt2"; - PROCESS "kpac/parts/page.tt2"; - WRAPPER "kpac/parts/base.tt2"; - ctx.page_title = l("Home") -%] -
- - -
-
-
 
-
 
-
 
-
 
-
- - - - -
 
-
-

Search your Library

-

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

- - - - - - -
search
-
- -
-

Or click on an image to get started:

- [% render_kpac_page(ctx.kpac_layout); %] - - -
- -
 
-
-
 
-
 
-
 
-
 
-
-
- - - -
-[% END %] - +[% + PROCESS "opac/parts/header.tt2"; + PROCESS "kpac/parts/grid.tt2"; + WRAPPER "kpac/parts/base.tt2"; + ctx.page_title = l("Home") +%] + +
+
 
+
 
+
 
+
 
+
+ + + + + + + +
 
+
+

Search your Library

+

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

+ + + + + + + + + + + +
search
+
+
+

Or click on an image to get started:

+ [% render_kpac_grid(ctx.kpac_layout); %] +
+ +
 
+ +
+
 
+
 
+
 
+
 
+
+ +[% END %] + diff --git a/Open-ILS/src/templates/kpac/parts/base.tt2 b/Open-ILS/src/templates/kpac/parts/base.tt2 index 9d24ed1295..eb838d5a7d 100644 --- a/Open-ILS/src/templates/kpac/parts/base.tt2 +++ b/Open-ILS/src/templates/kpac/parts/base.tt2 @@ -9,7 +9,44 @@ [% l("Kid's Catalog - [_1]", ctx.page_title) %] - [% content %] - [%# INCLUDE 'opac/parts/js.tt2' %] +
+ + + + +
[% content %]
+ + + + +
+ diff --git a/Open-ILS/src/templates/kpac/parts/page.tt2 b/Open-ILS/src/templates/kpac/parts/grid.tt2 similarity index 96% rename from Open-ILS/src/templates/kpac/parts/page.tt2 rename to Open-ILS/src/templates/kpac/parts/grid.tt2 index ba92b3c53d..15214f63f7 100644 --- a/Open-ILS/src/templates/kpac/parts/page.tt2 +++ b/Open-ILS/src/templates/kpac/parts/grid.tt2 @@ -10,7 +10,7 @@ %] [% - MACRO render_kpac_page(page) BLOCK; + MACRO render_kpac_grid(page) BLOCK; ncols = page.columns; name = page.name; idx = 0 %] diff --git a/Open-ILS/src/templates/kpac/subpage_template.html b/Open-ILS/src/templates/kpac/parts/subpage.tt2 similarity index 64% rename from Open-ILS/src/templates/kpac/subpage_template.html rename to Open-ILS/src/templates/kpac/parts/subpage.tt2 index bb5fab17ef..7bdbfb18c5 100755 --- a/Open-ILS/src/templates/kpac/subpage_template.html +++ b/Open-ILS/src/templates/kpac/parts/subpage.tt2 @@ -1,103 +1,65 @@ - - - - -Bibliomation - - - - -
- - - -
-
-
- -
-
- - - - - -
 
-
- - - - - Subpage template - - - - - -
 
-
-
-
-
New Search
-
- - - - - - -
 
 
-
 
-
-
 
-
search
-
- -
 
-
-
 
-
-
- - - - -
- - +[% + PROCESS "opac/parts/header.tt2"; + PROCESS "kpac/parts/grid.tt2"; + WRAPPER "kpac/parts/base.tt2"; +%] + +
+
+ +
+
+ + + + + +
 
+
+ + + + + [% content %] + + + + +
 
+
+
+
+
New Search
+
+ + + + + + +
 
 
+
 
+
+
 
+
search
+
+ +
 
+
+
 
+
+ +[% END %] + + diff --git a/Open-ILS/src/templates/kpac/search_results.tt2 b/Open-ILS/src/templates/kpac/search_results.tt2 new file mode 100644 index 0000000000..27f216caea --- /dev/null +++ b/Open-ILS/src/templates/kpac/search_results.tt2 @@ -0,0 +1,71 @@ +[% + WRAPPER "kpac/parts/subpage.tt2"; + ctx.page_title = l("Sub Page"); +%] + +

Search Results

+ + + +
+
+
item image
+
+
Book Name
+
by Author Name
+
Call Number
+
Publisher, Year, Size
+
+
more info
+
get it
+
 
+
+
+
+
 book 
+
Book
+
+
 
+
+ +
+
item image
+
+
Book Name
+
by Author Name
+
Call Number
+
Publisher, Year, Size
+
+
more info
+
get it
+
 
+
+
+
+
 book 
+
Book
+
+
 
+
+
+ + + +[% END %] diff --git a/Open-ILS/src/templates/kpac/sub_category.html b/Open-ILS/src/templates/kpac/sub_category.html deleted file mode 100755 index 683419dc05..0000000000 --- a/Open-ILS/src/templates/kpac/sub_category.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - -Bibliomation - - - - -
- - - -
-
-
- -
-
- - - - - -
 
-
- - - - -

Living Creatures

-
 
- - - - - - - -
 
-
-
-
-
New Search
-
- - - - - - -
 
 
-
 
-
-
 
-
search
-
- -
 
-
-
 
-
-
- - - - -
- - diff --git a/Open-ILS/src/templates/kpac/sub_checkout_results.html b/Open-ILS/src/templates/kpac/sub_checkout_results.html deleted file mode 100755 index 86c9c378a1..0000000000 --- a/Open-ILS/src/templates/kpac/sub_checkout_results.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - -Bibliomation - - - -
- - - -
-
-
- -
-
- - - - - -
 
-
- - - -

You Got It!

- -
-

Your Request for Book Name was successful.
You will be able to pick up this material at Fairwood.

-
- - - - - - -
 
-
-
-
-
New Search
-
- - - - - - -
 
 
-
 
-
-
 
-
search
-
- -
 
-
-
 
-
-
- - - - -
- - diff --git a/Open-ILS/src/templates/kpac/sub_search_results.html b/Open-ILS/src/templates/kpac/sub_search_results.html deleted file mode 100755 index 42ea70834c..0000000000 --- a/Open-ILS/src/templates/kpac/sub_search_results.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - -Bibliomation - - - -
- - - -
-
-
- -
-
- - - - - -
 
-
- - - - - - -

Search Results

- - - -
-
-
item image
-
-
Book Name
-
by Author Name
-
Call Number
-
Publisher, Year, Size
-
-
more info
-
get it
-
 
-
-
-
-
 book 
-
Book
-
-
 
-
- -
-
item image
-
-
Book Name
-
by Author Name
-
Call Number
-
Publisher, Year, Size
-
-
more info
-
get it
-
 
-
-
-
-
 book 
-
Book
-
-
 
-
-
- - - - - - - -
 
-
-
-
-
New Search
-
- - - - - - -
 
 
-
 
-
-
 
-
search
-
-
 
-
-
 
-
-
- - - - -
- - -- 2.11.0