diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/bookmarks.tpl.php | 18 | ||||
-rw-r--r-- | templates/sidebar.block.tagactions.php | 2 | ||||
-rw-r--r-- | templates/tagedit.tpl.php | 35 |
3 files changed, 53 insertions, 2 deletions
diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php index cc4743c..dfcf1c7 100644 --- a/templates/bookmarks.tpl.php +++ b/templates/bookmarks.tpl.php @@ -1,6 +1,7 @@ <?php $userservice =& ServiceFactory::getServiceInstance('UserService'); $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); +$tagservice =& ServiceFactory::getServiceInstance('TagService'); $cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService'); $logged_on_userid = $userservice->getCurrentUserId(); @@ -41,6 +42,19 @@ if($logged_on_userid>0) { <?php endif ?> +<?php +$userObject = $userservice->getUserByUsername($user); +/* Private tag description */ +if(isset($currenttag) && strlen($user)>0 && $tagservice->getDescription($currenttag, $userObject['uId'])):?> +<p class="commondescription"> +<?php + + $description = $tagservice->getDescription($currenttag, $userObject['uId']); + echo nl2br(filter($description['tDescription'])); +?> +</p> +<?php endif ?> + <?php if (count($bookmarks) > 0) { ?> <script type="text/javascript"> window.onload = playerLoad; @@ -64,12 +78,12 @@ window.onload = playerLoad; if(isset($user)) { echo ' - '; echo '<a href="'. createURL('tags', $currenttag) .'">'; - echo T_('Bookmarks from other users for these tags').'</a>'; + echo T_('Bookmarks from other users for this tag').'</a>'; //echo T_(' for these tags'); } else if($logged_on_userid>0){ echo ' - '; echo '<a href="'. createURL('bookmarks', $currentUsername.'/'.$currenttag) .'">'; - echo T_('Only your bookmarks for these tags').'</a>'; + echo T_('Only your bookmarks for this tag').'</a>'; //echo T_(' for these tags'); } } diff --git a/templates/sidebar.block.tagactions.php b/templates/sidebar.block.tagactions.php index 43d4922..fd13d98 100644 --- a/templates/sidebar.block.tagactions.php +++ b/templates/sidebar.block.tagactions.php @@ -10,6 +10,7 @@ if ($userservice->isLoggedOn()) { $renametext = T_ngettext('Rename Tag', 'Rename Tags', count($tags)); $renamelink = createURL('tagrename', $currenttag); $deletelink = createURL('tagdelete', $currenttag); + $tagdesclink = createURL('tagedit', $currenttag); $commondesclink = createURL('tagcommondescriptionedit', $currenttag); $addtag2taglinklink = createURL('tag2tagadd', $currenttag); ?> @@ -21,6 +22,7 @@ if ($userservice->isLoggedOn()) { <?php if (count($tags) == 1): ?> <li><a href="<?php echo $deletelink; ?>"><?php echo T_('Delete Tag') ?></a></li> <?php endif; ?> + <li><a href="<?php echo $tagdesclink; ?>"><?php echo T_('Edit Tag Description') ?></a></li> <?php if ($GLOBALS['enableCommonTagDescription']): ?> <li><a href="<?php echo $commondesclink; ?>"><?php echo T_('Edit Tag Common Description') ?></a></li> <?php endif; ?> diff --git a/templates/tagedit.tpl.php b/templates/tagedit.tpl.php new file mode 100644 index 0000000..fbfe48c --- /dev/null +++ b/templates/tagedit.tpl.php @@ -0,0 +1,35 @@ +<?php +$this->includeTemplate($GLOBALS['top_include']); +$userservice = & ServiceFactory :: getServiceInstance('UserService'); +?> +<script type="text/javascript"> +window.onload = function() { + document.getElementById("description").focus(); +} +</script> +<form action="<?php echo $formaction; ?>" method="post"> +<table> +<tr> + <th align="left"><?php echo T_('Description'); ?></th> + <td><textarea name="description" cols="75" rows="10"><?php echo $description['tDescription']; ?></textarea></td> +</tr> +<tr> + <td></td> + <td> + <input type="submit" name="confirm" value="<?php echo T_('Update'); ?>" /> + <input type="submit" name="cancel" value="<?php echo T_('Cancel'); ?>" /> + </td> + <td></td> +</tr> +</table> +</p> + +<?php if (isset($referrer)): ?> +<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div> +<?php endif; ?> +<div><input type="hidden" name="tag" value="<?php echo $tag; ?>" /></div> +</form> + +<?php +$this->includeTemplate($GLOBALS['bottom_include']); +?> |