From fd6dca81042d7a1a200657e4975ada2564404db3 Mon Sep 17 00:00:00 2001 From: mensonge Date: Wed, 20 Feb 2008 13:43:06 +0000 Subject: Interface fix: make consistent the general navigation between personal and common spaces git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@47 b3834d28-1941-0410-a4f8-b48e95affb8f --- history.php | 5 +++-- index.php | 2 +- tags.php | 2 +- templates/bookmarks.tpl.php | 24 +++++++++++++++++++++++- templates/sidebar.block.common.php | 7 ++++++- templates/sidebar.block.linked.php | 4 ++++ templates/sidebar.block.popular.php | 7 ++++++- templates/sidebar.block.recent.php | 7 ++++++- templates/sidebar.tpl.php | 1 + 9 files changed, 51 insertions(+), 8 deletions(-) diff --git a/history.php b/history.php index 568a8b6..f7ae927 100644 --- a/history.php +++ b/history.php @@ -73,7 +73,8 @@ if ($bookmark =& $bookmarkservice->getBookmarkByHash($hash)) { $tplVars['hash'] = $hash; $tplVars['popCount'] = 50; $tplVars['sidebar_blocks'] = array('common'); - $tplVars['cat_url'] = createURL('tags', '%2$s'); + //$tplVars['cat_url'] = createURL('tags', '%2$s'); + $tplVars['cat_url'] = createURL('bookmarks', '%1$s/%2$s'); $tplVars['nav_url'] = createURL('history', $hash .'/%3$s'); $templateservice->loadTemplate('bookmarks.tpl', $tplVars); } else { @@ -87,4 +88,4 @@ if ($usecache) { // Cache output if existing copy has expired $cacheservice->End($cachehash); } -?> \ No newline at end of file +?> diff --git a/index.php b/index.php index 7457254..f70f72b 100644 --- a/index.php +++ b/index.php @@ -75,7 +75,7 @@ $tplVars['bookmarkCount'] = $start + 1; $bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, NULL, NULL, NULL, getSortOrder(), NULL, 0, $dtend); $tplVars['total'] = $bookmarks['total']; $tplVars['bookmarks'] =& $bookmarks['bookmarks']; -$tplVars['cat_url'] = createURL('tags', '%2$s'); +$tplVars['cat_url'] = createURL('bookmarks', '%1$s/%2$s'); $tplVars['nav_url'] = createURL('index', '%3$s'); $tplVars['summarizeLinkedTags'] = true; diff --git a/tags.php b/tags.php index 81956fd..e44c592 100644 --- a/tags.php +++ b/tags.php @@ -76,7 +76,7 @@ $tplVars['bookmarkCount'] = $start + 1; $bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, NULL, $cat, NULL, getSortOrder()); $tplVars['total'] = $bookmarks['total']; $tplVars['bookmarks'] =& $bookmarks['bookmarks']; -$tplVars['cat_url'] = createURL('tags', '%2$s'); +$tplVars['cat_url'] = createURL('bookmarks', '%1$s/%2$s'); $tplVars['nav_url'] = createURL('tags', '%2$s%3$s'); $templateservice->loadTemplate('bookmarks.tpl', $tplVars); diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php index 7837e6c..e4cfe04 100644 --- a/templates/bookmarks.tpl.php +++ b/templates/bookmarks.tpl.php @@ -4,6 +4,9 @@ $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService'); $logged_on_userid = $userservice->getCurrentUserId(); +$currentUser = $userservice->getCurrentUser(); +$currentUsername = $currentUser[$userservice->getFieldName('username')]; + $this->includeTemplate($GLOBALS['top_include']); include('search.inc.php'); @@ -54,8 +57,26 @@ window.onload = playerLoad; + + '; + echo T_('Bookmarks from other users for these tags').''; + //echo T_(' for these tags'); + } else if($logged_on_userid>0){ + echo ' - '; + echo ''; + echo T_('Only your bookmarks for these tags').''; + //echo T_(' for these tags'); + } + } + ?>

+ + 0 ? ' start="'. ++$start .'"' : ''); ?> id="bookmarks"> '. filter($tag) .', '; + $cats .= ', '; } $cats = substr($cats, 0, -2); if ($cats != '') { diff --git a/templates/sidebar.block.common.php b/templates/sidebar.block.common.php index 205ca1e..e92efa7 100644 --- a/templates/sidebar.block.common.php +++ b/templates/sidebar.block.common.php @@ -11,6 +11,11 @@ if ($commonTags && count($commonTags) > 0) {

'. filter($row['tag']) .' '; @@ -22,4 +27,4 @@ if ($commonTags && count($commonTags) > 0) { \ No newline at end of file +?> diff --git a/templates/sidebar.block.linked.php b/templates/sidebar.block.linked.php index 1643272..3856141 100644 --- a/templates/sidebar.block.linked.php +++ b/templates/sidebar.block.linked.php @@ -118,6 +118,10 @@ if ($currenttag) { echo ''; } + if(strlen($user)==0) { + $cat_url = createURL('tags', '%2$s'); + } + $stopList = array(); foreach($explodedTags as $explodedTag) { if(!in_array($explodedTag, $stopList)) { diff --git a/templates/sidebar.block.popular.php b/templates/sidebar.block.popular.php index fc9703d..446e9b2 100644 --- a/templates/sidebar.block.popular.php +++ b/templates/sidebar.block.popular.php @@ -17,6 +17,11 @@ if ($popularTags && count($popularTags) > 0) {

'. filter($row['tag']) .' '; @@ -28,4 +33,4 @@ if ($popularTags && count($popularTags) > 0) { \ No newline at end of file +?> diff --git a/templates/sidebar.block.recent.php b/templates/sidebar.block.recent.php index f489e49..58a9f84 100644 --- a/templates/sidebar.block.recent.php +++ b/templates/sidebar.block.recent.php @@ -16,6 +16,11 @@ if ($recentTags && count($recentTags) > 0) {

'; + + if(strlen($user)==0) { + $cat_url = createURL('tags', '%2$s'); + } + foreach ($recentTags as $row) { $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']); $contents .= ' '; @@ -27,4 +32,4 @@ if ($recentTags && count($recentTags) > 0) { \ No newline at end of file +?> diff --git a/templates/sidebar.tpl.php b/templates/sidebar.tpl.php index 5f399b5..a90b584 100644 --- a/templates/sidebar.tpl.php +++ b/templates/sidebar.tpl.php @@ -1,5 +1,6 @@