<#if show == "vote" || show == "all"> <#assign averageScore=0 /> <#assign averageScoreRoundToHalf=0 /> <#assign ratingCount=0 /> <#if rating??> <#assign averageScore=rating.averageScore /> <#assign averageScoreRoundToHalf=rating.averageScoreRoundToHalf /> <#assign ratingCount=rating.ratingCount /> <#assign starsImage=averageScoreRoundToHalf?c?replace('.', ',') /> <@cText> <@cImg src='images/local/skin/plugins/extend/modules/rating/stars_${starsImage}.png' alt='#i18n{module.extend.rating.rating.labelScore} : ${averageScore}' id='extend-rating-score-${idExtendableResource!}' class='' params='title="#i18n{module.extend.rating.rating.labelScore} : ${averageScore}"' /> (${ratingCount}) <#if canDeleteVote!false> <#list ratingList![] as rat> <@cForm action='jsp/site/Portal.jsp?page=extend-rating&action=doCancelRating' class='extend-rating-cancel mb-m'> <@cInput type='hidden' name='idExtendableResource' value='${idExtendableResource!}' class='' /> <@cInput type='hidden' name='extendableResourceType' value='${extendableResourceType!}' class='' /> <@cInput type='hidden' name='ratingValue' value='${rat.ratingValue?c}' class='' /> <@cInput type='hidden' name='_csrftoken' value='${cancelVoteToken!}' class='' /> <@cBtn label='#i18n{module.extend.rating.rating.labelCancelVote}' class='secondary' /> <#if ( show == "all" || show == "actionVote" ) && (canVote!false)> <@cForm action='jsp/site/Portal.jsp?page=extend-rating&action=doRating' class='extend-rating-vote mb-m'> <@cInput type='hidden' name='idExtendableResource' value='${idExtendableResource!}' class='' /> <@cInput type='hidden' name='extendableResourceType' value='${extendableResourceType!}' class='' /> <@cInput type='hidden' name='_csrftoken' value='${voteToken!}' class='' /> <@cText>#i18n{module.extend.rating.rating.labelVote} : <#list [ '0.5', '1', '1.5', '2', '2.5', '3', '3.5', '4' ] as ratingValue> <@cBtn label='' class='link' params='name="ratingValue" value="${ratingValue}" title="#i18n{module.extend.rating.rating.labelScore} : ${ratingValue}"'> <@cImg src='images/local/skin/plugins/extend/modules/rating/stars_${ratingValue?replace(".", ",")}.png' alt='#i18n{module.extend.rating.rating.labelScore} : ${ratingValue}' id='extend-rating-vote-${idExtendableResource!}-${ratingValue?replace(".", "-")}' class='' />