2009-01-17 00:52:50 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
2009-02-13 03:21:19 +00:00
|
|
|
<? // @todo Set hover on AlbumGrid list items ?>
|
|
|
|
|
<form action="<?= url::site("/search") ?>" id="gSearchForm">
|
|
|
|
|
<fieldset>
|
|
|
|
|
<legend>
|
|
|
|
|
<?= t("Search") ?>
|
|
|
|
|
</legend>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2009-07-07 12:25:19 -07:00
|
|
|
<label for="q"><?= t("Search the gallery") ?></label>
|
2009-05-31 00:11:48 -07:00
|
|
|
<input name="q" id="q" type="text" value="<?= p::clean($q) ?>"/>
|
2009-02-13 03:21:19 +00:00
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<input type="submit" value="<?= t("Search") ?>" />
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</form>
|
2009-01-17 00:52:50 +00:00
|
|
|
|
2009-02-13 03:21:19 +00:00
|
|
|
<div id="gSearchResults">
|
|
|
|
|
<h1><?= t("Search Results") ?></h1>
|
|
|
|
|
|
|
|
|
|
<? if (count($items)): ?>
|
|
|
|
|
<ul id="gAlbumGrid">
|
2009-01-17 00:52:50 +00:00
|
|
|
<? foreach ($items as $item): ?>
|
2009-02-13 03:21:19 +00:00
|
|
|
<? $item_class = "gPhoto"; ?>
|
|
|
|
|
<? if ($item->is_album()): ?>
|
|
|
|
|
<? $item_class = "gAlbum"; ?>
|
|
|
|
|
<? endif ?>
|
|
|
|
|
<li class="gItem <?= $item_class ?>">
|
2009-01-17 00:52:50 +00:00
|
|
|
<a href="<?= url::site("items/$item->id") ?>">
|
2009-06-02 12:08:47 -07:00
|
|
|
<?= $item->thumb_img() ?>
|
2009-01-17 00:52:50 +00:00
|
|
|
<p>
|
2009-07-03 21:44:10 -07:00
|
|
|
<?= p::purify($item->title) ?>
|
2009-01-17 00:52:50 +00:00
|
|
|
</p>
|
2009-02-13 03:21:19 +00:00
|
|
|
<div>
|
2009-07-04 08:17:12 -07:00
|
|
|
<?= nl2br(p::purify($item->description)) ?>
|
2009-02-13 03:21:19 +00:00
|
|
|
</div>
|
2009-01-17 00:52:50 +00:00
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<? endforeach ?>
|
|
|
|
|
</ul>
|
2009-02-13 03:21:19 +00:00
|
|
|
<?= $theme->pager() ?>
|
|
|
|
|
|
|
|
|
|
<? else: ?>
|
2009-05-31 00:11:48 -07:00
|
|
|
<p>
|
|
|
|
|
<?= t("No results found for <b>%term</b>", array("term" => p::clean($q))) ?>
|
|
|
|
|
</p>
|
2009-02-13 03:21:19 +00:00
|
|
|
|
|
|
|
|
<? endif; ?>
|
2009-01-17 00:52:50 +00:00
|
|
|
</div>
|