## TODO - replace this below with something like comment-page-title, hard to refactor :(( Is it even used? Selenium test check?
## Used by macrobrowser smart fields to set the page param for comments.
#foreach ($item in $items)
## provide first class name for IE6 cause first-child selector doesn't work
#if ($velocityCount==1) #set ($className="first") #else #set ($className="") #end
#if ($item.styleClass) #set($className = "$className $item.styleClass") #end
## don't introduce a line break between the
#end
#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")
#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)
#foreach ($panel in $bottomCommentPanels)
$panel.getHtml($action.context)
#end