summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorCallan Barrett <wizzomafizzo@gmail.com>2008-01-23 13:34:10 +0100
committerSimo Leone <simo@archlinux.org>2008-02-19 05:31:56 +0100
commite7bb7a220d1b4778b53f4c8c84c49702d856a3b7 (patch)
tree418a2d41ae8529d1dd6669b3b952dd038ce11fdd /web
parent32be42aee109c2bb8a12b474f364a9d10d2b9da5 (diff)
downloadaur-e7bb7a220d1b4778b53f4c8c84c49702d856a3b7.tar.gz
aur-e7bb7a220d1b4778b53f4c8c84c49702d856a3b7.tar.xz
Turn more and less buttons into links
This is to (at least) fix the more and less buttons which weren't working because of the drop down menu for actions Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Diffstat (limited to 'web')
-rw-r--r--web/lib/pkgfuncs.inc28
1 files changed, 12 insertions, 16 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 1e92a904..c559750e 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -608,18 +608,15 @@ function pkg_search_page($SID="") {
# determine paging variables
#
+ if (intval($_GET['O'])) {
+ $O = $_GET['O'];
+ } else {
+ $O = 0;
+ }
$_REQUEST["PP"] ? $PP = intval($_REQUEST["PP"]) : $PP = 25;
if ($PP < 25) {$PP = 25;}
if ($PP > 100) {$PP = 100;}
- $_REQUEST["O"] ? $O = intval($_REQUEST["O"]) : $O = 0;
- if ($_REQUEST["do_More"]) {
- $O += $PP;
- } elseif ($_REQUEST["do_Less"]) {
- $O -= $PP;
- }
- if ($O < 0) {
- $O = 0;
- }
+
if ($_REQUEST["do_Search"] && $_REQUEST["do_Search"] != 1) {
# reset the offset to zero if they hit Go
#
@@ -1062,6 +1059,7 @@ function pkg_search_page($SID="") {
#
print "<div style='text-align: right; padding: 5px 5% 5px 0'>";
print "<select name='action'>";
+ print "<option>" . __("Actions") . "</option>";
print "<option value='do_Flag'>".__("Flag Out-of-date")."</option>\n";
print "<option value='do_UnFlag'>".__("Unflag Out-of-date")."</option>\n";
print "<option value='do_Adopt'>".__("Adopt Packages")."</option>\n";
@@ -1103,23 +1101,21 @@ function pkg_search_page($SID="") {
print " </span></td>\n";
print " </tr>";
+
# now print the forward and back buttons on the bottom
# LEFT
print " <tr>";
print " <td align='left'>";
if (($O-$PP) >= 0) {
- print " <input type='submit' class='button' name='do_Less'";
- print " value='&lt;-- ".__("Less")."'>\n";
- }
- else {
- print "&nbsp;";
+ print "<a href='/packages.php?O=" . ($O - $PP) . "&L=".intval($_REQUEST["L"])."&C=".intval($_REQUEST["C"])."&K=$K&SB=l&SO=$SO_next&PP=$PP&SeB=".$_REQUEST["SeB"]."&do_MyPackages=".$_REQUEST["do_MyPackages"]."&do_Orphans=".$_REQUEST["do_Orphans"]. "'>" . __("Less") . "</a>";
+ } else if ($O<$PP && $O>0) {
+ print "<a href='/packages.php?O=0'>" . __("Less") . "</a>";
}
print " </td>";
# RIGHT
print " <td align='right'>";
if (mysql_num_rows(db_query($qnext, $dbh))) {
- print " <input type='submit' class='button' name='do_More'";
- print " value='".__("More")." --&gt;'>\n";
+ print "<a href='/packages.php?O=" . ($O + $PP) . "&L=".intval($_REQUEST["L"])."&C=".intval($_REQUEST["C"])."&K=$K&SB=l&SO=$SO_next&PP=$PP&SeB=".$_REQUEST["SeB"]."&do_MyPackages=".$_REQUEST["do_MyPackages"]."&do_Orphans=".$_REQUEST["do_Orphans"]."'>" . __("More") . "</a>";
}
print " </td>\n";
print " </tr>\n";