summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_search_results.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2012-09-19 02:42:01 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-09-19 02:42:01 +0200
commit4aad42d993619d03040d1a96d133c7784aa4bc28 (patch)
treec23f89412ac2ec93a16889b4addedf0c1575a930 /web/template/pkg_search_results.php
parent7c004693f720eafd3013119bb290cbd5ccdbda60 (diff)
downloadaur-4aad42d993619d03040d1a96d133c7784aa4bc28.tar.gz
aur-4aad42d993619d03040d1a96d133c7784aa4bc28.tar.xz
Sync search result statistics with archweb
* Use archweb classes for search result statistics. * Add some space between page numbers. * Display current page number instead of current item range. * Hide page numbers if the result fits into a single page. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template/pkg_search_results.php')
-rw-r--r--web/template/pkg_search_results.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index 11db7a14..13e0b44c 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -11,8 +11,9 @@ if (!$result): ?>
<div class="box"><p><?php echo __("No packages matched your search criteria.") ?></p></div>
<?php else: ?>
<div id="pkglist-results" class="box">
- <div id="pkglist-stats-top">
- <p><?php echo __('%s Packages found. Showing %s - %s', $total, $first, $last) ?></p>
+ <div class="pkglist-stats">
+ <p><?php echo __('%d packages found. Page %d of %d.', $total, $current, $pages) ?></p>
+ <?php if (count($templ_pages) > 1): ?>
<p class="pkglist-nav">
<?php foreach ($templ_pages as $pagenr => $pagestart): ?>
<?php if ($pagestart === false): ?>
@@ -24,6 +25,7 @@ if (!$result): ?>
<?php endif; ?>
<?php endforeach; ?>
</p>
+ <?php endif; ?>
</div>
<form id="pkglist-results-form" method="post" action="<?php echo get_uri('/packages/'); ?>?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>">
@@ -80,9 +82,9 @@ if (!$result): ?>
</tbody>
</table>
- <div id="pkglist-stats-bottom">
- <p><?php echo __('%s Packages found. Showing %s - %s', $total, $first, $last) ?></p>
-
+ <div class="pkglist-stats">
+ <p><?php echo __('%d packages found. Page %d of %d.', $total, $current, $pages) ?></p>
+ <?php if (count($templ_pages) > 1): ?>
<p class="pkglist-nav">
<?php foreach ($templ_pages as $pagenr => $pagestart): ?>
<?php if ($pagestart === false): ?>
@@ -94,6 +96,7 @@ if (!$result): ?>
<?php endif; ?>
<?php endforeach; ?>
</p>
+ <?php endif; ?>
</div>
<?php if ($SID): ?>