[NBP web-reskin] [SCM] UNNAMED PROJECT branch, master,
updated. 6d8196c897986afd9fd6bb133f7ad07a52651d99
fidelity_camp at nbp.org
fidelity_camp at nbp.org
Mon Jul 12 13:39:30 EDT 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".
The branch, master has been updated
via 6d8196c897986afd9fd6bb133f7ad07a52651d99 (commit)
from 9ab6c0f36716397a62953054f3130dddbf61f295 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6d8196c897986afd9fd6bb133f7ad07a52651d99
Author: V.Prabhakar at FMR.COM <fidelity_camp at tp6.endpoint.com>
Date: Mon Jul 12 13:38:48 2010 -0400
update pages that display browse results. -edie
-----------------------------------------------------------------------
Summary of changes:
commit 6d8196c897986afd9fd6bb133f7ad07a52651d99
Author: V.Prabhakar at FMR.COM <fidelity_camp at tp6.endpoint.com>
Date: Mon Jul 12 13:38:48 2010 -0400
update pages that display browse results. -edie
---
catalogs/nbp/pages/flypage.html | 326 ++++++------
catalogs/nbp/pages/flypage_textbook.html | 590 ++++++++++----------
.../nbp/pages/programs/readbooks/parent_info.html | 208 ++++----
.../nbp/pages/publications/books_by_subcat.html | 130 ++---
.../nbp/pages/publications/browse_results.html | 226 ++++----
5 files changed, 737 insertions(+), 743 deletions(-)
diff --git a/catalogs/nbp/pages/flypage.html b/catalogs/nbp/pages/flypage.html
index 498a7e5..1629848 100644
--- a/catalogs/nbp/pages/flypage.html
+++ b/catalogs/nbp/pages/flypage.html
@@ -1,161 +1,165 @@
-
-[pragma safe_data]
-[if
- type=explicit
- compare=|
- q{[item-field inactive]} or q{[item-field hidden]}
- |
-]
- [seti error]The item you requested, "[item-field title]" ([item-code]), is no longer available.[/seti]
- [bounce href="[area index]"]
-[/if]
-
-[tmp option_select][item-options
- td=1
- label=1
- bold=0
- type="select"
- type_single="labels"
- price=1
- low_price="low_price"
- different_prices="different_prices"
- option_count="option_count"
- additional_options="additional_options"
- separator=":"
- cgi_default=1
- td_extra="valign='top'"
-][/tmp]
-
-[if !scratch option_count]
- [tmp is_textbook][item-code][/tmp]
- [query list=1 sql="SELECT count(*) AS is_textbook FROM transtitles WHERE isbn='[item-code]'"]
- [if-sql-param is_textbook]
-
- [tmp is_textbook][area form="mv_nextpage=flypage_textbook
- mv_todo=return
- w=[item-code]
- c=t
- t_title=[filter urlencode][item_field title][/filter]"][/tmp]
- [perl no_return=1]
- $Scratch->{is_textbook} =~ s/(\"\>)$//;
- [/perl]
- [bounce href="[scratch is_textbook]"]
- [/if-sql-param]
- [/query]
- [seti error]The item you requested, "[item-field title]" ([item-code]), is temporarily out of stock.[/seti]
- [bounce href="[area index]"]
-[/if]
-
-[comment]
-ui_page: flypage.html
-ui_type: page
-ui_name: flypage.html
-ui_page_template: publications_template
-ui_version: 4.9.7
-ui_page_version: 4.9.7
-ui_source: pages/flypage.html
-[/comment]
-
-
-[control reset=1]
-[control reset=1]
-
- at _PUBLICATIONS_TEMPLATE_TOP_@
-
-[if type=explicit compare="[error all=1 show_var=1 keep=1]"]
-<div class="content_area">There were errors in your submission.
-<ul><li>[error all=1 keep=0 show_error=1 joiner="<li>"]</ul></div>
-[/if]
-
-<div class="box_m5px">
-<h1 class="contentheader">[item-field title] ([item-code])</h1>
- <div class="content_area">
-
-<!-- BEGIN CONTENT -->
-<form action="[process]" method="post" name="flypage">
-<input type="hidden" name="mv_action" value="refresh">
-<input type="hidden" name="mv_session_id" value="[data session id]">
-<input type="hidden" name="mv_order_item" value="[item-code]">
-
-<INPUT TYPE="hidden" NAME="mv_nextpage" VALUE="[item-code]">
-
-[if scratch additional_options]
-<input type="hidden" name="mv_separate_items" value=1>
-<input type="hidden" name="mv_form_profile" value="check_flypage_options">
-[/if]
-
-<table cellpadding="10" cellspacing="0" border="0">
- <tr valign="top">
- <td align=center>[image src="book_photos/[item-field image].jpg" alt="Picture of [item-filter entities][item-field title][/item-filter]"]</td>
- <td width="42%">
-<table border="0" cellpadding="2" cellspacing="0">
- <tr>
- <td>Price[if scratch different_prices]s start at[/if]:</td>
- <td style="font-weight: bold">
- [if scratch low_price == 0]
- Free!
- [else]
- [currency][scratch low_price][/currency]
- [/else]
- [/if]
- </td>
- </tr>
- [if scratch option_count]
-
-[table-organize cols=2]
- [scratch option_select]
-[/table-organize]
-
- [/if]
-
- <tr>
- <td><label for="order_quantity">Quantity:</label></td>
- <td><input type="text" name="mv_order_quantity" id="order_quantity" size="2" value="1"></td>
- </tr>
- <tr>
- <td colspan="2"> </td>
- </tr>
- <tr>
- <td colspan="2" align="center">
- [button
- text="Add to Cart"
- hidetext=1
- form="flypage"
- ]
- mv_nextpage=cart
- [/button]
- </td>
- </tr>
- <tr>
- <td colspan="2"> </td>
- </tr>
- <tr>
- <td colspan="2" align="center">
-[if !scratch custom_link]
- [seti custom_link]<a href="[area href="[scratch nbp_area]/index"]">Return to Shopping</a>[/seti]
-[/if]
-[perl no_return=1]
- $ref = $Tag->env('HTTP_REFERER');
- $Session->{referer} = $ref if $ref;
- if ($Session->{referer} =~ m,nbp/(?:publications|cbbc|readbooks|education|production|company|support|braille),) {
- $Scratch->{custom_link} = qq{<a href="$Session->{referer}">Return to Shopping</a>};
- }
-[/perl]
- <p align=center>[scratch custom_link]</p>
- </td>
- </tr>
-</table>
- </td>
- </tr>
- <tr>
- <td colspan=2>[item-field description]</td>
- </tr>
-</table>
-
-</form>
-
-<!-- END CONTENT -->
-
- </div>
-</div>
- at _PUBLICATIONS_TEMPLATE_BOTTOM_@
+
+[pragma safe_data]
+[if
+ type=explicit
+ compare=|
+ q{[item-field inactive]} or q{[item-field hidden]}
+ |
+]
+ [seti error]The item you requested, "[item-field title]" ([item-code]), is no longer available.[/seti]
+ [bounce href="[area index]"]
+[/if]
+
+[tmp option_select][item-options
+ td=1
+ label=1
+ bold=0
+ type="select"
+ type_single="labels"
+ price=1
+ low_price="low_price"
+ different_prices="different_prices"
+ option_count="option_count"
+ additional_options="additional_options"
+ separator=":"
+ cgi_default=1
+ td_extra="valign='top'"
+][/tmp]
+
+[if !scratch option_count]
+ [tmp is_textbook][item-code][/tmp]
+ [query list=1 sql="SELECT count(*) AS is_textbook FROM transtitles WHERE isbn='[item-code]'"]
+ [if-sql-param is_textbook]
+
+ [tmp is_textbook][area form="mv_nextpage=flypage_textbook
+ mv_todo=return
+ w=[item-code]
+ c=t
+ t_title=[filter urlencode][item_field title][/filter]"][/tmp]
+ [perl no_return=1]
+ $Scratch->{is_textbook} =~ s/(\"\>)$//;
+ [/perl]
+ [bounce href="[scratch is_textbook]"]
+ [/if-sql-param]
+ [/query]
+ [seti error]The item you requested, "[item-field title]" ([item-code]), is temporarily out of stock.[/seti]
+ [bounce href="[area index]"]
+[/if]
+
+[comment]
+ui_page: flypage.html
+ui_type: page
+ui_name: flypage.html
+ui_page_template: publications_template
+ui_version: 4.9.7
+ui_page_version: 4.9.7
+ui_source: pages/flypage.html
+[/comment]
+
+
+[control reset=1]
+[control reset=1]
+
+[set xtitle]NBP - Bookstore[/set]
+ at _TITLE_@
+[var MENU_BAR]
+[set xbannerImageSrc]/nbp/images/secondarymenu/bookstore.jpg[/set]
+[var TOP_BANNER_SECONDARY]
+
+[if type=explicit compare="[error all=1 show_var=1 keep=1]"]
+<div class="content_area">There were errors in your submission.
+<ul><li>[error all=1 keep=0 show_error=1 joiner="<li>"]</ul></div>
+[/if]
+
+<div class="box_m5px">
+<h1 class="contentheader">[item-field title] ([item-code])</h1>
+ <div class="content_area">
+
+<!-- BEGIN CONTENT -->
+<form action="[process]" method="post" name="flypage">
+<input type="hidden" name="mv_action" value="refresh">
+<input type="hidden" name="mv_session_id" value="[data session id]">
+<input type="hidden" name="mv_order_item" value="[item-code]">
+
+<INPUT TYPE="hidden" NAME="mv_nextpage" VALUE="[item-code]">
+
+[if scratch additional_options]
+<input type="hidden" name="mv_separate_items" value=1>
+<input type="hidden" name="mv_form_profile" value="check_flypage_options">
+[/if]
+
+<table cellpadding="10" cellspacing="0" border="0">
+ <tr valign="top">
+ <td align=center>[image src="book_photos/[item-field image].jpg" alt="Picture of [item-filter entities][item-field title][/item-filter]"]</td>
+ <td width="42%">
+<table border="0" cellpadding="2" cellspacing="0">
+ <tr>
+ <td>Price[if scratch different_prices]s start at[/if]:</td>
+ <td style="font-weight: bold">
+ [if scratch low_price == 0]
+ Free!
+ [else]
+ [currency][scratch low_price][/currency]
+ [/else]
+ [/if]
+ </td>
+ </tr>
+ [if scratch option_count]
+
+[table-organize cols=2]
+ [scratch option_select]
+[/table-organize]
+
+ [/if]
+
+ <tr>
+ <td><label for="order_quantity">Quantity:</label></td>
+ <td><input type="text" name="mv_order_quantity" id="order_quantity" size="2" value="1"></td>
+ </tr>
+ <tr>
+ <td colspan="2"> </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+ [button
+ text="Add to Cart"
+ hidetext=1
+ form="flypage"
+ ]
+ mv_nextpage=cart
+ [/button]
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"> </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+[if !scratch custom_link]
+ [seti custom_link]<a href="[area href="[scratch nbp_area]/index"]">Return to Shopping</a>[/seti]
+[/if]
+[perl no_return=1]
+ $ref = $Tag->env('HTTP_REFERER');
+ $Session->{referer} = $ref if $ref;
+ if ($Session->{referer} =~ m,nbp/(?:publications|cbbc|readbooks|education|production|company|support|braille),) {
+ $Scratch->{custom_link} = qq{<a href="$Session->{referer}">Return to Shopping</a>};
+ }
+[/perl]
+ <p align=center>[scratch custom_link]</p>
+ </td>
+ </tr>
+</table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2>[item-field description]</td>
+ </tr>
+</table>
+
+</form>
+
+<!-- END CONTENT -->
+
+ </div>
+</div>
+[var FOOTER]
diff --git a/catalogs/nbp/pages/flypage_textbook.html b/catalogs/nbp/pages/flypage_textbook.html
index b4aaa19..6e7fc23 100644
--- a/catalogs/nbp/pages/flypage_textbook.html
+++ b/catalogs/nbp/pages/flypage_textbook.html
@@ -1,292 +1,298 @@
-[comment]
-ui_page: find.html
-ui_type: page
-ui_name: find.html
-ui_page_template: publications
-ui_version: 4.9.7
-ui_page_version: 4.9.7
-ui_source: find.html
-[/comment]
-
-[control reset=1]
-[control reset=1]
-
-[seti xtitle]NBP - Search Results[/seti]
-[calc interpolate=0]
- my $area = uc($Scratch->{nbp_area});
- $area = 'PUBLICATIONS' unless exists $Variable->{$area . '_TEMPLATE_TOP'};
- $Tag->tmp('template_bottom', $area . '_TEMPLATE_BOTTOM');
- if ($CGI->{c} eq 't') {
- return $Variable->{EDUCATION_TEMPLATE_TOP};
- }
- elsif ($CGI->{c} eq 'p') {
- return $Variable->{PUBLICATIONS_TEMPLATE_TOP};
- }
- else {
- return $Variable->{$area . '_TEMPLATE_TOP'};
- }
-[/calc]
-
-<!-- BEGIN CONTENT -->
-<div class="box_m5px">
- <h1 class="contentheader">[CGI t_title]</h1>
- <div class="content_area">
-
-[calc interpolate=0]
- my (@words, @isbn, @query);
- my $w = $CGI->{w};
-
- # get ISBNs with or without hyphens
- while ($w =~ s/\b([0-9][0-9-]{8,11}[0-9Xx]\b)//g) {
- my $i = $1;
- $i =~ s/-//g;
- push @isbn, $i;
- }
-
- # break up other punctuated and whitespace-separated words and parts
- $w =~ s/[^A-Za-z0-9]/ /g;
- push @words, grep /\S/, split / /, $w;
-
- if (! $CGI->{c} or $CGI->{c} eq 'p') {
- my @where = ('NOT c.inactive');
-
- my @fields = qw(
- vp.code
- vp.format_name
- vp.title
- vp.authors
- vp.summary
- vp.description
- sc.name
- c.name
- );
- for my $word (@words) {
- my @limit;
- for my $field (@fields) {
- push @limit, "$field ILIKE '%$word%'";
- }
- push @where, '(' . join("\nOR ", @limit) . ')';
- }
-
- if (@isbn) {
- push @where, "vp.isbn IN (" . join(',', map { "'$_'" } @isbn) . ")";
- }
-
- my $where = '';
- $where = 'WHERE ' . join("\nAND ", @where) if @where;
-
- push @query, <<EOQ;
-SELECT DISTINCT vp.sku AS pkey, 'p'::char AS type,
- vp.title, vp.authors, vp.summary,
- sc.subcat_id, c.name AS cat_name,
- sc.name AS subcat_name,
- NULL::varchar AS edition, NULL::varchar AS publisher,
- NULL::varchar AS copyright, NULL::varchar AS level,
- NULL::varchar AS braille_code, NULL::boolean AS contracted,
- NULL::boolean AS interpoint, NULL::smallint AS volume_count
-FROM variants_pretty vp
-LEFT JOIN subcats sc
- ON sc.subcat_id = vp.subcat_id
-LEFT JOIN cats c
- ON c.cat_id = sc.cat_id
-$where
-EOQ
- }
-
- if (! $CGI->{c} or $CGI->{c} eq 't') {
- my @where;
-
- my @fields = qw(
- t.title
- t.edition
- t.authors
- t.publisher
- t.copyright
- t.level
- t.braille_code
- t.partial_description
- t.notes
- v.volume
- v.print_page_range
- v.notes
- );
- for my $word (@words) {
- my @limit;
- for my $field (@fields) {
- push @limit, "$field ILIKE '%$word%'";
- }
- push @where, '(' . join("\nOR ", @limit) . ')';
- }
-
- if (@isbn) {
- push @where, "t.isbn IN (" . join(',', map { "'$_'" } @isbn) . ")";
- }
-
- my $where = '';
- $where = 'WHERE ' . join("\nAND ", @where) if @where;
-
- push @query, <<EOQ;
-SELECT DISTINCT t.isbn AS pkey, 't'::char AS type,
- t.title, t.authors, t.notes AS summary,
- NULL::smallint AS subcat_id, NULL::varchar AS cat_name,
- NULL::varchar AS subcat_name,
- t.edition, t.publisher,
- t.copyright, t.level,
- t.braille_code, t.contracted,
- t.interpoint, t.volume_count,
- t.graphic_pages, t.partial,
- t.partial_description, CURRENT_DATE AS today,
- t.completion_date, t.price,
- t.complete
-FROM transtitles t
-LEFT JOIN transvolumes v
- ON t.isbn = v.isbn
-$where
-EOQ
- }
-
- $Tag->tmp(
- 'query',
- join("\n\nUNION\n\n\n", @query) . "\nORDER BY title, pkey"
- );
- return;
-[/calc]
-
-[comment]
-<pre>[scratch query]</pre>
-[/comment]
-
-[query
- sql=|[scratch query]|
- ml=50
- more=1
- list=1
-]
-[sql-on-match]
-[more-list]
-<p>Results [matches] of [match-count]
-
-More: [more]
-</p>
-[/more-list]
-[/sql-on-match]
-
-[sql-list]
- <span style="font-weight: bold;">[sql-param title]</span><br />
- (ISBN: [sql-param pkey])<br />[if-sql-param !complete]
- <i>This book is in progress; book page counts and price are estimates, though any listed volumes are complete.</i><br />
- [/if-sql-param]
-<blockquote>
- [if-sql-param authors][sql-param authors]<br>[/if-sql-param]
- [if-sql-param publisher][sql-param publisher]<br>[/if-sql-param]
- [if-sql-param copyright][sql-param copyright]<br>[/if-sql-param]
- [if-sql-param edition][sql-param edition]<br>[/if-sql-param]
- [if-sql-param level][sql-param level]<br>[/if-sql-param]
- [if-sql-param volume_count][plural][sql-param volume_count] volumes[/plural]<br>[/if-sql-param]
- [if-sql-param price][currency][sql-param price][/currency][/if-sql-param]
- [comment][tmp cd][sql-param completion_date][/tmp]
- [tmp today][sql-param today][/tmp]
- [if type="explicit" compare="$Scratch->{cd} gt $Scratch->{today}"][/comment][if-sql-param !complete](estimated)[/if-sql-param]<br />
- [sql-calc]
- my @out;
- my $bc = q{[sql-param braille_code]};
- push @out, $bc if $bc;
- if ('[sql-param contracted]'){
- push @out, 'Contracted';
- }else{
- push @out, 'Uncontracted';
- }
- if ('[sql-param interpoint]'){
- push @out, 'Interpoint';
- }else{
- push @out, 'Single-sided';
- }
- if ('[sql-param graphic_pages]' > 0){
- push @out, 'Graphic Pages';
- }
- if ('[sql-param partial]'){
- push @out, '<br /><i>Partial Transcription</i>';
- if ('[sql-param partial_description]') {
- $out[$#out] .= ': [sql-param partial_description]';
- }
- }
- my $out = join(', ', @out);
- $out = "Braille type: $out<br>" if $out;
- return $out;
- [/sql-calc]
-</blockquote>
-[query
- sql=|SELECT
- volume, braille_pages as vb_pages,
- graphic_pages as vg_pages, print_page_range,
- price as vprice, notes as vnotes, sort
- FROM transvolumes
- WHERE isbn='[sql-param pkey]' ORDER BY sort, volume|
- prefix=vol
- list=1
-]
-[vol-on-match]
- <table cellpadding="0" cellspacing="0" border="1">
- <tr class="green3_bg" style="text-align: center; font-weight: bold;">
- <td width="75">Volume</td>
- <td width="75">Braille Pages</td>
- <td width="75">Graphic Pages</td>
- <td width="75">Print Pages</td>
- <td width="75">Price</td>
- </tr>
-[/vol-on-match]
-
-[vol-list]
- <tr>
- <td>[vol-param volume]</td>
- <td>[vol-param vb_pages]</td>
- <td>[vol-param vg_pages]</td>
- <td>[if-vol-param !print_page_range] [/if-vol-param][vol-param print_page_range]</td>
- <td>[currency][vol-param vprice][/currency]</td>
- </tr>
- [if-vol-param vnotes]
- <tr>
- <td colspan="5">[vol-param vnotes]</td>
- </tr>
- [/if-vol-param]
-[/vol-list]
-[vol-on-match]
- </table><br /> <br />
-[/vol-on-match]
-[vol-no-match]
-
-[/vol-no-match]
-[/query]
-
-[/sql-list]
-
-
-[sql-no-match]
-<p>Sorry, no results were found for '[cgi w]'.</p>
-[if type=explicit condition="return 1 if $CGI->{c} eq 't'; return 0;"]
-<p>Our textbook database is still being built. If you can't find your textbook
-here, [page education/contact]contact us</a>; we may have what you need.</p>
-[/if]
-[/sql-no-match]
-[/query]
-
-<p class="content">For textbooks under 100 pages, add an $80 production fee to the price. Please <a href="[area education/contact]">contact us</a> for more information about purchasing this textbook.</p>
-
- </div>
-</div>
-<!-- END CONTENT -->
-
-[calc interpolate=0]
- my $area = uc($Scratch->{nbp_area});
- $area = 'PUBLICATIONS' unless exists $Variable->{$area . '_TEMPLATE_BOTTOM'};
- if ($CGI->{c} eq 't') {
- return $Variable->{EDUCATION_TEMPLATE_BOTTOM};
- }
- elsif ($CGI->{c} eq 'p') {
- return $Variable->{PUBLICATIONS_TEMPLATE_BOTTOM};
- }
- else {
- return $Variable->{$area . '_TEMPLATE_BOTTOM'};
- }
-[/calc]
-[seti nbp_area][/seti]
+[comment]
+ui_page: find.html
+ui_type: page
+ui_name: find.html
+ui_page_template: publications
+ui_version: 4.9.7
+ui_page_version: 4.9.7
+ui_source: find.html
+
+
+[control reset=1]
+[control reset=1]
+
+[seti xtitle]NBP - Search Results[/seti]
+[calc interpolate=0]
+ my $area = uc($Scratch->{nbp_area});
+ $area = 'PUBLICATIONS' unless exists $Variable->{$area . '_TEMPLATE_TOP'};
+ $Tag->tmp('template_bottom', $area . '_TEMPLATE_BOTTOM');
+ if ($CGI->{c} eq 't') {
+ return $Variable->{EDUCATION_TEMPLATE_TOP};
+ }
+ elsif ($CGI->{c} eq 'p') {
+ return $Variable->{PUBLICATIONS_TEMPLATE_TOP};
+ }
+ else {
+ return $Variable->{$area . '_TEMPLATE_TOP'};
+ }
+[/calc]
+[/comment]
+[set xtitle]NBP - Custom Education Services: Textbooks[/set]
+ at _TITLE_@
+[var MENU_BAR]
+[set xbannerImageSrc]/nbp/images/secondarymenu/education.jpg[/set]
+[var TOP_BANNER_SECONDARY]
+
+<!-- BEGIN CONTENT -->
+<div class="box_m5px">
+ <h1 class="contentheader">[CGI t_title]</h1>
+ <div class="content_area">
+
+[calc interpolate=0]
+ my (@words, @isbn, @query);
+ my $w = $CGI->{w};
+
+ # get ISBNs with or without hyphens
+ while ($w =~ s/\b([0-9][0-9-]{8,11}[0-9Xx]\b)//g) {
+ my $i = $1;
+ $i =~ s/-//g;
+ push @isbn, $i;
+ }
+
+ # break up other punctuated and whitespace-separated words and parts
+ $w =~ s/[^A-Za-z0-9]/ /g;
+ push @words, grep /\S/, split / /, $w;
+
+ if (! $CGI->{c} or $CGI->{c} eq 'p') {
+ my @where = ('NOT c.inactive');
+
+ my @fields = qw(
+ vp.code
+ vp.format_name
+ vp.title
+ vp.authors
+ vp.summary
+ vp.description
+ sc.name
+ c.name
+ );
+ for my $word (@words) {
+ my @limit;
+ for my $field (@fields) {
+ push @limit, "$field ILIKE '%$word%'";
+ }
+ push @where, '(' . join("\nOR ", @limit) . ')';
+ }
+
+ if (@isbn) {
+ push @where, "vp.isbn IN (" . join(',', map { "'$_'" } @isbn) . ")";
+ }
+
+ my $where = '';
+ $where = 'WHERE ' . join("\nAND ", @where) if @where;
+
+ push @query, <<EOQ;
+SELECT DISTINCT vp.sku AS pkey, 'p'::char AS type,
+ vp.title, vp.authors, vp.summary,
+ sc.subcat_id, c.name AS cat_name,
+ sc.name AS subcat_name,
+ NULL::varchar AS edition, NULL::varchar AS publisher,
+ NULL::varchar AS copyright, NULL::varchar AS level,
+ NULL::varchar AS braille_code, NULL::boolean AS contracted,
+ NULL::boolean AS interpoint, NULL::smallint AS volume_count
+FROM variants_pretty vp
+LEFT JOIN subcats sc
+ ON sc.subcat_id = vp.subcat_id
+LEFT JOIN cats c
+ ON c.cat_id = sc.cat_id
+$where
+EOQ
+ }
+
+ if (! $CGI->{c} or $CGI->{c} eq 't') {
+ my @where;
+
+ my @fields = qw(
+ t.title
+ t.edition
+ t.authors
+ t.publisher
+ t.copyright
+ t.level
+ t.braille_code
+ t.partial_description
+ t.notes
+ v.volume
+ v.print_page_range
+ v.notes
+ );
+ for my $word (@words) {
+ my @limit;
+ for my $field (@fields) {
+ push @limit, "$field ILIKE '%$word%'";
+ }
+ push @where, '(' . join("\nOR ", @limit) . ')';
+ }
+
+ if (@isbn) {
+ push @where, "t.isbn IN (" . join(',', map { "'$_'" } @isbn) . ")";
+ }
+
+ my $where = '';
+ $where = 'WHERE ' . join("\nAND ", @where) if @where;
+
+ push @query, <<EOQ;
+SELECT DISTINCT t.isbn AS pkey, 't'::char AS type,
+ t.title, t.authors, t.notes AS summary,
+ NULL::smallint AS subcat_id, NULL::varchar AS cat_name,
+ NULL::varchar AS subcat_name,
+ t.edition, t.publisher,
+ t.copyright, t.level,
+ t.braille_code, t.contracted,
+ t.interpoint, t.volume_count,
+ t.graphic_pages, t.partial,
+ t.partial_description, CURRENT_DATE AS today,
+ t.completion_date, t.price,
+ t.complete
+FROM transtitles t
+LEFT JOIN transvolumes v
+ ON t.isbn = v.isbn
+$where
+EOQ
+ }
+
+ $Tag->tmp(
+ 'query',
+ join("\n\nUNION\n\n\n", @query) . "\nORDER BY title, pkey"
+ );
+ return;
+[/calc]
+
+[comment]
+<pre>[scratch query]</pre>
+[/comment]
+
+[query
+ sql=|[scratch query]|
+ ml=50
+ more=1
+ list=1
+]
+[sql-on-match]
+[more-list]
+<p>Results [matches] of [match-count]
+
+More: [more]
+</p>
+[/more-list]
+[/sql-on-match]
+
+[sql-list]
+ <span style="font-weight: bold;">[sql-param title]</span><br />
+ (ISBN: [sql-param pkey])<br />[if-sql-param !complete]
+ <i>This book is in progress; book page counts and price are estimates, though any listed volumes are complete.</i><br />
+ [/if-sql-param]
+<blockquote>
+ [if-sql-param authors][sql-param authors]<br>[/if-sql-param]
+ [if-sql-param publisher][sql-param publisher]<br>[/if-sql-param]
+ [if-sql-param copyright][sql-param copyright]<br>[/if-sql-param]
+ [if-sql-param edition][sql-param edition]<br>[/if-sql-param]
+ [if-sql-param level][sql-param level]<br>[/if-sql-param]
+ [if-sql-param volume_count][plural][sql-param volume_count] volumes[/plural]<br>[/if-sql-param]
+ [if-sql-param price][currency][sql-param price][/currency][/if-sql-param]
+ [comment][tmp cd][sql-param completion_date][/tmp]
+ [tmp today][sql-param today][/tmp]
+ [if type="explicit" compare="$Scratch->{cd} gt $Scratch->{today}"][/comment][if-sql-param !complete](estimated)[/if-sql-param]<br />
+ [sql-calc]
+ my @out;
+ my $bc = q{[sql-param braille_code]};
+ push @out, $bc if $bc;
+ if ('[sql-param contracted]'){
+ push @out, 'Contracted';
+ }else{
+ push @out, 'Uncontracted';
+ }
+ if ('[sql-param interpoint]'){
+ push @out, 'Interpoint';
+ }else{
+ push @out, 'Single-sided';
+ }
+ if ('[sql-param graphic_pages]' > 0){
+ push @out, 'Graphic Pages';
+ }
+ if ('[sql-param partial]'){
+ push @out, '<br /><i>Partial Transcription</i>';
+ if ('[sql-param partial_description]') {
+ $out[$#out] .= ': [sql-param partial_description]';
+ }
+ }
+ my $out = join(', ', @out);
+ $out = "Braille type: $out<br>" if $out;
+ return $out;
+ [/sql-calc]
+</blockquote>
+[query
+ sql=|SELECT
+ volume, braille_pages as vb_pages,
+ graphic_pages as vg_pages, print_page_range,
+ price as vprice, notes as vnotes, sort
+ FROM transvolumes
+ WHERE isbn='[sql-param pkey]' ORDER BY sort, volume|
+ prefix=vol
+ list=1
+]
+[vol-on-match]
+ <table cellpadding="0" cellspacing="0" border="1">
+ <tr class="green3_bg" style="text-align: center; font-weight: bold;">
+ <td width="75">Volume</td>
+ <td width="75">Braille Pages</td>
+ <td width="75">Graphic Pages</td>
+ <td width="75">Print Pages</td>
+ <td width="75">Price</td>
+ </tr>
+[/vol-on-match]
+
+[vol-list]
+ <tr>
+ <td>[vol-param volume]</td>
+ <td>[vol-param vb_pages]</td>
+ <td>[vol-param vg_pages]</td>
+ <td>[if-vol-param !print_page_range] [/if-vol-param][vol-param print_page_range]</td>
+ <td>[currency][vol-param vprice][/currency]</td>
+ </tr>
+ [if-vol-param vnotes]
+ <tr>
+ <td colspan="5">[vol-param vnotes]</td>
+ </tr>
+ [/if-vol-param]
+[/vol-list]
+[vol-on-match]
+ </table><br /> <br />
+[/vol-on-match]
+[vol-no-match]
+
+[/vol-no-match]
+[/query]
+
+[/sql-list]
+
+
+[sql-no-match]
+<p>Sorry, no results were found for '[cgi w]'.</p>
+[if type=explicit condition="return 1 if $CGI->{c} eq 't'; return 0;"]
+<p>Our textbook database is still being built. If you can't find your textbook
+here, [page education/contact]contact us</a>; we may have what you need.</p>
+[/if]
+[/sql-no-match]
+[/query]
+
+<p class="content">For textbooks under 100 pages, add an $80 production fee to the price. Please <a href="[area education/contact]">contact us</a> for more information about purchasing this textbook.</p>
+
+ </div>
+</div>
+<!-- END CONTENT -->
+
+[calc interpolate=0]
+ my $area = uc($Scratch->{nbp_area});
+ $area = 'PUBLICATIONS' unless exists $Variable->{$area . '_TEMPLATE_BOTTOM'};
+ if ($CGI->{c} eq 't') {
+ return $Variable->{EDUCATION_TEMPLATE_BOTTOM};
+ }
+ elsif ($CGI->{c} eq 'p') {
+ return $Variable->{PUBLICATIONS_TEMPLATE_BOTTOM};
+ }
+ else {
+ return $Variable->{$area . '_TEMPLATE_BOTTOM'};
+ }
+[/calc]
+[seti nbp_area][/seti]
diff --git a/catalogs/nbp/pages/programs/readbooks/parent_info.html b/catalogs/nbp/pages/programs/readbooks/parent_info.html
index 0b82d32..d92c741 100644
--- a/catalogs/nbp/pages/programs/readbooks/parent_info.html
+++ b/catalogs/nbp/pages/programs/readbooks/parent_info.html
@@ -1,105 +1,105 @@
-[set xtitle]NBP - ReadBooks! Program - Info for Parents of Blind and Visually Impaired Children<[/set]
- at _TITLE_@
-[var MENU_BAR]
-[set xbannerImageSrc]/nbp/images/secondarymenu/programs.jpg[/set]
-[var TOP_BANNER_SECONDARY]
-
-<!-- BEGIN CONTENT -->
-
-<div class=box_m5px>
- <h1 class="contentheader">Information for Parents of Blind and Visually Impaired Children</h1>
- <div class="content_area">
-
- <div style="float: right;">
- <img src="/nbp/images/readbooks/readbooks_logo.gif" width="261" height="177" border="0" alt="ReadBooks Logo" /><br />
-
- </div>
-
- <div>
- <div class="mission_statement" style="width: 248; text-align: left; font-weight: bold;">"She absolutely loves her book! The first day we received the book, she had me read it to her, literally, about ten times. She ran her fingers across the braille and looked at the big, bright pictures. It has become one of her favorite books."</div>
- </div>
-<BR>
-<h2 class="subheader_a">Did You Know?</h2>
-
-<p>Did you know that as the parent of a blind or visually impaired child you are eligible to receive <b>One Free Braille Book Bag</b> from National Braille Press?</p>
-
-<p>Learning that your child has a disability can feel very overwhelming and it can be difficult to know where to go for help or where to find resources. We're here to make things just a little bit easier!</p>
-
-<p>If your child is between the ages of birth and seven and is blind or visually impaired, we will send you one free Braille Bag full of fun and easy-to-read resources for both you and your child. And remember, you can request one Braille Bag for <i>every</i> blind child in your family!</p>
-
-<p>Of course, you may not yet know exactly what your child's abilities will be. What can he see? Will she be a braille reader? Some parents may not know the answers to these questions until their children are much older, but that doesn't mean you can't expose them to braille in the meantime! Just <a href="request.html">fill out the form</a>, order a free Braille Bag, and begin the lifetime of learning and reading that you and your child will enjoy, no matter what their abilities may be!</p>
-
-<P>Bags are available in English or Spanish.
-
-</P>
-
-
- <br />
-
-
- <div style="clear: both;">
-<h2 class="subheader_a">Braille Bags Contain:</h2>
-
- <ol type="1">
- <li>An age-appropriate print/braille book for three age groups: birth-3, 4-5, and 6-7 in English or Spanish;</li>
- <li>A braille primer for sighted parents entitled <a href="http://www.nbp.org/ic/nbp/JETKB.html">Just Enough to Know Better</a>;</li>
-
- <li>A tactile ball (red bags only);</li>
- <li>Print/braille bookmark;</li>
-
- <li>Print/braille alphabet card;</LI>
- <li><a href="http://www.nbp.org/ic/nbp/BBM.html">Because Books Matter</a>, a guide for parents on why and how to read books with their young blind child;</li>
- <li><a href="http://www.nbp.org/ic/nbp/BPM.html">Because Pictures Matter</a>, a guide for parents on the importance of tactile pictures for their blind child;
- <LI>A tactile maze or flag;</li>
-
- <LI>Wikki Stix, a product that allows a child to make tactile pictures (green or blue bags only);</li>
-
- <li>A gift coupon redeemable for another print/braille book or braille/large print playing cards;</li>
-
- <li>Print/braille magnetic letters or numbers (blue or green bags only);</li>
-
-
-<li>A Braille Caravan block;</li>
-
-<li>A description of the program on DVD.</li>
-
-
- </ol>
- </div>
-
- <br />
-
-<h2 class="subheader_a">How to Order a Braille Bag</h2>
-
- <p>Ordering a bag is easy. Just fill out our <a href="request.html">ReadBooks Order Form</a>. Remember to let us know how many blind children are in your family and their ages so we can send you the appropriate bags.</p>
-
-<p>Also, once you've received your bag, please take the time to send us your <a href="feedback.html">feedback</a> to let us know what you think about the program.</p>
-
- <br />
-
-<div style="clear: both; width: 100%;"> </div>
-
-<h2 class="subheader_a">What Other Parents are Saying</h2>
-
-<p><I>I want to tell you how wonderful the braille book bag that I received from you all for my 6-year-old son who is visually impaired. My daughter who is sighted has also benefitted greatly from the information in the bag.
-She is a very good braille typer and is even better now that she has learned more about contractions, etc. She has transcribed some kids books for a vision teacher in a local public school. She is a good resource for her brother. My husband and I have also learned a lot about braille and we are all continually impressed on how braille is used to bring the world to children who are blind or visually impaired. Thank you for making these bags so easily available!
-
-</i>
-</p>
- </div>
-
-</td>
-</tr>
-</table>
-</site_search_ignore>
- <script src="http://www.google-analytics.com/urchin.js"
- type="text/javascript">
- </script>
- <script type="text/javascript">
- _uacct = "UA-3009011-1";
- urchinTracker();
- </script>
-
-<!-- END CONTENT -->
-
+[set xtitle]NBP - ReadBooks! Program - Info for Parents of Blind and Visually Impaired Children<[/set]
+ at _TITLE_@
+[var MENU_BAR]
+[set xbannerImageSrc]/nbp/images/secondarymenu/programs.jpg[/set]
+[var TOP_BANNER_SECONDARY]
+
+<!-- BEGIN CONTENT -->
+
+<div class=box_m5px>
+ <h1 class="contentheader">Information for Parents of Blind and Visually Impaired Children</h1>
+ <div class="content_area">
+
+ <div style="float: right;">
+ <img src="/nbp/images/readbooks/readbooks_logo.gif" width="261" height="177" border="0" alt="ReadBooks Logo" /><br />
+
+ </div>
+
+ <div>
+ <div class="mission_statement" style="width: 248; text-align: left; font-weight: bold;">"She absolutely loves her book! The first day we received the book, she had me read it to her, literally, about ten times. She ran her fingers across the braille and looked at the big, bright pictures. It has become one of her favorite books."</div>
+ </div>
+<BR>
+<h2 class="subheader_a">Did You Know?</h2>
+
+<p>Did you know that as the parent of a blind or visually impaired child you are eligible to receive <b>One Free Braille Book Bag</b> from National Braille Press?</p>
+
+<p>Learning that your child has a disability can feel very overwhelming and it can be difficult to know where to go for help or where to find resources. We're here to make things just a little bit easier!</p>
+
+<p>If your child is between the ages of birth and seven and is blind or visually impaired, we will send you one free Braille Bag full of fun and easy-to-read resources for both you and your child. And remember, you can request one Braille Bag for <i>every</i> blind child in your family!</p>
+
+<p>Of course, you may not yet know exactly what your child's abilities will be. What can he see? Will she be a braille reader? Some parents may not know the answers to these questions until their children are much older, but that doesn't mean you can't expose them to braille in the meantime! Just <a href="request.html">fill out the form</a>, order a free Braille Bag, and begin the lifetime of learning and reading that you and your child will enjoy, no matter what their abilities may be!</p>
+
+<P>Bags are available in English or Spanish.
+
+</P>
+
+
+ <br />
+
+
+ <div style="clear: both;">
+<h2 class="subheader_a">Braille Bags Contain:</h2>
+
+ <ol type="1">
+ <li>An age-appropriate print/braille book for three age groups: birth-3, 4-5, and 6-7 in English or Spanish;</li>
+ <li>A braille primer for sighted parents entitled <a href="[area JETKB.html]">Just Enough to Know Better</a>;</li>
+
+ <li>A tactile ball (red bags only);</li>
+ <li>Print/braille bookmark;</li>
+
+ <li>Print/braille alphabet card;</LI>
+ <li><a href="[area BBM.html]">Because Books Matter</a>, a guide for parents on why and how to read books with their young blind child;</li>
+ <li><a href="[area BPM.html]">Because Pictures Matter</a>, a guide for parents on the importance of tactile pictures for their blind child;
+ <LI>A tactile maze or flag;</li>
+
+ <LI>Wikki Stix, a product that allows a child to make tactile pictures (green or blue bags only);</li>
+
+ <li>A gift coupon redeemable for another print/braille book or braille/large print playing cards;</li>
+
+ <li>Print/braille magnetic letters or numbers (blue or green bags only);</li>
+
+
+<li>A Braille Caravan block;</li>
+
+<li>A description of the program on DVD.</li>
+
+
+ </ol>
+ </div>
+
+ <br />
+
+<h2 class="subheader_a">How to Order a Braille Bag</h2>
+
+ <p>Ordering a bag is easy. Just fill out our <a href="request.html">ReadBooks Order Form</a>. Remember to let us know how many blind children are in your family and their ages so we can send you the appropriate bags.</p>
+
+<p>Also, once you've received your bag, please take the time to send us your <a href="feedback.html">feedback</a> to let us know what you think about the program.</p>
+
+ <br />
+
+<div style="clear: both; width: 100%;"> </div>
+
+<h2 class="subheader_a">What Other Parents are Saying</h2>
+
+<p><I>I want to tell you how wonderful the braille book bag that I received from you all for my 6-year-old son who is visually impaired. My daughter who is sighted has also benefitted greatly from the information in the bag.
+She is a very good braille typer and is even better now that she has learned more about contractions, etc. She has transcribed some kids books for a vision teacher in a local public school. She is a good resource for her brother. My husband and I have also learned a lot about braille and we are all continually impressed on how braille is used to bring the world to children who are blind or visually impaired. Thank you for making these bags so easily available!
+
+</i>
+</p>
+ </div>
+
+</td>
+</tr>
+</table>
+</site_search_ignore>
+ <script src="http://www.google-analytics.com/urchin.js"
+ type="text/javascript">
+ </script>
+ <script type="text/javascript">
+ _uacct = "UA-3009011-1";
+ urchinTracker();
+ </script>
+
+<!-- END CONTENT -->
+
[var FOOTER]
\ No newline at end of file
diff --git a/catalogs/nbp/pages/publications/books_by_subcat.html b/catalogs/nbp/pages/publications/books_by_subcat.html
index 0d36c08..f74e7f4 100644
--- a/catalogs/nbp/pages/publications/books_by_subcat.html
+++ b/catalogs/nbp/pages/publications/books_by_subcat.html
@@ -1,70 +1,60 @@
-[comment]
-ui_page: publications/all_books.html
-ui_type: page
-ui_name: publications/all_books.html
-ui_page_template: publications
-ui_version: 4.9.7
-ui_page_version: 4.9.7
-ui_source: publications/all_books.html
-[/comment]
-
-
-
-[control reset=1]
-[control reset=1]
-
-[seti xtitle]NBP - Our Bookstore - All Books[/seti]
- at _PUBLICATIONS_TEMPLATE_TOP_@
-<!-- BEGIN CONTENT -->
-<div class="box_m5px">
- <h1 class="contentheader">All Books</h1>
- <div class="content_area">
-
-[query
- sql=|
-SELECT sc.subcat_id, cats.name AS cat_name, sc.name AS subcat_name, sku, title
-FROM cats, subcats sc, products p
-WHERE cats.cat_id = sc.cat_id
-AND sc.subcat_id = p.subcat_id
-AND NOT p.inactive
-AND NOT p.hidden
-AND NOT cats.inactive
-ORDER BY cat_name, subcat_name, title
- |
- ml=50
- more=1
- list=1
-]
-[sql-on-match]
-[more-list]
-<p>Results [matches] of [match-count]
-
-More: [more]
-</p>
-[/more-list]
-[/sql-on-match]
-
-[sql-list]
- [sql-change subcat]
- [condition][sql-param subcat_name][/condition]
- <h1>[sql-param cat_name]: [sql-param subcat_name]</h1>
- [/sql-change subcat]
-
- [page [sql-param sku]][sql-param title]</a><br>
-[/sql-list]
-
-[sql-on-match]
-[more-list]
-<p>Results [matches] of [match-count]
-
-More: [more]
-</p>
-[/more-list]
-[/sql-on-match]
-[/query]
-
-
- </div>
-</div>
-<!-- END CONTENT -->
- at _PUBLICATIONS_TEMPLATE_BOTTOM_@
+[seti xtitle]NBP - Bookstore: All Books[/seti]
+
+ at _TITLE_@
+[var MENU_BAR]
+[set xbannerImageSrc]/nbp/images/secondarymenu/bookstore.jpg[/set]
+[var TOP_BANNER_SECONDARY]
+
+<!-- BEGIN CONTENT -->
+<div class="box_m5px">
+ <h1 class="contentheader">All Books</h1>
+ <div class="content_area">
+
+[query
+ sql=|
+SELECT sc.subcat_id, cats.name AS cat_name, sc.name AS subcat_name, sku, title
+FROM cats, subcats sc, products p
+WHERE cats.cat_id = sc.cat_id
+AND sc.subcat_id = p.subcat_id
+AND NOT p.inactive
+AND NOT p.hidden
+AND NOT cats.inactive
+ORDER BY cat_name, subcat_name, title
+ |
+ ml=50
+ more=1
+ list=1
+]
+[sql-on-match]
+[more-list]
+<p>Results [matches] of [match-count]
+
+More: [more]
+</p>
+[/more-list]
+[/sql-on-match]
+
+[sql-list]
+ [sql-change subcat]
+ [condition][sql-param subcat_name][/condition]
+ <h1>[sql-param cat_name]: [sql-param subcat_name]</h1>
+ [/sql-change subcat]
+
+ [page [sql-param sku]][sql-param title]</a><br>
+[/sql-list]
+
+[sql-on-match]
+[more-list]
+<p>Results [matches] of [match-count]
+
+More: [more]
+</p>
+[/more-list]
+[/sql-on-match]
+[/query]
+
+
+ </div>
+</div>
+<!-- END CONTENT -->
+[var FOOTER]
diff --git a/catalogs/nbp/pages/publications/browse_results.html b/catalogs/nbp/pages/publications/browse_results.html
index cc432eb..9013b28 100644
--- a/catalogs/nbp/pages/publications/browse_results.html
+++ b/catalogs/nbp/pages/publications/browse_results.html
@@ -1,116 +1,110 @@
-[comment]
-ui_page: publications/adult_books.html
-ui_type: page
-ui_name: publications/adult_books.html
-ui_page_template: publications
-ui_version: 4.9.7
-ui_page_version: 4.9.7
-ui_source: publications/adult_books.html
-[/comment]
-[control reset=1]
-[control reset=1]
-
-[seti xtitle]NBP - Our Bookstore - [value heading][/seti]
- at _PUBLICATIONS_TEMPLATE_TOP_@
-<!-- BEGIN CONTENT -->
-<div class="box_m5px">
- <h1 class="contentheader">[value heading]</h1>
- <div class="content_area">
-[query
- sql=|
-SELECT DISTINCT sku, title, sort, image, summary
-FROM variants_pretty
-WHERE subcat_id = '[value subcat_id]'
- AND NOT member_only
- AND NOT hidden
-ORDER BY sort, title
- |
- type=list
- more=1
- ml=20
-]
-
-[on_match]
- [more_list]<div class=helpfulblurb2>
- <center>[matches] of [match_count]<br />
- More: [more]</center></div>
- [/more_list]
- <table>
-[/on_match]
-
-[list]
-<tr>
- <td valign=top align=right>[image src="book_photos/[sql-param image]_SM.jpg" border="0" alt=""]</td>
- <td valign=top>
- [sql-calc]
- return unless $option_select = q{[sql-options
- label=1
- type=select
- type_single=labels
- price=1
- all_prices=1
- option_count=option_count
- additional_options='additional_options'
- separator=":"
- joiner="<br>"
- extra='id="0"'
- separator=":"
- ]};
- $option_select =~ s/id="0"/id="[sql-code]"/;
- my $out = <<'EOF';
- <form action="[area order]" method="post">
- <input type="hidden" name="mv_session_id" value="[data session id]" />
- <input type="hidden" name="mv_order_item" value="[sql-code]" />
- <a href="[area [sql-code]]">[sql-param title]</a><br />
- [sql-param summary]<br />
-EOF
- if ($Scratch->{'additional_options'}) {
-# <a href="[area href='[sql-code]']">Select options for [sql-code]</a><br />
- $out .= <<'EOF';
- </form>
-EOF
- } else {
- $out .= $option_select;
- $out .= <<'EOF';
- <input type=submit value="Add to Cart"> <br />
- </form>
-EOF
- }
- return $out;
- [/sql-calc]
- </td>
-</tr>
-[/list]
-[on_match]</table>
-[more_list]<div class=helpfulblurb2>
-<center>[matches] of [match_count]<br />
- more: [more]</center>
-</div>
-[/more_list]
-[/on_match]
-[/query]
-
-[comment]
-[sql-list]
- [sql-change subcat]
- [condition][sql-param subcat_name][/condition]
- <h1>[sql-param subcat_name]</h1>
- [/sql-change subcat]
-
- [page [sql-param sku]][sql-param title]</a><br>
-[/sql-list]
-
-[sql-on-match]
-[more-list]
-<div class=helpfulblurb2>
- <center>[matches] of [match-count]<br />
-More: [more]</center>
-</div>
-[/more-list]
-[/sql-on-match]
-[/query]
-[/comment]
- </div>
-</div>
-<!-- END CONTENT -->
- at _PUBLICATIONS_TEMPLATE_BOTTOM_@
+
+[seti xtitle]NBP - Bookstore: [value heading][/seti]
+
+ at _TITLE_@
+[var MENU_BAR]
+[set xbannerImageSrc]/nbp/images/secondarymenu/bookstore.jpg[/set]
+[var TOP_BANNER_SECONDARY]
+
+<!-- BEGIN CONTENT -->
+<div class="box_m5px">
+ <h1 class="contentheader">[value heading]</h1>
+ <div class="content_area">
+[query
+ sql=|
+SELECT DISTINCT sku, title, sort, image, summary
+FROM variants_pretty
+WHERE subcat_id = '[value subcat_id]'
+ AND NOT member_only
+ AND NOT hidden
+ORDER BY sort, title
+ |
+ type=list
+ more=1
+ ml=20
+]
+
+[on_match]
+ [more_list]<div class=helpfulblurb2>
+ <center>[matches] of [match_count]<br />
+ More: [more]</center></div>
+ [/more_list]
+ <table>
+[/on_match]
+
+[list]
+<tr>
+ <td valign=top align=right>[image src="book_photos/[sql-param image]_SM.jpg" border="0" alt=""]</td>
+ <td valign=top>
+ [sql-calc]
+ return unless $option_select = q{[sql-options
+ label=1
+ type=select
+ type_single=labels
+ price=1
+ all_prices=1
+ option_count=option_count
+ additional_options='additional_options'
+ separator=":"
+ joiner="<br>"
+ extra='id="0"'
+ separator=":"
+ ]};
+ $option_select =~ s/id="0"/id="[sql-code]"/;
+ my $out = <<'EOF';
+ <form action="[area order]" method="post">
+ <input type="hidden" name="mv_session_id" value="[data session id]" />
+ <input type="hidden" name="mv_order_item" value="[sql-code]" />
+ <a href="[area [sql-code]]">[sql-param title]</a><br />
+ [sql-param summary]<br />
+EOF
+ if ($Scratch->{'additional_options'}) {
+# <a href="[area href='[sql-code]']">Select options for [sql-code]</a><br />
+ $out .= <<'EOF';
+ </form>
+EOF
+ } else {
+ $out .= $option_select;
+ $out .= <<'EOF';
+ <input type=submit value="Add to Cart"> <br />
+ </form>
+EOF
+ }
+ return $out;
+ [/sql-calc]
+ </td>
+</tr>
+[/list]
+[on_match]</table>
+[more_list]<div class=helpfulblurb2>
+<center>[matches] of [match_count]<br />
+ more: [more]</center>
+</div>
+[/more_list]
+[/on_match]
+[/query]
+
+[comment]
+[sql-list]
+ [sql-change subcat]
+ [condition][sql-param subcat_name][/condition]
+ <h1>[sql-param subcat_name]</h1>
+ [/sql-change subcat]
+
+ [page [sql-param sku]][sql-param title]</a><br>
+[/sql-list]
+
+[sql-on-match]
+[more-list]
+<div class=helpfulblurb2>
+ <center>[matches] of [match-count]<br />
+More: [more]</center>
+</div>
+[/more-list]
+[/sql-on-match]
+[/query]
+[/comment]
+ </div>
+</div>
+<!-- END CONTENT -->
+[var FOOTER]
hooks/post-receive
--
UNNAMED PROJECT
More information about the Web-reskin
mailing list