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}"> |
---|
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} |
---|
29 | |
---|
30 | <div class="commentHeader"> |
---|
31 | <span class="commentAuthor">{$comment.AUTHOR}</span> |
---|
32 | {if $comment.WEBSITE} - <a href="{$comment.WEBSITE}">{$comment.WEBSITE_NAME}</a>{/if} |
---|
33 | {if $comment.EMAIL} - <a href="mailto:{$comment.EMAIL}">{$comment.EMAIL}</a>{/if}<br> |
---|
34 | <span class="commentDate">{$comment.DATE}</span> |
---|
35 | {if $comment.RATE}{$comment.STARS}{/if} |
---|
36 | </div> |
---|
37 | {if isset($comment.IN_EDIT)} |
---|
38 | <a name="edit_comment"></a> |
---|
39 | <form method="post" action="{$comment.U_EDIT}" id="editComment"> |
---|
40 | <p><label>{'Edit a comment'|@translate} :</label></p> |
---|
41 | <p><textarea name="content" id="contenteditid" rows="5" cols="80">{$comment.CONTENT|@escape}</textarea></p> |
---|
42 | <p><input type="hidden" name="key" value="{$comment.KEY}"> |
---|
43 | <input type="hidden" name="pwg_token" value="{$comment.PWG_TOKEN}"> |
---|
44 | <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}"> |
---|
45 | <input type="submit" value="{'Submit'|@translate}"> |
---|
46 | </p> |
---|
47 | </form> |
---|
48 | {else} |
---|
49 | <blockquote><div>{$comment.CONTENT}</div></blockquote> |
---|
50 | {/if} |
---|
51 | </div> |
---|
52 | </li> |
---|
53 | {/foreach} |
---|
54 | </ul> |
---|