Merge branch 'extended-cookie'
[scuttle] / templates / sidebar.block.tagactions.php
1 <?php
2 $userservice =& ServiceFactory::getServiceInstance('UserService');
3 if ($userservice->isLoggedOn()) {
4     $currentUser = $userservice->getCurrentUser();
5     $currentUsername = $currentUser[$userservice->getFieldName('username')];
6
7     if ($currentUsername == $user) {
8         $tags = explode('+', $currenttag);
9         $renametext = T_ngettext('Rename Tag', 'Rename Tags', count($tags));
10         $renamelink = createURL('tagrename', $currenttag);
11         $deletelink = createURL('tagdelete', $currenttag);
12 ?>
13
14 <h2><?php echo T_('Actions'); ?></h2>
15 <div id="tagactions">
16     <ul>
17         <li><a href="<?php echo $renamelink; ?>"><?php echo $renametext ?></a></li>
18         <?php if (count($tags) == 1): ?>
19         <li><a href="<?php echo $deletelink; ?>"><?php echo T_('Delete Tag') ?></a></li>
20         <?php endif; ?>
21     </ul>
22 </div>
23
24 <?php
25     }
26 }
27 ?>

Benjamin Mako Hill || Want to submit a patch?