summaryrefslogtreecommitdiffstatshomepage
path: root/templates/bookmarks.tpl.php
diff options
context:
space:
mode:
authorGravatar mensonge2008-02-13 17:34:18 +0000
committerGravatar mensonge2008-02-13 17:34:18 +0000
commit484de2408fc42d8f5a25af53df159b2baa42c334 (patch)
treefc70f582126132ea3863f3734af686a762fc95d6 /templates/bookmarks.tpl.php
parente8e5209d51b999f0672e53b368da9046b0a219b9 (diff)
downloadscuttle-484de2408fc42d8f5a25af53df159b2baa42c334.tar.gz
scuttle-484de2408fc42d8f5a25af53df159b2baa42c334.zip
new feature: collaborative description for tags and bookmarks
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@36 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'templates/bookmarks.tpl.php')
-rw-r--r--templates/bookmarks.tpl.php32
1 files changed, 31 insertions, 1 deletions
diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php
index 42015ef..13ee3a0 100644
--- a/templates/bookmarks.tpl.php
+++ b/templates/bookmarks.tpl.php
@@ -1,14 +1,44 @@
<?php
$userservice =& ServiceFactory::getServiceInstance('UserService');
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
+$cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService');
$logged_on_userid = $userservice->getCurrentUserId();
$this->includeTemplate($GLOBALS['top_include']);
include('search.inc.php');
-if (count($bookmarks) > 0) {
?>
+<?php
+if((isset($currenttag) && $GLOBALS['enableCommonTagDescription'])
+ || (isset($hash) && $GLOBALS['enableCommonBookmarkDescription'])):?>
+<p class="commondescription">
+
+<?php
+if(isset($currenttag) && $cdservice->getLastTagDescription($currenttag)) {
+ $description = $cdservice->getLastTagDescription($currenttag);
+ echo filter($description['cdDescription']);
+} elseif(isset($hash) && $cdservice->getLastBookmarkDescription($hash)) {
+ $description = $cdservice->getLastBookmarkDescription($hash);
+ echo filter($description['cdTitle']). "<br/>";
+ echo filter($description['cdDescription']). "<br/>";
+}
+
+if($logged_on_userid>0) {
+ if(isset($currenttag)) {
+ echo ' (<a href="'. createURL('tagcommondescriptionedit', $currenttag).'">';
+ echo T_('edit common description').'</a>)';
+ } elseif(isset($hash)) {
+ echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $hash).'">';
+ echo T_('edit common description').'</a>)';
+ }
+}
+?>
+</p>
+<?php endif ?>
+
+
+<?php if (count($bookmarks) > 0) { ?>
<script type="text/javascript">
window.onload = playerLoad;
</script>