From 3a5dafcdc4efff42ff7f6d4f630b7666ff73248f Mon Sep 17 00:00:00 2001 From: mensonge Date: Mon, 9 Feb 2009 14:05:21 +0000 Subject: 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 --- templates/bookmarks.tpl.php | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'templates/bookmarks.tpl.php') 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'])
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'])). "
";
- echo nl2br(filter($description['cdDescription'])). "
";
+ $cDescription = $cdservice->getLastBookmarkDescription($hash);
+ echo nl2br(filter($cDescription['cdTitle'])). "
";
+ echo nl2br(filter($cDescription['cdDescription'])). "
";
}
//common tag description edit
if($userservice->isLoggedOn()) {
- if($currenttag!= '') {
- echo ' ';
- echo T_('common description').' ';
+ if($currenttag!= '' && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] || $currentUser->isAdmin())) {
+ echo ' ';
+ echo !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):'';
+ echo ' ';
} elseif(isset($hash)) {
- echo ' (';
- echo T_('edit common description').')';
+ echo ' (';
+ echo T_('Edit the common description of this bookmark').')';
}
}
?>
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 ' '; - echo T_('personal description').' '; + echo ' '; + echo strlen($pDescription['tDescription'])==0?T_('Edit your personal description of this tag'):''; + echo ' '; } } ?>
-- cgit v1.2.3-54-g00ecf