Skip to content

Commit

Permalink
Add proper templates for search results page
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWr authored and asmecher committed Oct 28, 2015
1 parent 4e18c72 commit b7a4a71
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 2 additions & 0 deletions locale/en_US/locale.xml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@
<message key="catalog.browseTitles">{$numTitles} Titles</message>
<message key="catalog.feature">Feature</message>
<message key="catalog.featuredBooks">Featured Books</message>
<message key="catalog.foundTitleSearch">One title was found which matched your search for "{$searchQuery}".</message>
<message key="catalog.foundTitlesSearch">{$number} titles were found which matched your search for "{$searchQuery}".</message>
<message key="catalog.allBooks">All Books</message>
<message key="catalog.newReleases">New Releases</message>
<message key="catalog.dateAdded">Added {$dateAdded}</message>
Expand Down
25 changes: 13 additions & 12 deletions templates/frontend/pages/searchResults.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,27 @@
{include file="common/frontend/header.tpl" pageTitle="search.searchResults"}

<div class="page page_catalog">
<h1 class="page_title">
{translate key="search.searchResults"}
</h1>

{* Breadcrumb *}
{include file="frontend/components/breadcrumbs.tpl" type="category" currentTitleKey="search.searchResults"}
<div class="monograph_count">
{translate key="catalog.browseTitles" numTitles=$publishedMonographs|@count}
</div
</div>

{* No published titles *}
{if !$publishedMonographs|@count}
<p>{translate key="catalog.noTitlesSearch" searchQuery=$searchQuery}</p>
<div>{translate key="catalog.noTitlesSearch" searchQuery=$searchQuery}</div>

{* Monograph List *}
{else}
<ul class="cmp_monographs_list">
{foreach from=$publishedMonographs item=monograph}
<li>
{include file="frontend/objects/monograph_summary.tpl" monograph=$monograph}
</li>
{/foreach}
</ul>
<div>
{if $publishedMonographs|@count > 1}
{translate key="catalog.foundTitlesSearch" searchQuery=$searchQuery number=$publishedMonographs|@count}
{else}
{translate key="catalog.foundTitleSearch" searchQuery=$searchQuery}
{/if}
</div>
{include file="frontend/components/monographList.tpl" monographs=$publishedMonographs}
{/if}

</div><!-- .page -->
Expand Down

0 comments on commit b7a4a71

Please sign in to comment.