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