aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-02-20 13:43:06 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-02-20 13:43:06 +0000
commitfd6dca81042d7a1a200657e4975ada2564404db3 (patch)
tree0524e26a44326dffc3a2e99850b717630a25700f /templates
parent76ed2e494b220780d8e247f9348f8f09a9d5fee8 (diff)
downloadsemanticscuttle-fd6dca81042d7a1a200657e4975ada2564404db3.tar.gz
semanticscuttle-fd6dca81042d7a1a200657e4975ada2564404db3.tar.bz2
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
Diffstat (limited to 'templates')
-rw-r--r--templates/bookmarks.tpl.php24
-rw-r--r--templates/sidebar.block.common.php7
-rw-r--r--templates/sidebar.block.linked.php4
-rw-r--r--templates/sidebar.block.popular.php7
-rw-r--r--templates/sidebar.block.recent.php7
-rw-r--r--templates/sidebar.tpl.php1
6 files changed, 46 insertions, 4 deletions
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;
<?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 != '') {
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) {
<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
+?>
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 '</td></tr>';
}
+ 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) {
<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
+?>
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) {
<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
+?>
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 @@
<div id="sidebar">
<?php
+
$size = count($sidebar_blocks);
for ($i = 0; $i < $size; $i++) {
$this->includeTemplate('sidebar.block.'. $sidebar_blocks[$i]);