<#assign resourceParams>idExtendableResource=${idExtendableResource!}&extendableResourceType=${extendableResourceType!} <#macro commentLinks> <@cBtn label='#i18n{module.extend.comment.comment.labelViewComments}' class='primary btn-sm' href='jsp/site/Portal.jsp?page=extend-comment&${resourceParams}'> <@cIcon name='eye' /> <#if addCommentPosition = 0> <@cBtn label='#i18n{module.extend.comment.comment.labelAddComment}' class='primary btn-sm' href='jsp/site/Portal.jsp?page=extend-comment&action=addComment&${resourceParams}'> <@cIcon name='plus' /> <#macro deleteButton idComment> <@cBlock class='float-end'> <@cBtn label='' class='danger btn-sm' href='jsp/site/Portal.jsp?page=extend-comment&action=confirmRemoveComment&${resourceParams}&idComment=${idComment}' params='title="#i18n{portal.util.labelDelete}"'> <@cIcon name='trash' title='#i18n{portal.util.labelDelete}' /> <@cRow> <#if listComments?? && listComments?has_content> <@cBlock class='mb-3'> <@commentLinks /> <#if addCommentPosition = 1 || addCommentPosition = 3> <#include "/skin/plugins/extend/modules/comment/add_comment.html" /> <#list listComments as comment> <@cCard class='mb-3'> <@cTitle level=3 class='h5'> #i18n{module.extend.comment.view_comments.labelPosted} ${comment.dateComment!} #i18n{module.extend.comment.view_comments.labelBy} ${comment.name!} <#if comment.isAdminComment><@cBlock>${adminBadge!} <#if registeredUserEmail?? && comment.email == registeredUserEmail && comment.numberSubComments <= 0 && canDeleteComments?has_content && canDeleteComments> <@deleteButton idComment=comment.idComment /> <@cBlock class='float-end'> @Extender[${comment.idComment},Comment,rating,{show:"vote"}]@ <@cText> <#if comment.avatarUrl?has_content> <@cImg src=comment.avatarUrl class='avatar' alt=comment.name! params='title="${comment.name!}"' /> <#if use_bbcode> ${comment.BBCodeComment!} <#else> ${comment.comment!} <#if 0 < comment.numberSubComments && comment.listSubComments?? && 0 < comment.listSubComments?size && displaySubComments> open> #i18n{module.extend.comment.comment_info.publishedSubComments} (${comment.numberSubComments}) <#list comment.listSubComments as subComment> <@cBlock class='border-start border-3 ps-3 my-3'> <@cText> #i18n{module.extend.comment.view_comments.labelPosted} ${subComment.dateComment!} #i18n{module.extend.comment.view_comments.labelBy} ${subComment.name!} <#if subComment.isAdminComment> <@cBlock>${adminBadge!} <#if registeredUserEmail?? && subComment.email == registeredUserEmail && subComment.numberSubComments <= 0 && canDeleteComments?has_content && canDeleteComments> <@deleteButton idComment=subComment.idComment /> <@cBlock class='bg-light p-2'> <#if use_bbcode> ${subComment.BBCodeComment!} <#else> ${subComment.comment!} <#if allowSubComments && myLuteceUser??> <#assign formSuffix = comment.idComment?c> <@cBlock class='mb-3'> <@cBtn label='#i18n{module.extend.comment.view_comments.labelAnswerComment}' class='primary btn-sm' type='button' params='data-bs-toggle="collapse" data-bs-target="#addComment_${formSuffix}" aria-expanded="false" aria-controls="addComment_${formSuffix}"'> <@cIcon name='plus' /> <@cBlock class='collapse mb-3' id='addComment_${formSuffix}'> <@cForm action='jsp/site/Portal.jsp'> <@cInput type='hidden' name='page' value='extend-comment' id='page-${formSuffix}' /> <@cInput type='hidden' name='action' value='doAddComment' id='action-${formSuffix}' /> <@cInput type='hidden' name='token' value='${token!}' id='token-${formSuffix}' /> <@cInput type='hidden' name='idParentComment' value='${comment.idComment!}' id='idParentComment-${formSuffix}' /> <#if returnToCommentList?? && returnToCommentList> <@cInput type='hidden' name='returnToCommentList' value='true' id='returnToCommentList-${formSuffix}' /> <#if from_url?? && from_url?has_content && from_url != "null"> <@cInput type='hidden' name='from_url' value='${from_url!}' id='from_url-${formSuffix}' /> <@cInput type='hidden' name='idExtendableResource' value='${idExtendableResource!}' id='idExtendableResource-${formSuffix}' /> <@cInput type='hidden' name='extendableResourceType' value='${extendableResourceType!}' id='extendableResourceType-${formSuffix}' /> <#if !commentConfig.enabledAuthMode> <@cField label='#i18n{module.extend.comment.add_comment.labelEmail}' for='email-${formSuffix}' required=true> <@cInput type='email' name='email' id='email-${formSuffix}' maxlength=255 value='${email!}' required=true /> <@cField label='#i18n{module.extend.comment.add_comment.labelName}' for='comment-name-${formSuffix}' required=true> <@cInput name='name' id='comment-name-${formSuffix}' maxlength=255 value='${userName!}' required=true /> <#else> <@cInput type='hidden' name='email' id='email-${formSuffix}' value='${email!}' /> <@cField label='#i18n{module.extend.comment.add_comment.labelComment}' for='comment-${formSuffix}' required=true> <@cTextArea name='comment' id='comment-${formSuffix}' rows=6 placeholder='#i18n{module.extend.comment.add_comment.placeholderComment}' required=true /> <#if is_active_captcha> <@cBlock>${captcha!} <@cBlock class='d-flex gap-2 mt-3'> <@cBtn label='#i18n{portal.util.labelValidate}' class='primary btn-sm' type='submit' /> <#if addCommentPosition = 0> <@cBtn label='#i18n{portal.util.labelBack}' class='secondary btn-sm' type='button' params='onclick="history.back( )"' /> <@cBlock class='mb-3'> <@commentLinks /> <#if addCommentPosition = 2 || addCommentPosition = 3> <#include "/skin/plugins/extend/modules/comment/add_comment.html" />