diff options
author | simo <simo> | 2005-10-17 02:36:55 +0200 |
---|---|---|
committer | simo <simo> | 2005-10-17 02:36:55 +0200 |
commit | 170d68f61ff5653c1b8dae89d127298cd1965f04 (patch) | |
tree | 39ed9250c6d48b40c871d1364420a7c6512783f8 /web | |
parent | 452ab3a1fd01a026d883892ad76b75dae232c395 (diff) | |
download | aur-170d68f61ff5653c1b8dae89d127298cd1965f04.tar.gz aur-170d68f61ff5653c1b8dae89d127298cd1965f04.tar.xz |
Move search sorting to column headers
Sort by age still exists, need to reimplement in UI
Diffstat (limited to 'web')
-rw-r--r-- | web/lib/pkgfuncs.inc | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index e277ef5b..b633a1fb 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -664,7 +664,7 @@ function pkg_search_page($SID="") { print " value=\"".stripslashes($K)."\" maxlength='35'>\n"; print "</td>\n"; - print "<td align='right'>\n"; +/* print "<td align='right'>\n"; print " <span class='f5'><span class='blue'>".__("Sort by"); print "</span></span><br />\n"; print " <select name='SB'>\n"; @@ -711,7 +711,7 @@ function pkg_search_page($SID="") { print " </select>\n"; print "</td>\n"; - +*/ print "<td align='right'>\n"; print " <span class='f5'><span class='blue'>".__("Per page"); print "</span></span><br />\n"; @@ -896,6 +896,14 @@ function pkg_search_page($SID="") { # print out package search results # + + # SO_next used to change sort order on header click + if ($_REQUEST["SO"] == "d"){ + $SO_next="a"; + } else { + $SO_next="d"; + } + print "<center>\n"; print "<table cellspacing='3' class='boxSoft'>\n"; print "<tr>\n"; @@ -912,21 +920,32 @@ function pkg_search_page($SID="") { print " bottom'> </th>\n"; } print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>".__("Location")."</span></th>\n"; + print " bottom'><span class='f2'>"; + print "<a href='?O=$O&L=".intval($_REQUEST["L"])."&C=".intval($_REQUEST["C"])."&K=$K&SB=l&SO=$SO_next&PP=$PP'>".__("Location")."</a>"; + print "</span></th>\n"; print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>".__("Category")."</span></th>\n"; + print " bottom'><span class='f2'>"; + print "<a href='?O=$O&L=".intval($_REQUEST["L"])."&C=".intval($_REQUEST["C"])."&K=$K&SB=c&SO=$SO_next&PP=$PP'>".__("Category")."</a>"; + print "</span></th>\n"; print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>".__("Name")."</span></th>\n"; + print " bottom'><span class='f2'>"; + print "<a href='?O=$O&L=".intval($_REQUEST["L"])."&C=".intval($_REQUEST["C"])."&K=$K&SB=n&SO=$SO_next&PP=$PP'>".__("Name")."</a>"; + print "</span></th>\n"; print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>".__("Votes")."</span></th>\n"; + print " bottom'><span class='f2'>"; + print "<a href='?O=$O&L=".intval($_REQUEST["L"])."&C=".intval($_REQUEST["C"])."&K=$K&SB=v&SO=$SO_next&PP=$PP'>".__("Votes")."</a>"; + print "</span></th>\n"; if ($SID) { print " <th style='border-bottom: #666 1px solid; vertical-align:"; print " bottom'><span class='f2'>".__("Voted")."</span></th>\n"; } print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>".__("Description")."</span></th>\n"; + print " bottom'><span class='f2'>".__("Description")."</a>"; + print "</span></th>\n"; print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>".__("Maintainer")."</span></th>\n"; + print " bottom'><span class='f2'>"; + print "<a href='?O=$O&L=".intval($_REQUEST["L"])."&C=".intval($_REQUEST["C"])."&K=$K&SB=m&SO=$SO_next&PP=$PP'>".__("Maintainer")."</a>"; + print "</span></th>\n"; # REMOVED LINK TO 'pkgmgmnt.php' # if ($SID) { # print " <th style='border-bottom: #666 1px solid; vertical-align:"; |