aboutsummaryrefslogtreecommitdiff
path: root/templates/sidebar.block.tagactions.php
blob: 43d49228a3850738197b89cb2602a40fc15efd3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
$userservice =& ServiceFactory::getServiceInstance('UserService');

if ($userservice->isLoggedOn()) {
    $currentUser = $userservice->getCurrentUser();
    $currentUsername = $currentUser[$userservice->getFieldName('username')];

    if ($currentUsername == $user) {
        $tags = explode('+', $currenttag);
        $renametext = T_ngettext('Rename Tag', 'Rename Tags', count($tags));
        $renamelink = createURL('tagrename', $currenttag);
        $deletelink = createURL('tagdelete', $currenttag);
        $commondesclink = createURL('tagcommondescriptionedit', $currenttag);
        $addtag2taglinklink = createURL('tag2tagadd', $currenttag);
?>

<h2><?php echo T_('Actions'); ?></h2>
<div id="tagactions">
    <ul>
        <li><a href="<?php echo $renamelink; ?>"><?php echo $renametext ?></a></li>
        <?php if (count($tags) == 1): ?>
        <li><a href="<?php echo $deletelink; ?>"><?php echo T_('Delete Tag') ?></a></li>
        <?php endif; ?>
        <?php if ($GLOBALS['enableCommonTagDescription']): ?>
        <li><a href="<?php echo $commondesclink; ?>"><?php echo T_('Edit Tag Common Description') ?></a></li>
	<?php endif; ?>
        <li><a href="<?php echo $addtag2taglinklink; ?>"><?php echo T_('Create a link to another tag') ?></a></li>
    </ul>
</div>

<?php
    }
}
?>