pkg_search_results.php: Split out package results box

Do not print the wrapper div container when calling pkg_search_page().

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2017-02-04 00:28:37 +01:00
parent 3b4c6e72a9
commit b6aced9692
2 changed files with 89 additions and 89 deletions

View file

@ -98,11 +98,13 @@ if (isset($pkgid)) {
$_GET['SB'] = 'p'; $_GET['SB'] = 'p';
$_GET['SO'] = 'd'; $_GET['SO'] = 'd';
} }
echo '<div id="pkglist-results" class="box">';
if (isset($_COOKIE["AURSID"])) { if (isset($_COOKIE["AURSID"])) {
pkg_search_page($_GET, true, $_COOKIE["AURSID"]); pkg_search_page($_GET, true, $_COOKIE["AURSID"]);
} else { } else {
pkg_search_page($_GET, true); pkg_search_page($_GET, true);
} }
echo '</div>';
} }
html_footer(AURWEB_VERSION); html_footer(AURWEB_VERSION);

View file

@ -1,10 +1,9 @@
<?php <?php
if (!$result): ?> if (!$result): ?>
<div class="box"><p><?= __("Error retrieving package list.") ?></p></div> <p><?= __("Error retrieving package list.") ?></p>
<?php elseif ($total == 0): ?> <?php elseif ($total == 0): ?>
<div class="box"><p><?= __("No packages matched your search criteria.") ?></p></div> <p><?= __("No packages matched your search criteria.") ?></p>
<?php else: ?> <?php else: ?>
<div id="pkglist-results" class="box">
<?php if ($show_headers): ?> <?php if ($show_headers): ?>
<div class="pkglist-stats"> <div class="pkglist-stats">
<p> <p>
@ -132,5 +131,4 @@ if (!$result): ?>
<?php endif; # if ($SID) ?> <?php endif; # if ($SID) ?>
<?php endif; ?> <?php endif; ?>
</form> </form>
</div>
<?php endif; # search was successful and returned multiple results ?> <?php endif; # search was successful and returned multiple results ?>