mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-12 07:39:07 -04:00
- search.html.php - updated to use new labels. - search_link.html.php - updated to use new labels. Moved code that determines current album to top, then used it for both the new label and the hidden album input. Resulting form code looks more symmetric to search.html.php.
23 lines
820 B
PHP
23 lines
820 B
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<form action="<?= url::site("search") ?>" id="g-quick-search-form" class="g-short-form">
|
|
<? if (isset($item)): ?>
|
|
<? $album_id = $item->is_album() ? $item->id : $item->parent_id; ?>
|
|
<? else: ?>
|
|
<? $album_id = item::root()->id; ?>
|
|
<? endif; ?>
|
|
<ul>
|
|
<li>
|
|
<? if ($album_id == item::root()->id): ?>
|
|
<label for="g-search"><?= t("Search the gallery") ?></label>
|
|
<? else: ?>
|
|
<label for="g-search"><?= t("Search this album") ?></label>
|
|
<? endif; ?>
|
|
<input type="hidden" name="album" value="<?= $album_id ?>" />
|
|
<input type="text" name="q" id="g-search" class="text" />
|
|
</li>
|
|
<li>
|
|
<input type="submit" value="<?= t("Go")->for_html_attr() ?>" class="submit" />
|
|
</li>
|
|
</ul>
|
|
</form>
|