From 1eca2d231c79c046a3c122a09bd761fa8f641a6e Mon Sep 17 00:00:00 2001
From: mensonge
Date: Tue, 19 May 2009 15:59:55 +0000
Subject: Many interface changes: add 'back to the top links', a variable to
display more bookmarks for admins...
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@329 b3834d28-1941-0410-a4f8-b48e95affb8f
---
templates/bookmarks.tpl.php | 107 +++++++++++++++++++++-----------------
templates/sidebar.block.users.php | 2 +-
2 files changed, 60 insertions(+), 49 deletions(-)
(limited to 'templates')
diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php
index 5aefc82..5820a4b 100644
--- a/templates/bookmarks.tpl.php
+++ b/templates/bookmarks.tpl.php
@@ -133,6 +133,60 @@ if($currenttag!= '') {
}
?>
+'. T_('First') .'';
+ $bprev = ''. T_('Previous') .'';
+ } else {
+ $prev = $page - 1;
+ $prev = 'page='. $prev;
+ $start = ($page - 1) * $perpage;
+ $bfirst= ''. T_('First') .'';
+ $bprev = ''. T_('Previous') .'';
+ }
+
+ // Next
+ $next = $page + 1;
+ $totalpages = ceil($total / $perpage);
+ if (count($bookmarks) < $perpage || $perpage * $page == $total) {
+ $bnext = ''. T_('Next') .'';
+ $blast = ''. T_('Last') ."\n";
+ } else {
+ $bnext = ''. T_('Next') .'';
+ $blast = ''. T_('Last') ."\n";
+ }
+
+ // RSS
+ $brss = '';
+ $size = count($rsschannels);
+ for ($i = 0; $i < $size; $i++) {
+ $brss = '
';
+ }
+
+ $pagesBanner = ''. $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
+ }
+
+
+?>
+
0 ? ' start="'. ++$start .'"' : ''); ?>
@@ -204,7 +258,7 @@ if($currenttag!= '') {
if ($userservice->isLoggedOn()
&& ($currentUser->getId() != $row['uId'])
&& !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())) {
- $copy .= ' - '. T_('Copy') .'';
+ $copy .= ' - '. T_('Copy') .'';
}
// Nofollow option
@@ -272,54 +326,11 @@ if($currenttag!= '') {
'. T_('First') .'';
- $bprev = ''. T_('Previous') .'';
- } else {
- $prev = $page - 1;
- $prev = 'page='. $prev;
- $start = ($page - 1) * $perpage;
- $bfirst= ''. T_('First') .'';
- $bprev = ''. T_('Previous') .'';
- }
-
- // Next
- $next = $page + 1;
- $totalpages = ceil($total / $perpage);
- if (count($bookmarks) < $perpage || $perpage * $page == $total) {
- $bnext = ''. T_('Next') .'';
- $blast = ''. T_('Last') ."\n";
- } else {
- $bnext = ''. T_('Next') .'';
- $blast = ''. T_('Last') ."\n";
+ if(getPerPageCount($currentUser)>7) {
+ echo ''.T_('Top of the page').'
';
}
-
- // RSS
- $brss = '';
- $size = count($rsschannels);
- for ($i = 0; $i < $size; $i++) {
- $brss = '
';
- }
-
- echo ''. $bfirst .' / '. $bprev .' / '. $bnext .' / '. $blast .' / '. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ."
\n";
-
-
-
+ echo $pagesBanner; // display previous and next links pages + RSS link
+
} else {
echo ''.T_('No bookmarks available').'
';
diff --git a/templates/sidebar.block.users.php b/templates/sidebar.block.users.php
index b6eef24..3ad18bc 100644
--- a/templates/sidebar.block.users.php
+++ b/templates/sidebar.block.users.php
@@ -11,7 +11,7 @@ $lastUsers = $userservice->getUsers(3);
if ($lastUsers && count($lastUsers) > 0) {
?>
-
+