summaryrefslogtreecommitdiff
path: root/templates/bookmarks.tpl.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-02-09 14:05:21 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-02-09 14:05:21 +0000
commit3a5dafcdc4efff42ff7f6d4f630b7666ff73248f (patch)
treecefb61dde7f3ca7837761e90249e91c47a51619e /templates/bookmarks.tpl.php
parent6a7316fe016688453c1eec93f5f2b9fdb09aa048 (diff)
downloadsemanticscuttle-3a5dafcdc4efff42ff7f6d4f630b7666ff73248f.tar.gz
semanticscuttle-3a5dafcdc4efff42ff7f6d4f630b7666ff73248f.tar.bz2
Minor Fix: improve common description of tags and add variable into config file to allow or not everybody to edit these descriptions [Config file modified: ]
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@263 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'templates/bookmarks.tpl.php')
-rw-r--r--templates/bookmarks.tpl.php31
1 files changed, 17 insertions, 14 deletions
diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php
index adb6b24..b0ed3e8 100644
--- a/templates/bookmarks.tpl.php
+++ b/templates/bookmarks.tpl.php
@@ -35,23 +35,25 @@ if(($currenttag!= '' && $GLOBALS['enableCommonTagDescription'])
<p class="commondescription"><?php
+$cDescription = '';
if($currenttag!= '' && $cdservice->getLastTagDescription($currenttag)) {
- $description = $cdservice->getLastTagDescription($currenttag);
- echo nl2br(filter($description['cdDescription']));
+ $cDescription = $cdservice->getLastTagDescription($currenttag);
+ echo nl2br(filter($cDescription['cdDescription']));
} elseif(isset($hash) && $cdservice->getLastBookmarkDescription($hash)) {
- $description = $cdservice->getLastBookmarkDescription($hash);
- echo nl2br(filter($description['cdTitle'])). "<br/>";
- echo nl2br(filter($description['cdDescription'])). "<br/>";
+ $cDescription = $cdservice->getLastBookmarkDescription($hash);
+ echo nl2br(filter($cDescription['cdTitle'])). "<br/>";
+ echo nl2br(filter($cDescription['cdDescription'])). "<br/>";
}
//common tag description edit
if($userservice->isLoggedOn()) {
- if($currenttag!= '') {
- echo ' <a href="'. createURL('tagcommondescriptionedit', $currenttag).'">';
- echo T_('common description').' <img src="'.ROOT.'images/b_edit.png" /></a>';
+ if($currenttag!= '' && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] || $currentUser->isAdmin())) {
+ echo ' <a href="'. createURL('tagcommondescriptionedit', $currenttag).'" title="'.T_('Edit the common description of this tag').'">';
+ echo !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):'';
+ echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
} elseif(isset($hash)) {
- echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $hash).'">';
- echo T_('edit common description').'</a>)';
+ echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $hash).'" title="'.T_('Edit the common description of this bookmark').'">';
+ echo T_('Edit the common description of this bookmark').'</a>)';
}
}
?></p>
@@ -65,14 +67,15 @@ if($currenttag!= '' && $user!='') {
if($tagservice->getDescription($currenttag, $userObject['uId'])) { ?>
<p class="commondescription"><?php
-$description = $tagservice->getDescription($currenttag, $userObject['uId']);
-echo nl2br(filter($description['tDescription']));
+$pDescription = $tagservice->getDescription($currenttag, $userObject['uId']);
+echo nl2br(filter($pDescription['tDescription']));
//personal tag description edit
if($userservice->isLoggedOn()) {
if($currenttag!= '') {
- echo ' <a href="'. createURL('tagedit', $currenttag).'">';
- echo T_('personal description').' <img src="'.ROOT.'images/b_edit.png" /></a>';
+ echo ' <a href="'. createURL('tagedit', $currenttag).'" title="'.T_('Edit your personal description of this tag').'" >';
+ echo strlen($pDescription['tDescription'])==0?T_('Edit your personal description of this tag'):'';
+ echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
}
}
?></p>