add sort-by-voting to frontend
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@461 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
55554bc0f1
commit
cadcca8d6a
1 changed files with 50 additions and 30 deletions
|
@ -92,36 +92,56 @@ window.onload = playerLoad;
|
|||
|
||||
<p id="sort"><?php echo $total.' '.T_("bookmark(s)"); ?> - <?php echo T_("Sort by:"); ?>
|
||||
<?php
|
||||
$titleArrow = '';
|
||||
$dateArrow = '';
|
||||
$votingArrow = '';
|
||||
$dateSort = 'date_desc';
|
||||
$titleSort = 'title_asc';
|
||||
$votingSort = 'voting_asc';
|
||||
|
||||
switch(getSortOrder()) {
|
||||
case 'date_asc':
|
||||
$titleArrow = '';
|
||||
case 'date_asc':
|
||||
$dateArrow = ' ↑';
|
||||
$dateSort = 'date_desc';
|
||||
$titleSort = 'title_asc';
|
||||
break;
|
||||
case 'title_asc':
|
||||
|
||||
case 'title_asc':
|
||||
$titleArrow = ' ↑';
|
||||
$dateArrow = '';
|
||||
$dateSort = 'date_desc';
|
||||
$titleSort = 'title_desc';
|
||||
break;
|
||||
case 'title_desc':
|
||||
|
||||
case 'title_desc':
|
||||
$titleArrow = ' ↓';
|
||||
$dateArrow = '';
|
||||
$dateSort = 'date_desc';
|
||||
$titleSort = 'title_asc';
|
||||
break;
|
||||
case 'date_desc':
|
||||
default:
|
||||
$titleArrow = '';
|
||||
|
||||
case 'voting_asc':
|
||||
$votingArrow = ' ↑';
|
||||
$votingSort = 'voting_desc';
|
||||
break;
|
||||
|
||||
case 'voting_desc':
|
||||
$votingArrow = ' ↓';
|
||||
$votingSort = 'voting_asc';
|
||||
break;
|
||||
|
||||
case 'date_desc':
|
||||
default:
|
||||
$dateArrow = ' ↓';
|
||||
$dateSort = 'date_asc';
|
||||
$titleSort = 'title_asc';
|
||||
break;
|
||||
}
|
||||
?> <a href="?sort=<?php echo $dateSort ?>"><?php echo T_("Date").$dateArrow; ?></a><span>
|
||||
/ </span> <a href="?sort=<?php echo $titleSort ?>"><?php echo T_("Title").$titleArrow; ?></a><span>
|
||||
/ </span> <?php
|
||||
?>
|
||||
<a href="?sort=<?php echo $dateSort ?>"><?php echo T_("Date").$dateArrow; ?></a>
|
||||
<span>/</span>
|
||||
<a href="?sort=<?php echo $titleSort ?>"><?php echo T_("Title").$titleArrow; ?></a>
|
||||
<span>/</span>
|
||||
<?php if ($GLOBALS['enableVoting']) { ?>
|
||||
<a href="?sort=<?php echo $votingSort ?>"><?php echo T_("Voting").$votingArrow; ?></a>
|
||||
<span>/</span>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if($currenttag!= '') {
|
||||
if($user!= '') {
|
||||
echo ' - ';
|
||||
|
|
Loading…
Reference in a new issue