[15940] | 1 | <ul class="commentsList"> |
---|
| 2 | {foreach from=$comments item=comment name=comment_loop} |
---|
| 3 | <li class="commentElement {if $smarty.foreach.comment_loop.index is odd}odd{else}even{/if}"> |
---|
[16347] | 4 | <div class="description"{if isset($comment.IN_EDIT)} style="height:200px"{/if}> |
---|
| 5 | {if isset($comment.U_DELETE) or isset($comment.U_VALIDATE) or isset($comment.U_EDIT)} |
---|
| 6 | <div class="actions" style="float:right;font-size:90%"> |
---|
| 7 | {if isset($comment.U_DELETE)} |
---|
| 8 | <a href="{$comment.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"> |
---|
| 9 | {'Delete'|@translate} |
---|
| 10 | </a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT) or isset($comment.U_CANCEL)} | {/if} |
---|
| 11 | {/if} |
---|
| 12 | {if isset($comment.U_CANCEL)} |
---|
| 13 | <a href="{$comment.U_CANCEL}"> |
---|
| 14 | {'Cancel'|@translate} |
---|
| 15 | </a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT)} | {/if} |
---|
| 16 | {/if} |
---|
| 17 | {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)} |
---|
| 18 | <a class="editComment" href="{$comment.U_EDIT}#edit_comment"> |
---|
| 19 | {'Edit'|@translate} |
---|
| 20 | </a>{if isset($comment.U_VALIDATE)} | {/if} |
---|
| 21 | {/if} |
---|
| 22 | {if isset($comment.U_VALIDATE)} |
---|
| 23 | <a href="{$comment.U_VALIDATE}"> |
---|
| 24 | {'Validate'|@translate} |
---|
| 25 | </a> |
---|
| 26 | {/if} |
---|
| 27 | </div> |
---|
| 28 | {/if} |
---|
[15948] | 29 | |
---|
| 30 | {if $comment.WEBSITE} |
---|
| 31 | {assign var="author" value='<span class="commentAuthor"><a href="'|@cat:$comment.WEBSITE|@cat:'">'|@cat:$comment.AUTHOR|@cat:'</a></span>'} |
---|
| 32 | {else} |
---|
| 33 | {assign var="author" value='<span class="commentAuthor">'|@cat:$comment.AUTHOR|@cat:'</span>'} |
---|
| 34 | {/if} |
---|
| 35 | {assign var="date" value='<span class="commentDate">'|@cat:$comment.DATE|@cat:'</span>'} |
---|
| 36 | |
---|
[15940] | 37 | |
---|
| 38 | <div class="commentHeader"> |
---|
[15948] | 39 | {'%s says on %s :'|@translate|@sprintf:$author:$date}<br> |
---|
| 40 | {if $comment.STARS}{$comment.STARS}{/if} |
---|
| 41 | {if $comment.EMAIL} <a href="mailto:{$comment.EMAIL}">{$comment.EMAIL}</a>{/if} |
---|
[15940] | 42 | </div> |
---|
[16347] | 43 | {if isset($comment.IN_EDIT)} |
---|
| 44 | <a name="edit_comment"></a> |
---|
| 45 | <form method="post" action="{$comment.U_EDIT}" id="editComment"> |
---|
| 46 | <p><label>{'Edit a comment'|@translate} :</label></p> |
---|
| 47 | <p><textarea name="content" id="contenteditid" rows="5" cols="80">{$comment.CONTENT|@escape}</textarea></p> |
---|
| 48 | <p><input type="hidden" name="key" value="{$comment.KEY}"> |
---|
| 49 | <input type="hidden" name="pwg_token" value="{$comment.PWG_TOKEN}"> |
---|
| 50 | <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}"> |
---|
| 51 | <input type="submit" value="{'Submit'|@translate}"> |
---|
| 52 | </p> |
---|
| 53 | </form> |
---|
| 54 | {else} |
---|
| 55 | <blockquote><div>{$comment.CONTENT}</div></blockquote> |
---|
| 56 | {/if} |
---|
| 57 | </div> |
---|
[15940] | 58 | </li> |
---|
| 59 | {/foreach} |
---|
| 60 | </ul> |
---|