[25794] | 1 | {if isset($comment_derivative_params)} |
---|
| 2 | {strip}{html_style} |
---|
| 3 | .commentElement .illustration{ |
---|
| 4 | width:{$comment_derivative_params->max_width()+5}px |
---|
| 5 | } |
---|
| 6 | |
---|
| 7 | .content .commentElement .description{ |
---|
| 8 | min-height:{$comment_derivative_params->max_height()+5}px |
---|
| 9 | } |
---|
| 10 | |
---|
| 11 | @media {cssResolution min=1.3}{ |
---|
| 12 | .illustration IMG{ |
---|
| 13 | max-width:{($comment_derivative_params->max_width()/2)|intval}px; |
---|
| 14 | max-height:{($comment_derivative_params->max_height()/2)|intval}px; |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | .commentElement .illustration{ |
---|
| 18 | width:{($comment_derivative_params->max_width()/2+5)|intval}px |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | .content .commentElement .description{ |
---|
| 22 | min-height:{($comment_derivative_params->max_height()/2+5)|intval}px |
---|
| 23 | } |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | {/html_style}{/strip} |
---|
| 27 | {/if} |
---|
| 28 | <ul class="commentsList"> |
---|
| 29 | {foreach from=$comments item=comment name=comment_loop} |
---|
| 30 | <li class="commentElement {if $smarty.foreach.comment_loop.index is odd}odd{else}even{/if}"> |
---|
| 31 | {if isset($comment.src_image)} |
---|
| 32 | {if isset($comment_derivative_params)} |
---|
| 33 | {assign var=derivative value=$pwg->derivative($comment_derivative_params, $comment.src_image)} |
---|
| 34 | {else} |
---|
| 35 | {assign var=derivative value=$pwg->derivative($derivative_params, $comment.src_image)} |
---|
| 36 | {/if} |
---|
| 37 | <div class="illustration"> |
---|
| 38 | <a href="{$comment.U_PICTURE}"> |
---|
| 39 | <img src="{$derivative->get_url()}" alt="{$comment.ALT}"> |
---|
| 40 | </a> |
---|
| 41 | </div> |
---|
| 42 | {/if} |
---|
| 43 | <div class="description"> |
---|
| 44 | {if isset($comment.U_DELETE) or isset($comment.U_VALIDATE) or isset($comment.U_EDIT)} |
---|
| 45 | <div class="actions" style="float:right;font-size:90%"> |
---|
| 46 | {if isset($comment.U_DELETE)} |
---|
| 47 | <a href="{$comment.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"> |
---|
| 48 | {'Delete'|@translate} |
---|
| 49 | </a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT) or isset($comment.U_CANCEL)} | {/if} |
---|
| 50 | {/if} |
---|
| 51 | {if isset($comment.U_CANCEL)} |
---|
| 52 | <a href="{$comment.U_CANCEL}"> |
---|
| 53 | {'Cancel'|@translate} |
---|
| 54 | </a>{if isset($comment.U_VALIDATE)} | {/if} |
---|
| 55 | {/if} |
---|
| 56 | {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)} |
---|
| 57 | <a class="editComment" href="{$comment.U_EDIT}#edit_comment"> |
---|
| 58 | {'Edit'|@translate} |
---|
| 59 | </a>{if isset($comment.U_VALIDATE)} | {/if} |
---|
| 60 | {/if} |
---|
| 61 | {if isset($comment.U_VALIDATE)} |
---|
| 62 | <a href="{$comment.U_VALIDATE}"> |
---|
| 63 | {'Validate'|@translate} |
---|
| 64 | </a> |
---|
| 65 | {/if} |
---|
| 66 | </div> |
---|
| 67 | {/if} |
---|
| 68 | |
---|
| 69 | <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> |
---|
| 70 | {if isset($comment.EMAIL)}- <a href="mailto:{$comment.EMAIL}">{$comment.EMAIL}</a>{/if} |
---|
| 71 | - <span class="commentDate">{$comment.DATE}</span> |
---|
| 72 | {if isset($comment.IN_EDIT)} |
---|
| 73 | <a name="edit_comment"></a> |
---|
| 74 | <form method="post" action="{$comment.U_EDIT}" id="editComment"> |
---|
| 75 | <p><label for="contenteditid">{'Edit a comment'|@translate} :</label></p> |
---|
| 76 | <p><textarea name="content" id="contenteditid" rows="5" cols="80">{$comment.CONTENT|@escape}</textarea></p> |
---|
| 77 | <p><label for="website_url">{'Website'|@translate} :</label></p> |
---|
| 78 | <p><input type="text" name="website_url" id="website_url" value="{$comment.WEBSITE_URL}" size="40"></p> |
---|
| 79 | <p><input type="hidden" name="key" value="{$comment.KEY}"> |
---|
| 80 | <input type="hidden" name="pwg_token" value="{$comment.PWG_TOKEN}"> |
---|
| 81 | <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}"> |
---|
| 82 | <input type="submit" value="{'Submit'|@translate}"> |
---|
| 83 | </p> |
---|
| 84 | </form> |
---|
| 85 | {else} |
---|
| 86 | <blockquote><div>{$comment.CONTENT}</div></blockquote> |
---|
| 87 | {/if} |
---|
| 88 | </div> |
---|
| 89 | </li> |
---|
| 90 | {/foreach} |
---|
| 91 | </ul> |
---|