<@cms.comment id=replyId replaceSensitive=false>
    <#assign
        a=object
    />
</@cms.comment>
<form action="cmsComment/save?callbackType=closeCurrent" method="post" autocomplete="off" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
    <input type="hidden" name="replyId" value="${replyId!}"/>
    <input type="hidden" name="_csrf" value="<@tools.csrfToken admin=true/>"/>
    <div class="pageFormContent" layoutH>
        <dl class="nowrap">
            <dt><@t.page 'content'/>:</dt>
            <dd>
                <@cms.content id=a.contentId>${(object.title)!}</@cms.content>
            </dd>
        </dl>
        <dl>
            <dt><@t.page 'create_date'/>:</dt>
            <dd>${a.createDate!}</dd>
        </dl>
    <#if a.updateDate?has_content>
        <dl>
            <dt><@t.page 'modified_date'/>:</dt>
            <dd>${a.updateDate!}</dd>
        </dl>
    </#if>
    <@sys.user id=a.userId>
        <dl>
            <dt><@t.page 'content.promulgator'/>:</dt>
            <dd>${object.nickname!}</dd>
        </dl>
    </@sys.user>
        <dl>
            <dt><@t.page 'status'/>/<@t.page 'inspector'/>:</dt>
            <dd>
                <@t.page 'status.content.'+a.status/>
                <#if 1=a.status>/ <@sys.user id=a.checkUserId>${object.nickname!}</@sys.user></#if>
            </dd>
        </dl>
        <dl>
            <dt><@t.page 'content.score'/>:</dt>
            <dd>
                ${a.scores!}
            </dd>
        </dl>
        <dl>
            <dt><@t.page 'replies'/>:</dt>
            <dd>
                ${a.replies!}
            </dd>
        </dl>
        <dl class="nowrap">
            <dt><@t.page 'comment'/>:</dt>
            <dd>
                ${a.text!}
                <input type="hidden" name="replyId" value="${replyId!}"/>
            </dd>
        </dl>
        <dl class="nowrap">
            <dt><@t.page 'reply'/>:</dt>
            <dd>
                <textarea name="text" rows="3" cols="50"></textarea>
            </dd>
        </dl>
        <@cms.commentList advanced=true replyId=a.id>
            <#if page.totalCount gt 0>
            <fieldset>
                <legend><@t.page 'reply'/></legend>
                <#list page.list as a>
                    <@t.merge 'userIds' a.userId!/>
                    <@t.merge 'userIds' a.replyUserId!/>
                </#list>
                <@sys.user ids=t.userIds!><#assign userMap=map!/></@sys.user>
                <@sys.authorized roleIds=admin.roles urls='cmsComment/check,cmsComment/uncheck,cmsComment/delete,cmsComment/edit'><#assign authorizedMap=map/></@sys.authorized>
                <#list page.list as a>
                <dl class="nowrap">
                    <dt>${(userMap[a.userId?string].nickname)!}:</dt>
                    <dd>
                        <div><@t.page 'reply'/> ${(userMap[a.replyUserId?string].nickname)!} : ${a.text!}</div>
                        <p><label><@t.page 'status'/>:</label><@t.page 'status.content.'+a.status/></p>
                        <p>
                            <label><@t.page 'operate'/>:</label>
                            <#if authorizedMap['cmsComment/edit']>
                                <a href="cmsComment/edit.html?id=${a.id}" class="edit btnText blue" target="dialog" mask="true"><i class="icon-edit"></i><@t.page 'button.edit'/></a>
                            </#if>
                            <a href="cmsComment/reply.html?replyId=${a.replyId!a.id}" class="btnText green" target="dialog" mask="true"><@t.page 'reply'/></a>
                        </p>
                    </dd>
                </dl>
                </#list>
            </fieldset>
            </#if>
        </@cms.commentList>
    </div>
    <div class="formBar">
        <ul>
            <li><button type="submit" class="buttonActive" title="ctrl+s"><@t.page 'button.ok'/></button></li>
            <li><button type="button" class="button close"><@t.page 'button.close'/></button></li>
        </ul>
    </div>
</form>