From 484de2408fc42d8f5a25af53df159b2baa42c334 Mon Sep 17 00:00:00 2001
From: mensonge
Date: Wed, 13 Feb 2008 17:34:18 +0000
Subject: 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
---
templates/bookmarkcommondescriptionedit.tpl.php | 55 +++++++++++++++++++++++++
templates/bookmarks.tpl.php | 32 +++++++++++++-
templates/sidebar.block.tagactions.php | 8 +++-
templates/tagcommondescriptionedit.tpl.php | 48 +++++++++++++++++++++
templates/tags.tpl.php | 3 ++
5 files changed, 144 insertions(+), 2 deletions(-)
create mode 100644 templates/bookmarkcommondescriptionedit.tpl.php
create mode 100644 templates/tagcommondescriptionedit.tpl.php
(limited to 'templates')
diff --git a/templates/bookmarkcommondescriptionedit.tpl.php b/templates/bookmarkcommondescriptionedit.tpl.php
new file mode 100644
index 0000000..c1723de
--- /dev/null
+++ b/templates/bookmarkcommondescriptionedit.tpl.php
@@ -0,0 +1,55 @@
+includeTemplate($GLOBALS['top_include']);
+$userservice = & ServiceFactory :: getServiceInstance('UserService');
+list ($url, $hash) = explode('/', $_SERVER['PATH_INFO']);
+?>
+
+
+
+
+
+
+
+
+
+
+includeTemplate($GLOBALS['bottom_include']);
+?>
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 @@
getCurrentUserId();
$this->includeTemplate($GLOBALS['top_include']);
include('search.inc.php');
-if (count($bookmarks) > 0) {
?>
+
+
+
+getLastTagDescription($currenttag)) {
+ $description = $cdservice->getLastTagDescription($currenttag);
+ echo filter($description['cdDescription']);
+} elseif(isset($hash) && $cdservice->getLastBookmarkDescription($hash)) {
+ $description = $cdservice->getLastBookmarkDescription($hash);
+ echo filter($description['cdTitle']). "
";
+ echo filter($description['cdDescription']). "
";
+}
+
+if($logged_on_userid>0) {
+ if(isset($currenttag)) {
+ echo ' (';
+ echo T_('edit common description').')';
+ } elseif(isset($hash)) {
+ echo ' (';
+ echo T_('edit common description').')';
+ }
+}
+?>
+
+
+
+
+ 0) { ?>
diff --git a/templates/sidebar.block.tagactions.php b/templates/sidebar.block.tagactions.php
index 836c40c..a19db0b 100644
--- a/templates/sidebar.block.tagactions.php
+++ b/templates/sidebar.block.tagactions.php
@@ -1,5 +1,7 @@
isLoggedOn()) {
$currentUser = $userservice->getCurrentUser();
$currentUsername = $currentUser[$userservice->getFieldName('username')];
@@ -9,6 +11,7 @@ if ($userservice->isLoggedOn()) {
$renametext = T_ngettext('Rename Tag', 'Rename Tags', count($tags));
$renamelink = createURL('tagrename', $currenttag);
$deletelink = createURL('tagdelete', $currenttag);
+ $commondesclink = createURL('tagcommondescriptionedit', $currenttag);
?>
@@ -18,10 +21,13 @@ if ($userservice->isLoggedOn()) {
+
+
+
\ No newline at end of file
+?>
diff --git a/templates/tagcommondescriptionedit.tpl.php b/templates/tagcommondescriptionedit.tpl.php
new file mode 100644
index 0000000..6e09374
--- /dev/null
+++ b/templates/tagcommondescriptionedit.tpl.php
@@ -0,0 +1,48 @@
+includeTemplate($GLOBALS['top_include']);
+$userservice = & ServiceFactory :: getServiceInstance('UserService');
+?>
+
+
+
+includeTemplate($GLOBALS['bottom_include']);
+?>
diff --git a/templates/tags.tpl.php b/templates/tags.tpl.php
index d5de176..d6259cc 100644
--- a/templates/tags.tpl.php
+++ b/templates/tags.tpl.php
@@ -1,5 +1,8 @@
includeTemplate($GLOBALS['top_include']);
+?>
+
+ 0) {
?>
--
cgit v1.2.3