1 | {* $Id$ *} |
---|
2 | <ul class="thumbnailCategories"> |
---|
3 | {foreach from=$comments item=comment name=comment_loop} |
---|
4 | <li> |
---|
5 | <div class="thumbnailCategory {if $smarty.foreach.comment_loop.index is odd}odd{else}even{/if}"> |
---|
6 | {if isset($comment.TN_SRC)} |
---|
7 | <div class="illustration"> |
---|
8 | <a href="{$comment.U_PICTURE}"> |
---|
9 | <img src="{$comment.TN_SRC}" alt="{$comment.ALT}"> |
---|
10 | </a> |
---|
11 | </div> |
---|
12 | {/if} |
---|
13 | <div class="description"{if isset($comment.IN_EDIT)} style="height:200px"{/if}> |
---|
14 | {if isset($comment.U_DELETE) or isset($comment.U_VALIDATE) or isset($comment.U_EDIT) } |
---|
15 | <div class="actions" style="float:right"> |
---|
16 | {if isset($comment.U_DELETE)} |
---|
17 | <a href="{$comment.U_DELETE}" title="{'delete this comment'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"> |
---|
18 | <img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" alt="[delete]"> |
---|
19 | </a> |
---|
20 | {/if} |
---|
21 | {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)} |
---|
22 | <a class="editComment" href="{$comment.U_EDIT}#edit_comment" title="{'edit this comment'|@translate}"> |
---|
23 | <img src="{$ROOT_URL}{$themeconf.icon_dir}/edit.png" alt="[edit]"> |
---|
24 | </a> |
---|
25 | {/if} |
---|
26 | {if isset($comment.U_VALIDATE)} |
---|
27 | <a href="{$comment.U_VALIDATE}" title="{'validate this comment'|@translate}"> |
---|
28 | <img src="{$ROOT_URL}{$themeconf.icon_dir}/validate_s.png" alt="[validate]"> |
---|
29 | </a> |
---|
30 | {/if} |
---|
31 | </div> |
---|
32 | {/if} |
---|
33 | |
---|
34 | <span class="author">{$comment.AUTHOR}</span> - <span class="date">{$comment.DATE}</span> |
---|
35 | {if isset($comment.IN_EDIT)} |
---|
36 | <a name="edit_comment"></a> |
---|
37 | <form method="post" action="{$comment.U_EDIT}" class="filter" id="editComment"> |
---|
38 | <fieldset> |
---|
39 | <legend>{'Edit a comment'|@translate}</legend> |
---|
40 | <label>{'Comment'|@translate}<textarea name="content" id="contenteditid" rows="5" cols="80">{$comment.CONTENT|@escape}</textarea></label> |
---|
41 | <input type="hidden" name="key" value="{$comment.KEY}"> |
---|
42 | <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}"> |
---|
43 | <input class="submit" type="submit" value="{'Submit'|@translate}"> |
---|
44 | </fieldset> |
---|
45 | </form> |
---|
46 | {else} |
---|
47 | <blockquote><div>{$comment.CONTENT}</div></blockquote> |
---|
48 | {/if} |
---|
49 | </div> |
---|
50 | </div> |
---|
51 | </li> |
---|
52 | {/foreach} |
---|
53 | </ul> |
---|