Add sorting by "Voted" and "Notify" fields

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
Lukas Fleischer 2010-05-30 00:20:42 +02:00 committed by Loui Chang
parent 290c436046
commit b18fb08ddc
3 changed files with 27 additions and 9 deletions

View file

@ -56,7 +56,7 @@
<label><?php print __("Sort by"); ?></label>
<select name='SB'>
<?php
$sortby = array('n' => 'Name', 'c' => 'Category', 'l' => 'Location', 'v' => 'Votes', 'm' => 'Maintainer', 'a' => 'Age');
$sortby = array('n' => 'Name', 'c' => 'Category', 'l' => 'Location', 'v' => 'Votes', 'w' => 'Voted', 'o' => 'Notify', 'm' => 'Maintainer', 'a' => 'Age');
foreach ($sortby as $k => $v):
if ($_REQUEST['SB'] == $k):
?>

View file

@ -29,8 +29,12 @@
</span></th>
<?php if ($SID): ?>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Voted") ?></span></th>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Notify") ?></span></th>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
<a href='?<?php print mkurl('SB=w&SO=' . $SO_next) ?>'><?php print __("Voted") ?></a>
</span></th>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
<a href='?<?php print mkurl('SB=o&SO=' . $SO_next) ?>'><?php print __("Notify") ?></a>
</span></th>
<?php endif; ?>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Description") ?></span></th>
<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>