From cadcca8d6a30da90b76d827bb3c293ee918312eb Mon Sep 17 00:00:00 2001 From: cweiske Date: Wed, 28 Oct 2009 22:30:12 +0000 Subject: [PATCH] add sort-by-voting to frontend git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@461 b3834d28-1941-0410-a4f8-b48e95affb8f --- data/templates/bookmarks.tpl.php | 80 ++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/data/templates/bookmarks.tpl.php b/data/templates/bookmarks.tpl.php index 7a47a7f..adb6a19 100644 --- a/data/templates/bookmarks.tpl.php +++ b/data/templates/bookmarks.tpl.php @@ -92,36 +92,56 @@ window.onload = playerLoad;

- -/ -/ + +/ + +/ + + +/ + + +'. $bfirst .' / '. $bprev .' / '. $bnext .' / '. $blast .' / '. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ."

\n"; - + if (getPerPageCount($currentUser) > 10) { echo $pagesBanner; // display a page banner if too many bookmarks to manage - } + } ?> @@ -230,14 +250,14 @@ if($currenttag!= '') { if ($bookmarkservice->editAllowed($row)) { $edit = ' - '. T_('Edit') .''; } - + // Last update $update = ' ('. date($GLOBALS['shortdate'], strtotime($row['bModified'])). ') '; // User attribution $copy = ' '. T_('by'). ' '; if($userservice->isLoggedOn() && $currentUser->getUsername() == $row['username']) { - $copy.= T_('you'); + $copy.= T_('you'); } else { $copy.= ''. $row['username'] .''; } @@ -282,7 +302,7 @@ if($currenttag!= '') { if ($GLOBALS['useredir']) { $address = $GLOBALS['url_redir'] . $address; } - + // Admin specific design if($userservice->isAdmin($row['uId'])) { $adminBgClass = 'class="adminBackground"'; @@ -291,19 +311,19 @@ if($currenttag!= '') { $adminBgClass = ''; $adminStar = ''; } - + // Private Note (just visible by the owner and his/her contacts) if($userservice->isLoggedOn() && ($currentUser->getId() == $row['uId'] || in_array($row['username'], $userservice->getWatchNames($currentUser->getId(), true)))) { $privateNoteField = $row['bPrivateNote']; } else { $privateNoteField = ''; } - + // Output echo '
  • '."\n"; include 'bookmarks-thumbnail.inc.tpl.php'; include 'bookmarks-vote.inc.tpl.php'; - + echo '
    ';; echo '\n"; @@ -314,7 +334,7 @@ if($currenttag!= '') { $bkDescription = preg_replace('|\[\/.*?\]|', '', filter($row['bDescription'])); // remove final anchor $bkDescription = preg_replace('|\[(.*?)\]|', ' $1 ยป ', $bkDescription); // highlight starting anchor $bkDescription = preg_replace('@((http|https|ftp)://.*?)( |\r|$)@', '$1$3', $bkDescription); // make url clickable - + } echo '
    '. nl2br($bkDescription) ."
    \n"; //if(!isset($hash)) { @@ -332,11 +352,11 @@ if($currenttag!= '') { 7) { + if(getPerPageCount($currentUser)>7) { echo '

    '.T_('Top of the page').'

    '; } echo $pagesBanner; // display previous and next links pages + RSS link - + } else { echo '

    '.T_('No bookmarks available').'

    ';