/templates/fullsearch.tmpl
Type: /type/template
body: value: $def with (q, results, nums, timings, errortext=None)
$ _ = i18n.get_namespace('/search')


<style type="text/css">
<!--
h2.Match { font-size: 1.25em; font-weight: bold; color: #000; margin-bottom: 20px;}
h5 { font-size: 13px; font-variant: small-caps; margin-top: 10px; margin-bottom: 5px;}
.SearchBox { margin-top: 10px; margin-bottom: 30px;}
.ErrorMsg { background-color: #fc0; padding: 5px; font-family: Verdana, Arial; font-size: 11px; }
.FacetList { background-color: #f5f5f5; padding-top: 0px; padding-right: 20px; padding-bottom: 10px; padding-left: 10px; line-height: 18px; }
.FacetResultCount {color: #666; font-family: Verdana, Arial; font-size: 9px;}
.Switch {color: #666; font-family: Verdana, Arial; font-size: 11px; font-weight: normal;}
.Chosen { font-size: 1.1em; }
.Chosen a { color: #333; text-decoration: none; }
.ClearX {font-family: Verdana, Arial; font-size: 12px; color: #f33; font-weight: bold; }
.SRPCover { margin-top: 10px; margin-right: 0px; margin-bottom: 20px; margin-left: 40px; float:left; height: 255px; vertical-align: middle; }
.SRPCover img { border-right: 1px solid #666; border-bottom: 1px solid #666; }
.SRPCoverBlank { width: 170px; height: 255px; margin-top: 10px; margin-right: 0px; margin-bottom: 20px; margin-left: 40px; float:left; vertical-align: middle; text-align: center; float:left; background: transparent url("/static/images/blank.book.new.png") 0px 3px no-repeat;}
.BookTitle { color: #f9f8d0; width: 180px; height: 250px; vertical-align: middle; display: table-cell; padding-left: 8px; }
.Author { color: #fff; font-style: italic; font-size: 12px; line-height: 15px; padding-right: 4px; padding-left: 4px; }
.ReadNow { font-variant: small-caps; color: #3333ff; text-decoration: underline; }
.Pages {padding: 20px; font-family: Verdana, Arial; font-size: 11px; }
.Pages .YouAreHere { border: 1px solid #ddd; padding: 5px; }
.Pages .ChoosePage { border: 1px solid #ddd; padding: 5px; }
.AddBook { font-size: 14px; color: #666; padding: 10px; text-align: center; font-style: italic; margin-top: 20px;}
.SearchTime { margin-top: 20px; color: #666; font-family: Verdana, Arial; font-size: 9px; font-weight: normal; }
-->
</style>


$add_stylesheet("/css/search.css?format=raw")

$ total_nbr = nums.total_nbr
$ offset = nums.offset
$ rows = nums.rows

$ npages = ((total_nbr + rows - 1) / rows)
$ this_page = (offset / rows) + 1

$var title: Searching Available Full Text
<!-- Timings: ($timings) -->
<!--
<table><tr bgcolor=yellow><td>nbr: $total_nbr <br>
offset: $offset <br> 
rows: $rows <br>
this_page: $this_page
</td></tr></table>
-->


<div id="header-fullpage">

  <span id="title">Full Text Search Results</span>
  
  <form method="get" action="/fullsearch">
    <div class="SearchBox"><input style="background-color: #f8f8f8; font-family: georgia; font-size: 18px; color: #6F320D; border: 1px solid #ccc; padding-left: 4px;" type="text" name="q" value="$q" size="40" />
    <button class="go" type="submit">go</button>&nbsp;&nbsp;<span class="Switch">&nbsp;&nbsp;<a href="/advanced">More search options</a></span>
    </div>
  </form>

  
  $if errortext: 
      <div id="error">Error: $errortext</div>  
  $if not errortext:
      <h2 class="Match">There are $total_nbr matching records.
        $if query_param('view')=='covers':
          <span class="Switch">Show: <a href="$changequery(view='list')">List</a> / <b>Covers</b></span>
        $else:
          <span class="Switch">Show: <b>List</b> / <a href="$changequery(view='covers')">Covers</a></span>
      </h2>
</div>

<!-- BEGIN SEARCH -->   
    
$if query_param('view')=='covers':
    $:macros.SearchResultsCovers(results, fulltext=True)
    <br clear="all">
$else:
    $:macros.SearchResults(results, fulltext=True)

</div></div><br clear="all">

$if npages > 1: $:macros.SearchPagination(q, 1, npages, this_page, rows)
title: fulltext search template