#assign cumber_char_comments=200/>
<#if !allResources && resourceExtender??>
${extendableResourceType?capitalize} ${resourceExtender.extendableResourceName}
#if>
<@tform type='inline' action='jsp/admin/plugins/extend/ViewExtenderInfo.jsp'>
<@input type='hidden' name='idExtendableResource' value='${idExtendableResource}' />
<@input type='hidden' name='extendableResourceType' value='${extendableResourceType}' />
<@input type='hidden' name='extenderType' value='comment' />
<#if from_url?? && from_url?has_content && from_url != "null"><@input type='hidden' name='from_url' value='${from_url}' />#if>
<@select name='filterPinned' default_value="${filterPinned!''}" class='form-control' items=listPinnedFilter />
<@select name='filterMarkAsImportant' default_value="${filterMarkAsImportant!''}" class='form-control' items=listMarkAsImportantFilter />
<@select name='filterState' default_value="${filterState!''}" class='form-control' items=listCommentStates />
<@select class='form-control' name='sorted_attribute_name'>
@select>
<@inputGroup>
<@select class='form-control' name='asc_sort'>
@select>
<@inputGroupItem>
<@button type='submit' size='' color='primary' style=' ' title='#i18n{module.extend.comment.comment_info.labelSearch}' hideTitle=['all'] buttonIcon='filter' />
@inputGroupItem>
@inputGroup>
<#if !allResources>
<#assign resHref>jsp/admin/plugins/extend/modules/comment/GetCreateComment.jsp?idExtendableResource=${idExtendableResource}&extendableResourceType=${extendableResourceType}<#if from_url?? && from_url?has_content && from_url != "null">&from_url=${from_url}#if>" title="#i18n{module.extend.comment.comment.labelAddComment}#assign>
<@link class='btn btn-primary pull-right' href=resHref title='#i18n{module.extend.comment.comment.labelAddComment}'>
<@icon style='plus' /> #i18n{module.extend.comment.comment.labelAddComment}
@link>
#if>
@tform>
<#if listComments?? && listComments?has_content>
<@table>
<@th scope='col'>#i18n{module.extend.comment.comment_info.statePublished}@th>
<@th scope='col' colspan=4>#i18n{module.extend.comment.comment_info.labelComment}@th>
<@tableHeadBodySeparator />
<#list listComments as comment>
<@tr>
<@td>
<@ul class='list-unstyled'>
<@li>
<#if comment.published>
<@tag color='success' title='#i18n{module.extend.comment.comment_info.statePublished}' tagIcon='check fa-fw' />
<#else>
<@tag color='danger' title='#i18n{module.extend.comment.comment_info.stateNotPublished}' tagIcon='times fa-fw' />
#if>
@li>
<#if comment.pinned>
<@li>
<@tag color='success' tagIcon='thumbtack fa-fw' />
@li>
#if>
<#if comment.isImportant>
<@li>
<@tag color='success' title='#i18n{module.extend.comment.comment_info.important}' tagIcon='thumbs-up fa-fw' />
@li>
#if>
<#assign unpublishedSubComment = comment.firstUnpublishedSubComment >
<#if 0 < unpublishedSubComment >
<#assign paramslink> onclick="javascript:$(\'#comment_toggle_${comment.idComment!}\').next().show();"#assign>
<#assign uscHref>${postBackUrl!}<#if postBackUrl?contains('?')>&<#else>?#if>extenderType=comment&idExtendableResource=${idExtendableResource}&extendableResourceType=${extendableResourceType}&idComment=${comment.idComment}<#if from_url?? && from_url?has_content && from_url != "null">&from_url=${from_url}#if>#subcomment_${unpublishedSubComment}">#assign>
<@link class='btn btn-warning' href=uscHref title='#i18n{module.extend.comment.comment.labelAddComment}' params=paramslink >
<@icon style='search' /> #i18n{module.extend.comment.comment_info.unpublishedSubComments}
@link>
#if>
@ul>
@td>
<@td>
<@link params=' name="comment_${comment.idComment!}"' />
<@p><#if use_bbcode>${comment.BBCodeComment!}<#else>${comment.comment!}#if>@p>
<#if comment.listSubComments?? && 0 < comment.listSubComments?size>
<#list comment.listSubComments as subComment>
<#assign commentTitle>
<#if subComment.published>
<@tag color='success' title='#i18n{module.extend.comment.comment_info.statePublished}' tagIcon='check fa-fw' />
<#else>
<@tag color='danger' title='#i18n{module.extend.comment.comment_info.stateNotPublished}' tagIcon='times fa-fw' />
#if>
<#if use_bbcode>
<#if subComment.BBCodeComment?length <= cumber_char_comments>
${(subComment.BBCodeComment)!""}
<#else>
${(subComment.BBCodeComment[0..cumber_char_comments-1])!""}...
#if>
<#else>
<#if subComment.comment?length <= cumber_char_comments>
${(subComment.comment)!""}
<#else>
${(subComment.comment[0..cumber_char_comments-1])!""}...
#if>
#if>
#assign>
<@box collapsed=true>
<@boxHeader title=commentTitle boxTools=true >
<@tform type='inline' action='jsp/admin/plugins/extend/modules/comment/DoPublishUnpublishComment.jsp#comment_${comment.idComment!}'>
<@input type='hidden' name='viewAllResources' value='${allResources?c}' />
<@input type='hidden' name='idComment' value='${subComment.idComment!}' />
<#if from_url?? && from_url?has_content && from_url != "null">
<@input type='hidden' name='from_url' value='${from_url!}' />
#if>
<@btnGroup>
<#if subComment.published>
<@button color='danger' type='submit' title='#i18n{module.extend.comment.comment_info.buttonUnpublish}' name='unpublish' value='#i18n{module.extend.comment.comment_info.buttonUnpublish}' title='#i18n{module.extend.comment.comment_info.labelPublished}' buttonIcon='fa fa-unlink' />
<#else>
<@button color='success' title='#i18n{module.extend.comment.comment_info.buttonPublish}' type='submit' name='publish' value='#i18n{module.extend.comment.comment_info.buttonPublish}' title='#i18n{module.extend.comment.comment_info.labelUnpublished}' buttonIcon='fa fa-link' />
#if>
<#assign delHref>jsp/admin/plugins/extend/modules/comment/ConfirmRemoveComment.jsp?idComment=${subComment.idComment!}<#if from_url?? && from_url?has_content && from_url != "null">&from_url=${from_url}#if>#assign>
<@link class='btn btn-danger' title='#i18n{portal.util.labelDelete}' href=delHref title="#i18n{portal.util.labelDelete}">
<@icon style='trash' />
@link>
@btnGroup>
@tform>
<@button color='btn btn-box-tool' title='Collapse' buttonIcon='minus' params='data-widget="collapse" data-toggle="tooltip"' />
@boxHeader>
<@boxBody>
<#if use_bbcode>${subComment.BBCodeComment!}<#else>${subComment.comment!}#if>
<#if subComment.isAdminComment>
<@p>${adminBadge!}@p>
#if>
<@p>#i18n{module.extend.comment.comment_info.labelAuthor} #i18n{module.extend.comment.comment_info.labelName} : ${subComment.name!} - #i18n{module.extend.comment.comment_info.labelSendTime} : ${subComment.dateComment!}@p>
<@p>#i18n{module.extend.comment.comment_info.labelEmail} : ${subComment.email!} - #i18n{module.extend.comment.comment_info.labelIpAddress} : ${subComment.ipAddress!}@p>
@boxBody>
@box>
#list>
#if>
@td>
<@td>
<@tform type='inline' action='jsp/admin/plugins/extend/modules/comment/DoPublishUnpublishComment.jsp#comment_${comment.idComment!}'>
<@input type='hidden' name='idComment' value='${comment.idComment!}' />
<@input type='hidden' name='viewAllResources' value='${allResources?c}' />
<#if from_url?? && from_url?has_content && from_url != "null">
<@input type='hidden' name='from_url' value='${from_url!}' />
#if>
<@btnGroup>
<#if comment.published>
<@button color='danger' type='submit' name='unpublish' value='#i18n{module.extend.comment.comment_info.buttonPublish}' title='#i18n{module.extend.comment.comment_info.labelUnpublished}' hideTitle=['all'] buttonIcon='toggle-off' />
<#else>
<@button color='success' type='submit' name='publish' value='#i18n{module.extend.comment.comment_info.buttonUnpublish}" title="#i18n{module.extend.comment.comment_info.labelPublished}' hideTitle=['all'] buttonIcon='toggle-on' />
#if>
<#if allowSubComments>
<#assign subComHref>jsp/admin/plugins/extend/modules/comment/GetCreateComment.jsp?idExtendableResource=${idExtendableResource}&extendableResourceType=${extendableResourceType}&idComment=${comment.idComment}<#if from_url?? && from_url?has_content && from_url != "null">&from_url=${from_url}#if>#assign>
<@link class='btn btn-primary' href=subComHref title='#i18n{module.extend.comment.comment_info.labelAnswer}'>
<@icon style='comment' prefix='fa far' />
@link>
#if>
<#assign subDelHref>jsp/admin/plugins/extend/modules/comment/ConfirmRemoveComment.jsp?idComment=${comment.idComment!}<#if from_url?? && from_url?has_content && from_url != "null">&from_url=${from_url}#if>#assign>
<@link class='btn btn-danger' href=subDelHref title="#i18n{portal.util.labelDelete}">
<@icon style='trash' />
@link>
<#if comment.listSubComments?? && 0 < comment.listSubComments?size>
<@link class='btn btn-primary comment_toggle' href='javascript:;' id='comment_toggle_${comment.idComment!}' params=' data-toggle-id="subcomment_${comment.idComment!}"' title='#i18n{module.extend.comment.comment_info.displaySubComments}'>
<@icon style='chevron-down' />
@link>
#if>
<#if comment.isImportant>
<#assign subImpThumb>jsp/admin/plugins/extend/modules/comment/DoCancelFlagAsImportant.jsp?idExtendableResource=${idExtendableResource}&extendableResourceType=${extendableResourceType}&idComment=${comment.idComment}<#if from_url?? && from_url?has_content && from_url != "null">&from_url=${from_url}#if>#assign>
<@link class='btn btn-danger' href=subImpThumb title='#i18n{module.extend.comment.comment_info.labelCancelFlagImportant}'>
<@icon style='chevron-down' />
@link>
<#else>
<#assign subImpThumb>jsp/admin/plugins/extend/modules/comment/DoFlagAsImportant.jsp?idExtendableResource=${idExtendableResource}&extendableResourceType=${extendableResourceType}&idComment=${comment.idComment}<#if from_url?? && from_url?has_content && from_url != "null">&from_url=${from_url}#if>#assign>
<@link class='btn btn-primary' href=subImpThumb title='#i18n{module.extend.comment.comment_info.labelDoFlagImportant}'>
<@icon style='thumbs-up' />
@link>
#if>
<#if comment.pinned>
<#assign subPinHref>jsp/admin/plugins/extend/modules/comment/DoCancelPinned.jsp?idExtendableResource=${idExtendableResource}&extendableResourceType=${extendableResourceType}&idComment=${comment.idComment}<#if from_url?? && from_url?has_content && from_url != "null">&from_url=${from_url}#if>#assign>
<@link class='btn btn-danger' href=subPinHref title='#i18n{module.extend.comment.comment_info.labelCancelPinned}'>
<@icon style='thumbtack' />
@link>
<#else>
<#assign subPinHref>jsp/admin/plugins/extend/modules/comment/DoPinned.jsp?idExtendableResource=${idExtendableResource}&extendableResourceType=${extendableResourceType}&idComment=${comment.idComment}<#if from_url?? && from_url?has_content && from_url != "null">&from_url=${from_url}#if>#assign>
<@link class='btn btn-primary' href=subPinHref title='#i18n{module.extend.comment.comment_info.labelDoPinned}'>
<@icon style='thumbtack' />
@link>
#if>
<#if comment.listWorkflowActions?? && comment.listWorkflowActions?size > 0>
<#list comment.listWorkflowActions as action>
<@link class='btn btn-primary' href="jsp/admin/plugins/extend/modules/comment/DoProcessWorkflowAction.jsp?id_action=${action.id}&idComment=${comment.idComment}">
<#assign iconStyle><#if action.icon.width!=-1> width="${action.icon.width}" #if><#if action.icon.height!=-1> height="${action.icon.height}"#if>#assign>
<@img url='image?resource_type=workflow_icon_img&id=${action.icon.id}' title='${action.name}' alt='${action.name}' params=iconStyle />
@link>
#list>
#if>
@btnGroup>
@tform>
@td>
<@td>@Extender[${comment.idComment},Comment,rating,{show:"vote"}]@@td>
<@td>
<#if allResources && resourceExtenderMap?? && resourceExtenderMap[comment.idExtendableResource]??>
<#assign resourceExtender=resourceExtenderMap[comment.idExtendableResource]/>
<@p>${resourceExtender.extendableResourceName}@p>
<#assign resHref>jsp/admin/plugins/extend/modules/comment/GetCreateComment.jsp?idExtendableResource=${resourceExtender.idExtendableResource}&extendableResourceType=${extendableResourceType}&viewAllResources=true<#if from_url?? && from_url?has_content && from_url != "null">&from_url=${from_url}#if>#assign>
<@link class='btn btn-primary' href=resHref title='#i18n{module.extend.comment.comment.labelAddComment}'>
<@icon style='plus' /> #i18n{module.extend.comment.comment.labelAddComment}
@link>
${resourceExtender.extendableResourceDescription}
#if>
@td>
<@td>
#i18n{module.extend.comment.comment_info.labelAuthor}
<@p>#i18n{module.extend.comment.comment_info.labelSendTime} : ${comment.dateComment!} par ${comment.name!}@p>
<@p>#i18n{module.extend.comment.comment_info.labelEmail} : ${comment.email!} - #i18n{module.extend.comment.comment_info.labelIpAddress} : ${comment.ipAddress!}
<#if comment.isAdminComment>${adminBadge!}#if>
@p>
@td>
@tr>
#list>
@table>
<@paginationAdmin paginator=paginator combo=1 />
<#else>
<@row>
<@columns>
<@callOut color='warning' titleLevel='h4' title='' callOutIcon='exclamation'>
#i18n{module.extend.comment.comment_info.labelNoComment}
@callOut>
@columns>
@row>
#if>