source: extensions/Versa/template/comment_list.tpl

Last change on this file was 31833, checked in by lexming, 7 years ago

Initial commit

  • Property svn:executable set to *
File size: 3.4 KB
Line 
1{if isset($comment_derivative_params)}
2{strip}{html_style}
3.commentElement{ldelim}
4        max-width: {$derivative_params->max_width()}px;
5        flex-basis: {$derivative_params->max_width()/2}px;
6{rdelim}
7{/html_style}{/strip}
8{footer_script}var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png";{/footer_script}
9<div class="loader"><img src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif"></div>
10{/if}
11<ul class="commentsList">
12{foreach from=$comments item=comment name=comment_loop}
13<li class="commentElement {if $smarty.foreach.comment_loop.index is odd}odd{else}even{/if}">
14        {if isset($comment.src_image)}
15        {if isset($comment_derivative_params)}
16        {assign var=derivative value=$pwg->derivative($comment_derivative_params, $comment.src_image)}
17        {else}
18        {assign var=derivative value=$pwg->derivative($derivative_params, $comment.src_image)}
19        {/if}
20        {if !$derivative->is_cached()}
21        {combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
22  {combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
23  {/if}
24        <div class="illustration">
25                <a href="{$comment.U_PICTURE}">
26                <img {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="{$ROOT_URL}{$themeconf.icon_dir}/img_small.png" data-src="{$derivative->get_url()}"{/if} alt="{$comment.ALT}">
27                </a>
28        </div>
29        {/if}
30        <div class="description">
31                {if isset($comment.U_DELETE) or isset($comment.U_VALIDATE) or isset($comment.U_EDIT)}
32                <div class="actions">
33                {if isset($comment.U_DELETE)}
34                        <a class="cmtAction" href="{$comment.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">
35                                <i class="fa fa-eraser" aria-hidden="true"></i> <span>{'Delete'|@translate}</span>
36                        </a>
37                {/if}
38                {if isset($comment.U_CANCEL)}
39                        <a class="cmtAction" href="{$comment.U_CANCEL}">
40                                <i class="fa fa-times" aria-hidden="true"></i> <span>{'Cancel'|@translate}</span>
41                        </a>
42                {/if}
43                {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}
44                        <a class="cmtAction" href="{$comment.U_EDIT}#edit_comment">
45                                <i class="fa fa-pencil-square-o" aria-hidden="true"></i> <span>{'Edit'|@translate}</span>
46                        </a>
47                {/if}
48                {if isset($comment.U_VALIDATE)}
49                        <a class="cmtAction" ref="{$comment.U_VALIDATE}">
50                                <i class="fa fa-thumbs-up" aria-hidden="true"></i> <span>{'Validate'|@translate}</span>
51                        </a>
52                {/if}
53                </div>
54                {/if}
55
56                <div class="commentDate">{$comment.DATE}</div>
57               
58                <div>
59                <span class="commentAuthor">{if $comment.EMAIL}<a href="mailto:{$comment.EMAIL}">{$comment.AUTHOR}:</a>{else}{$comment.AUTHOR}:{/if}</span>
60                {if isset($comment.IN_EDIT)}
61                <a name="edit_comment"></a>
62                <form method="post" action="{$comment.U_EDIT}" id="editComment">
63                        <p><textarea name="content" id="contenteditid" rows="5">{$comment.CONTENT|@escape}</textarea></p>
64                        <p><label for="website_url">{'Website'|@translate} :</label></p>
65                        <p><input type="text" name="website_url" id="website_url" value="{$comment.WEBSITE_URL}"></p>
66                        <p><input type="hidden" name="key" value="{$comment.KEY}">
67                                <input type="hidden" name="pwg_token" value="{$comment.PWG_TOKEN}">
68                                <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}">
69                                <input type="submit" value="{'Submit'|@translate}">
70                        </p>
71                </form>
72                {else}
73                <span class="commentText">{$comment.CONTENT}</span>
74                {/if}
75                </div>
76        </div>
77</li>
78{/foreach}
79</ul>
Note: See TracBrowser for help on using the repository browser.