summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorChad Kieffer <chad@2tbsp.com>2009-02-13 03:21:19 +0000
committerChad Kieffer <chad@2tbsp.com>2009-02-13 03:21:19 +0000
commit5dad40b1ae4b1aedce928dc2e3abac3b6b13c636 (patch)
treef69893cb9e34b977904cfca2940aeed216598b91 /modules
parent985a324ec7f3c8aaf277850aee68be2e00607686 (diff)
Ticket #2. Tighten up search results UI.
Diffstat (limited to 'modules')
-rw-r--r--modules/search/views/search.html.php56
1 files changed, 35 insertions, 21 deletions
diff --git a/modules/search/views/search.html.php b/modules/search/views/search.html.php
index 8d47eed4..fb1fd8a9 100644
--- a/modules/search/views/search.html.php
+++ b/modules/search/views/search.html.php
@@ -1,35 +1,49 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="gSearchForm">
- <form action="<?= url::site("/search") ?>">
- <fieldset>
- <legend>
- <?= t("Search") ?>
- </legend>
- <ul>
- <li>
- <input name="q" type="text" value="<?= $q ?>"/>
- </li>
- <li>
- <input type="submit"/>
- </li>
- </ul>
- </fieldset>
- </form>
+<? // @todo Set hover on AlbumGrid list items ?>
+<form action="<?= url::site("/search") ?>" id="gSearchForm">
+ <fieldset>
+ <legend>
+ <?= t("Search") ?>
+ </legend>
+ <ul>
+ <li>
+ <label for="q"><?= t("Search the gallery") ?></label>
+ <input name="q" id="q" type="text" value="<?= $q ?>"/>
+ </li>
+ <li>
+ <input type="submit" value="<?= t("Search") ?>" />
+ </li>
+ </ul>
+ </fieldset>
+</form>
- <ul>
+<div id="gSearchResults">
+ <h1><?= t("Search Results") ?></h1>
+
+ <? if (count($items)): ?>
+ <ul id="gAlbumGrid">
<? foreach ($items as $item): ?>
- <li>
+ <? $item_class = "gPhoto"; ?>
+ <? if ($item->is_album()): ?>
+ <? $item_class = "gAlbum"; ?>
+ <? endif ?>
+ <li class="gItem <?= $item_class ?>">
<a href="<?= url::site("items/$item->id") ?>">
<?= $item->thumb_tag() ?>
<p>
<?= $item->title ?>
</p>
- <p>
+ <div>
<?= $item->description ?>
- </p>
+ </div>
</a>
</li>
<? endforeach ?>
</ul>
+ <?= $theme->pager() ?>
+
+ <? else: ?>
+ <p><?= t("No results found for '") . $q . "'" ?></p>
+
+ <? endif; ?>
</div>
-<?= $theme->pager() ?>