source: trunk/themes/default/template/comment_list.tpl @ 15924

Last change on this file since 15924 was 15924, checked in by mistic100, 12 years ago

on comment_list add link to exit from comment edition

  • Property svn:eol-style set to LF
File size: 2.4 KB
Line 
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                <a href="{$comment.U_PICTURE}">
18                <img src="{$pwg->derivative_url($derivative_params, $comment.src_image)}" alt="{$comment.ALT}">
19                </a>
20        </div>
21        {/if}
22        <div class="description"{if isset($comment.IN_EDIT)} style="height:200px"{/if}>
23                {if isset($comment.U_DELETE) or isset($comment.U_VALIDATE) or isset($comment.U_EDIT)}
24                <div class="actions" style="float:right;font-size:90%">
25                {if isset($comment.U_DELETE)}
26                        <a href="{$comment.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">
27                                {'Delete'|@translate}
28                        </a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT) or isset($comment.U_CANCEL)} | {/if}
29                {/if}
30                {if isset($comment.U_CANCEL)}
31                        <a href="{$comment.U_CANCEL}">
32                                {'Cancel'|@translate}
33                        </a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT)} | {/if}
34                {/if}
35                {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}
36                        <a class="editComment" href="{$comment.U_EDIT}#edit_comment">
37                                {'Edit'|@translate}
38                        </a>{if isset($comment.U_VALIDATE)} | {/if}
39                {/if}
40                {if isset($comment.U_VALIDATE)}
41                        <a href="{$comment.U_VALIDATE}">
42                                {'Validate'|@translate}
43                        </a>
44                {/if}&nbsp;
45                </div>
46                {/if}
47
48                <span class="commentAuthor">{$comment.AUTHOR}</span> - <span class="commentDate">{$comment.DATE}</span>
49                {if isset($comment.IN_EDIT)}
50                <a name="edit_comment"></a>
51                <form method="post" action="{$comment.U_EDIT}" id="editComment">
52                        <p><label>{'Edit a comment'|@translate} :</label></p>
53                        <p><textarea name="content" id="contenteditid" rows="5" cols="80">{$comment.CONTENT|@escape}</textarea></p>
54                        <p><input type="hidden" name="key" value="{$comment.KEY}">
55                                <input type="hidden" name="pwg_token" value="{$comment.PWG_TOKEN}">
56                                <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}">
57                                <input type="submit" value="{'Submit'|@translate}">
58                        </p>
59                </form>
60                {else}
61                <blockquote><div>{$comment.CONTENT}</div></blockquote>
62                {/if}
63        </div>
64</li>
65{/foreach}
66</ul>
Note: See TracBrowser for help on using the repository browser.