From: Bill Erickson Date: Wed, 25 Jan 2012 17:25:19 +0000 (-0500) Subject: kpac : template-ifying X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0c8b6939ad6a2a2f2159ee53fdf188d6a884fe54;p=evergreen%2Fequinox.git kpac : template-ifying Signed-off-by: Bill Erickson --- 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/checkout.tt2 b/Open-ILS/src/templates/kpac/checkout.tt2 new file mode 100644 index 0000000000..437d5d3ddb --- /dev/null +++ b/Open-ILS/src/templates/kpac/checkout.tt2 @@ -0,0 +1,132 @@ +[% + 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/detailed.tt2 b/Open-ILS/src/templates/kpac/detailed.tt2 new file mode 100644 index 0000000000..704959666c --- /dev/null +++ b/Open-ILS/src/templates/kpac/detailed.tt2 @@ -0,0 +1,124 @@ +[% + 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/grid.tt2 b/Open-ILS/src/templates/kpac/parts/grid.tt2 new file mode 100644 index 0000000000..15214f63f7 --- /dev/null +++ b/Open-ILS/src/templates/kpac/parts/grid.tt2 @@ -0,0 +1,49 @@ + +[% + MACRO img_path(img) BLOCK; + IF img.match('^/') OR img.match('^https?://'); + img; + ELSE; + ctx.media_prefix _ '/images/kpac/' _ img; + END; + END; +%] + +[% + MACRO render_kpac_grid(page) BLOCK; + ncols = page.columns; + name = page.name; + idx = 0 %] + + + [% + width = POSIX.floor(100 / ncols); + FOR cell IN page.cell; + IF idx == ncols; + %][% + idx = 0; + END; + idx = idx + 1; + + IF cell.type == 'topic'; + page_id = cell.content; + topic_page = ctx.kpac_config.pages.page.$page_id %] + + + + [% ELSIF cell.type == 'search'; %] + + + + +
[% topic_page.name %][% cell.name _ ' : ' _ cell.content %] + + [% ELSIF cell.type == 'link'; %] + + [% cell.name _ ' : ' _ cell.content %] + + [% END %] + [% END %] +
+[% END %] diff --git a/Open-ILS/src/templates/kpac/parts/page.tt2 b/Open-ILS/src/templates/kpac/parts/page.tt2 deleted file mode 100644 index ba92b3c53d..0000000000 --- a/Open-ILS/src/templates/kpac/parts/page.tt2 +++ /dev/null @@ -1,49 +0,0 @@ - -[% - MACRO img_path(img) BLOCK; - IF img.match('^/') OR img.match('^https?://'); - img; - ELSE; - ctx.media_prefix _ '/images/kpac/' _ img; - END; - END; -%] - -[% - MACRO render_kpac_page(page) BLOCK; - ncols = page.columns; - name = page.name; - idx = 0 %] - - - [% - width = POSIX.floor(100 / ncols); - FOR cell IN page.cell; - IF idx == ncols; - %][% - idx = 0; - END; - idx = idx + 1; - - IF cell.type == 'topic'; - page_id = cell.content; - topic_page = ctx.kpac_config.pages.page.$page_id %] - - - - [% ELSIF cell.type == 'search'; %] - - - - -
[% topic_page.name %][% cell.name _ ' : ' _ cell.content %] - - [% ELSIF cell.type == 'link'; %] - - [% cell.name _ ' : ' _ cell.content %] - - [% END %] - [% END %] -
-[% END %] diff --git a/Open-ILS/src/templates/kpac/parts/subpage.tt2 b/Open-ILS/src/templates/kpac/parts/subpage.tt2 new file mode 100755 index 0000000000..7bdbfb18c5 --- /dev/null +++ b/Open-ILS/src/templates/kpac/parts/subpage.tt2 @@ -0,0 +1,65 @@ +[% + 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.html b/Open-ILS/src/templates/kpac/sub_checkout.html deleted file mode 100755 index f1d0139840..0000000000 --- a/Open-ILS/src/templates/kpac/sub_checkout.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - -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
-
- -
 
-
-
 
-
-
- - - - -
- - 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_detailed.html b/Open-ILS/src/templates/kpac/sub_detailed.html deleted file mode 100755 index 94c7551fbb..0000000000 --- a/Open-ILS/src/templates/kpac/sub_detailed.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - -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
-
-
 
-
-
 
-
-
- - - - -
- - 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
-
-
 
-
-
 
-
-
- - - - -
- - diff --git a/Open-ILS/src/templates/kpac/subpage_template.html b/Open-ILS/src/templates/kpac/subpage_template.html deleted file mode 100755 index bb5fab17ef..0000000000 --- a/Open-ILS/src/templates/kpac/subpage_template.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - -Bibliomation - - - - -
- - - -
-
-
- -
-
- - - - - -
 
-
- - - - - Subpage template - - - - - -
 
-
-
-
-
New Search
-
- - - - - - -
 
 
-
 
-
-
 
-
search
-
- -
 
-
-
 
-
-
- - - - -
- -