aboutsummaryrefslogtreecommitdiff
path: root/templates/sidebar.block.linked.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-02-05 13:30:33 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-02-05 13:30:33 +0000
commit73e20c2ff50d197105f3efbc8940c498de4d2f47 (patch)
tree7ca227f920e21d19c02b34110c2240100ce87671 /templates/sidebar.block.linked.php
parent67b4663c9a1ec6b173d50516e88bc78067a46369 (diff)
downloadsemanticscuttle-73e20c2ff50d197105f3efbc8940c498de4d2f47.tar.gz
semanticscuttle-73e20c2ff50d197105f3efbc8940c498de4d2f47.tar.bz2
fix interface: make easier the management of tag links
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@33 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'templates/sidebar.block.linked.php')
-rw-r--r--templates/sidebar.block.linked.php32
1 files changed, 17 insertions, 15 deletions
diff --git a/templates/sidebar.block.linked.php b/templates/sidebar.block.linked.php
index 401d0d7..1643272 100644
--- a/templates/sidebar.block.linked.php
+++ b/templates/sidebar.block.linked.php
@@ -23,8 +23,16 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode
$synonymTags = $tag2tagservice->getAllLinkedTags($tag, '=', $uId);
$synonymTags = is_array($synonymTags)?$synonymTags:array($synonymTags);
sort($synonymTags);
+ $synonymList = '';
foreach($synonymTags as $synonymTag) {
- $output.= ", ".$synonymTag;
+ //$output.= ", ".$synonymTag;
+ $synonymList.= $synonymTag.' ';
+ }
+ if(count($synonymTags)>0) {
+ $output.= ', '.$synonymTags[0];
+ }
+ if(count($synonymTags)>1) {
+ $output.= '<span title="'.T_('Synonyms:').' '.$synonymList.'">, etc</span>';
}
if($editingMode) {
@@ -81,15 +89,6 @@ if ($currenttag) {
}
}
-if(count($explodedTags) > 0) {
- $displayLinkedZone = false;
- foreach($explodedTags as $explodedTag) {
- if($tag2tagservice->getLinkedTags($explodedTag, '>', $userid) || $tag2tagservice->getLinkedTags($explodedTag, '>', $userid, true) || $tag2tagservice->getLinkedTags($explodedTag, '=', $userid)) {
- $displayLinkedZone = true;
- break;
- }
- }
- if ($displayLinkedZone) {
?>
<h2>
@@ -111,6 +110,14 @@ if(count($explodedTags) > 0) {
} else {
$editingMode = false;
}
+
+ if($editingMode) {
+ echo '<tr><td></td><td>';
+ echo ' (<a href="'. createURL('tag2tagadd','') .'" rel="tag">'.T_('Add new link').'</a>) ';
+ echo ' (<a href="'. createURL('tag2tagdelete','') .'" rel="tag">'.T_('Delete link').'</a>)';
+ echo '</td></tr>';
+ }
+
$stopList = array();
foreach($explodedTags as $explodedTag) {
if(!in_array($explodedTag, $stopList)) {
@@ -135,8 +142,3 @@ if(count($explodedTags) > 0) {
?>
</table>
</div>
-
-<?php
- }
-}
-?>