#requireResource("confluence.web.resources:ajs") #set ($useWatch = $remoteUser && !$action.userWatchingPage) #set ($commentTextareaTabIndex = 200) #if ($page.type == "blogpost") #end #macro (displayCommentActions $commentId $commentActionSection $webInterfaceContext) #set ($items=$webInterfaceManager.getDisplayableItems("system.comment.action/$commentActionSection", $webInterfaceContext)) #if ($items) #end #end #macro (commentThread $comment) #set ($page = $comment.container)
  • $action.getText("comment.author.byline", ["#userLink ($comment.creator)"])#if ($page.type == "blogpost" && $comment.creator == $page.creator) $i18n.getText('comment.author.lozenge')#end

    $action.getXHtmlComments().get($comment)
    #set ($webInterfaceContext = $action.getWebInterfaceContext($comment)) #displayCommentActions($comment.id "secondary" $webInterfaceContext) #displayCommentActions($comment.id "primary" $webInterfaceContext)
    #trackbackRdf ($trackbackUtils.getContentIdentifier($comment) $page.title $trackbackUtils.getPingUrl($comment)) #if ( $action.threadComments && $action.replyToComment == $comment.id && $permissionHelper.canComment($action.authenticatedUser, $comment.container) && $action.isPrintableVersion()==false ) #end #if ($action.editComment && $action.comment && $action.comment.id == $comment.id && $permissionHelper.canEdit($remoteUser, $comment )) #end #if ($action.showCommentArea && $permissionHelper.canComment($action.authenticatedUser, $comment.container) && $action.isPrintableVersion()==false ) #end #if ($threadComments) #if ($comment.children.size() > 0)
      #foreach ($childComment in $comment.children) #commentThread($childComment) #end
    #end #end
  • #end #* make sure you pass in an AbstractPage as a decorator parameter when you call this inline decorator *# #set ($page = $params.get("page")) ## NOTE: While we still have both statically and dynamically rendered comments in Confluence these templates are duplicated in comments.soy. ## If you are changing one you will probably also need to change the other. #if (!$action.isPrintableVersion()) #requireResourcesForContext("atl.comments")
    #set ($pageLevelComments = $page.pageLevelComments) #if ($pageLevelComments.size() > 0)

    #if ($pageLevelComments.size() == 1) $action.getText("comment.singular") #else $action.getText("comment.plural", [$pageLevelComments.size()]) #end

    #end ## Happens when you try to edit a comment that doesn't exist #if ($action.editComment && !$action.comment) #applyDecorator ("message") #decoratorParam("type" "error") $action.getText("comment.edit.not.found") #end #end #* Show expanded comments. If there are none, then show nothing at all (no heading, zilch!) *# #if ($pageLevelComments.size() > 0) #if ($threadComments) #set ($topLevelComments = $page.topLevelComments) #else #set ($topLevelComments = $pageLevelComments) #end
      #foreach ($comment in $topLevelComments) #commentThread($comment) #end
    #end #set ($bottomCommentPanels=$webInterfaceManager.getDisplayableWebPanels("atl.comments.view.bottom", $action.context)) #if ($bottomCommentPanels && $permissionHelper.canComment($remoteUser, $page))
    #foreach ($panel in $bottomCommentPanels) $panel.getHtml($action.context) #end
    #end
    #end