]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Interface fix: make consistent the general navigation between personal and common...
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Wed, 20 Feb 2008 13:43:06 +0000 (13:43 +0000)
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Wed, 20 Feb 2008 13:43:06 +0000 (13:43 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@47 b3834d28-1941-0410-a4f8-b48e95affb8f

history.php
index.php
tags.php
templates/bookmarks.tpl.php
templates/sidebar.block.common.php
templates/sidebar.block.linked.php
templates/sidebar.block.popular.php
templates/sidebar.block.recent.php
templates/sidebar.tpl.php

index 568a8b61f1d03cffb0cf62f099a2c0ab8a28bc81..f7ae9271092d0a1f9e5ed90d72314f96ded8ac36 100644 (file)
@@ -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
+?>
index 74572545dc3047221e45b8715ec23d930d7ef793..f70f72b5067c1f03621ff3c85b14fed2064f82a4 100644 (file)
--- 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;
 
index 81956fdccda78445c6c8f67ba1949293ee6ea469..e44c592515d63ed80c60dd01ac6652a1a517f47a 100644 (file)
--- 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);
index 7837e6cf5db408db11dae4ea4105c97bed0a8c44..e4cfe0462d1e9997bd260515534d6524c1242ebb 100644 (file)
@@ -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;
     <?php
     }
     ?>
+
+    <?php
+    if(isset($currenttag)) {
+       if(isset($user)) {
+           echo ' - ';
+           echo '<a href="'. createURL('tags', $currenttag) .'">';
+           echo T_('Bookmarks from other users for these tags').'</a>';
+           //echo T_(' for these tags');
+       } else if($logged_on_userid>0){
+           echo ' - ';
+           echo '<a href="'. createURL('bookmarks', $currentUsername.'/'.$currenttag) .'">';
+           echo T_('Only your bookmarks for these tags').'</a>';
+           //echo T_(' for these tags');
+       }
+    }
+    ?>
 </p>
 
+
+
 <ol<?php echo ($start > 0 ? ' start="'. ++$start .'"' : ''); ?> id="bookmarks">
 
     <?php
@@ -76,8 +97,9 @@ window.onload = playerLoad;
         $cats = '';
         $tags = $row['tags'];
         foreach(array_keys($tags) as $key) {
+
             $tag =& $tags[$key];
-            $cats .= '<a href="'. sprintf($cat_url, filter($user, 'url'), filter($tag, 'url')) .'" rel="tag">'. filter($tag) .'</a>, ';
+            $cats .= '<a href="'. sprintf($cat_url, filter($row['username'], 'url'), filter($tag, 'url')) .'" rel="tag">'. filter($tag) .'</a>, ';
         }
         $cats = substr($cats, 0, -2);
         if ($cats != '') {
index 205ca1eb91d5701e1fe1bab5ce1198cbf26433a7..e92efa7693a063873d22a839ce08fc072fbb1816 100644 (file)
@@ -11,6 +11,11 @@ if ($commonTags && count($commonTags) > 0) {
     <p class="tags">
     <?php
     $contents = '';
+
+    if(strlen($user)==0) {
+       $cat_url = createURL('tags', '%2$s');
+    }
+
     foreach ($commonTags as $row) {
         $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
         $contents .= '<a href="'. sprintf($cat_url, $user, filter($row['tag'], 'url')) .'" title="'. $row['bCount'] .' '. $entries .'" rel="tag" style="font-size:'. $row['size'] .'">'. filter($row['tag']) .'</a> ';
@@ -22,4 +27,4 @@ if ($commonTags && count($commonTags) > 0) {
 
 <?php
 }
-?>
\ No newline at end of file
+?>
index 164327297c71411e889b471315405871f09c3bda..3856141b640580864ec8a741b4e50b3b1a7b6600 100644 (file)
@@ -118,6 +118,10 @@ if ($currenttag) {
            echo '</td></tr>';
        }
 
+       if(strlen($user)==0) {
+           $cat_url = createURL('tags', '%2$s');
+       }
+
        $stopList = array();
        foreach($explodedTags as $explodedTag) {
            if(!in_array($explodedTag, $stopList)) {
index fc9703d174bd17ac25fd68ea2e41c168dc6dd8a4..446e9b22b46b0e2e5d5f73fa152e0f3e7e6b1c40 100644 (file)
@@ -17,6 +17,11 @@ if ($popularTags && count($popularTags) > 0) {
     <p class="tags">
     <?php
     $contents = '';
+    
+    if(strlen($user)==0) {
+       $cat_url = createURL('tags', '%2$s');
+    }
+
     foreach ($popularTags as $row) {
         $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
         $contents .= '<a href="'. sprintf($cat_url, $user, filter($row['tag'], 'url')) .'" title="'. $row['bCount'] .' '. $entries .'" rel="tag" style="font-size:'. $row['size'] .'">'. filter($row['tag']) .'</a> ';
@@ -28,4 +33,4 @@ if ($popularTags && count($popularTags) > 0) {
 
 <?php
 }
-?>
\ No newline at end of file
+?>
index f489e49fd13c6e2d4fc8541afb300aa78e6cc3b2..58a9f844d98e19494536ab47f98dfa6bcf8bcebc 100644 (file)
@@ -16,6 +16,11 @@ if ($recentTags && count($recentTags) > 0) {
 <div id="recent">
     <?php
     $contents = '<p class="tags">';
+
+    if(strlen($user)==0) {
+       $cat_url = createURL('tags', '%2$s');
+    }
+
     foreach ($recentTags as $row) {
         $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
         $contents .= '<a href="'. sprintf($cat_url, $user, filter($row['tag'], 'url')) .'" title="'. $row['bCount'] .' '. $entries .'" rel="tag" style="font-size:'. $row['size'] .'">'. filter($row['tag']) .'</a> ';
@@ -27,4 +32,4 @@ if ($recentTags && count($recentTags) > 0) {
 
 <?php
 }
-?>
\ No newline at end of file
+?>
index 5f399b539c51e33312eae39b140750e44cb5abce..a90b584c1916204ee7facae445e4318822f8e989 100644 (file)
@@ -1,5 +1,6 @@
 <div id="sidebar">
     <?php
+
     $size = count($sidebar_blocks);
     for ($i = 0; $i < $size; $i++) {
         $this->includeTemplate('sidebar.block.'. $sidebar_blocks[$i]);