source: extensions/stripped/template/comment_list.tpl @ 18640

Last change on this file since 18640 was 18640, checked in by Zaphod, 12 years ago
File size: 2.7 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="commentList">
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">
23                                {if isset($comment.U_DELETE) or isset($comment.U_VALIDATE) or isset($comment.U_EDIT) }
24                                        <div class="actions">
25                                                {if isset($comment.U_DELETE)}
26                                                        <a href="{$comment.U_DELETE}" title="{'delete this comment'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">
27                                                                [{'Delete'|@translate}]
28                                                        </a>
29                                                {/if}
30                                                {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}
31                                                        <a class="editComment" href="{$comment.U_EDIT}#edit_comment" title="{'edit this comment'|@translate}">
32                                                                [{'edit'|@translate}]
33                                                        </a>
34                                                {/if}
35                                                {if isset($comment.U_VALIDATE)}
36                                                        <a href="{$comment.U_VALIDATE}" title="{'validate this comment'|@translate}">
37                                                                [{'validate'|@translate}]
38                                                        </a>
39                                                {/if}
40                                        </div>
41                                {/if}
42                                <span class="author">{$comment.AUTHOR}</span> - <span class="date">{$comment.DATE}</span>
43                                {if isset($comment.IN_EDIT)}
44                                        <a name="edit_comment"></a>
45                                        <form  method="post" action="{$comment.U_EDIT}" class="filter" id="editComment">
46                                                <fieldset>
47                                                        <legend>{'Edit a comment'|@translate}</legend>
48                                                        <label><textarea name="content" id="contenteditid" rows="4" cols="80">{$comment.CONTENT|@escape}</textarea></label>
49                                                        <input type="hidden" name="key" value="{$comment.KEY}">
50                                                        <input type="hidden" name="pwg_token" value="{$comment.PWG_TOKEN}">
51                                                        <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}">
52                                                        <input class="submit" type="submit" value="{'Submit'|@translate}">
53                                                </fieldset>
54                                        </form>
55                                {else}
56                                        <blockquote><div>{$comment.CONTENT}</div></blockquote>
57                                {/if}
58                        </div>
59                </li>
60        {/foreach}
61</ul>
62<div style="clear: both;"></div>
63{footer_script}{literal}
64        jQuery("document").ready(function(jQuery) {
65                var rT=jQuery(".replyTo");
66                if (rT.length !=0) {
67                        var trT=rT.attr("title");
68                        var pe=trT.search(" ");
69                        if (pe>0) trT=trT.substring(0,pe);
70                        rT.text("["+trT+"]");
71                }
72        });
73{/literal}{/footer_script}
Note: See TracBrowser for help on using the repository browser.