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

Last change on this file since 20211 was 20211, checked in by flop25, 11 years ago

bug:2684
picture page and comment_list.tpl
clean up unused loader gif

  • Property svn:eol-style set to LF
File size: 3.6 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        min-height: {$comment_derivative_params->max_height()+5}px
9}
10{/html_style}{/strip}
11{/if}
12{footer_script}var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png"{/footer_script}
13<div class="loader" style="display: none; position: fixed; right: 0;bottom: 0;"><img src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif"></div>
14<ul class="commentsList">
15{foreach from=$comments item=comment name=comment_loop}
16<li class="commentElement {if $smarty.foreach.comment_loop.index is odd}odd{else}even{/if}">
17        {if isset($comment.src_image)}
18        {if isset($comment_derivative_params)}
19        {assign var=derivative value=$pwg->derivative($comment_derivative_params, $comment.src_image)}
20        {else}
21        {assign var=derivative value=$pwg->derivative($derivative_params, $comment.src_image)}
22        {/if}
23        {if !$derivative->is_cached()}
24        {combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
25  {combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
26  {/if}
27        <div class="illustration">
28                <a href="{$comment.U_PICTURE}">
29                <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}">
30                </a>
31        </div>
32        {/if}
33        <div class="description">
34                {if isset($comment.U_DELETE) or isset($comment.U_VALIDATE) or isset($comment.U_EDIT)}
35                <div class="actions" style="float:right;font-size:90%">
36                {if isset($comment.U_DELETE)}
37                        <a href="{$comment.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">
38                                {'Delete'|@translate}
39                        </a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT) or isset($comment.U_CANCEL)} | {/if}
40                {/if}
41                {if isset($comment.U_CANCEL)}
42                        <a href="{$comment.U_CANCEL}">
43                                {'Cancel'|@translate}
44                        </a>{if isset($comment.U_VALIDATE)} | {/if}
45                {/if}
46                {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}
47                        <a class="editComment" href="{$comment.U_EDIT}#edit_comment">
48                                {'Edit'|@translate}
49                        </a>{if isset($comment.U_VALIDATE)} | {/if}
50                {/if}
51                {if isset($comment.U_VALIDATE)}
52                        <a href="{$comment.U_VALIDATE}">
53                                {'Validate'|@translate}
54                        </a>
55                {/if}&nbsp;
56                </div>
57                {/if}
58
59                <span class="commentAuthor">{if $comment.WEBSITE_URL}<a href="{$comment.WEBSITE_URL}" class="external" target="_blank" rel="nofollow">{$comment.AUTHOR}</a>{else}{$comment.AUTHOR}{/if}</span>
60                        {if $comment.EMAIL}- <a href="mailto:{$comment.EMAIL}">{$comment.EMAIL}</a>{/if}
61                        - <span class="commentDate">{$comment.DATE}</span>
62                {if isset($comment.IN_EDIT)}
63                <a name="edit_comment"></a>
64                <form method="post" action="{$comment.U_EDIT}" id="editComment">
65                        <p><label for="contenteditid">{'Edit a comment'|@translate} :</label></p>
66                        <p><textarea name="content" id="contenteditid" rows="5" cols="80">{$comment.CONTENT|@escape}</textarea></p>
67                        <p><label for="website_url">{'Website'|@translate} :</label></p>
68                        <p><input type="text" name="website_url" id="website_url" value="{$comment.WEBSITE_URL}" size="40"></p>
69                        <p><input type="hidden" name="key" value="{$comment.KEY}">
70                                <input type="hidden" name="pwg_token" value="{$comment.PWG_TOKEN}">
71                                <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}">
72                                <input type="submit" value="{'Submit'|@translate}">
73                        </p>
74                </form>
75                {else}
76                <blockquote><div>{$comment.CONTENT}</div></blockquote>
77                {/if}
78        </div>
79</li>
80{/foreach}
81</ul>
Note: See TracBrowser for help on using the repository browser.