#set( $decorator = "_mydecorator" )

#showBasicNavBar(false)
###showRecentComments(20)

<form action="/roller/editor/weblog.do" name="weblogEntryFormEx">
    <input type="hidden" name="method" value="updateComments"/>
    #if( !$numComments ) #set( $numComments = 50 ) #end
    #if( $numComments > 100 ) #set( $numComments = 50 ) #end
    #set( $comments = $pageModel.getRecentComments($numComments) )
    <div class="comments" id="comments">
    #foreach( $comment in $comments )
    #if ($pageHelper.isUserAuthorizedToEdit() && !$tap)
    <input type="hidden" name="id" value="${comment.weblogEntry.id}" />
    <input type="hidden" name="anchor" value="${comment.weblogEntry.anchor}"/>
    <input type="hidden" name="updateTime" value="${comment.weblogEntry.updateTime}"/>
    <input type="hidden" name="publishEntry" value="${comment.weblogEntry.publishEntry}"/>
    <input type="hidden" name="title" value="${comment.weblogEntry.title}"/>
    <input type="hidden" name="categoryId" value="${comment.weblogEntry.category.id}"/>
    #set( $tap=1 )
    #end
        #set($content = $comment.content)
        #if ( $content )
          #set($content = $utilities.encodeEmail($content))
          #if($escapeHtml)
              #set($content = $utilities.escapeHTML($content))
          #end
          #if($autoformat)
              #set($content = $stringUtils.replace($content,"\n","<br />"))
          #end
        #end
        <div class="comment" style="border: 1px solid #dadada; padding-left: 3px; padding-right: 5px;" >
        <p>Commenting on <a class="entrypermalink"
            href="${ctxPath}${comment.weblogEntry.permaLink}">${comment.weblogEntry.title}</a>:
           #if ($pageHelper.isUserAuthorizedToEdit())
              &nbsp;[<a href="$pageHelper.getEntryEditUrl($comment.weblogEntry)#comments">$text.get( "macro.weblog.editentry" )</a>]
              [<input type="checkbox" value="$comment.id" name="deleteComments"> delete]
           #end</p>
        ${content}
        #showCommentDetails($comment false)
        </div>
    #end
    </div>
    #if ($pageHelper.isUserAuthorizedToEdit())
    <input type="submit" name="post" value="Delete Comments">
	#end
</form>