[15940] | 1 | {combine_css path=$GUESTBOOK_PATH|@cat:'admin/template/style.css'} |
---|
| 2 | |
---|
| 3 | <div class="titrePage"> |
---|
| 4 | <h2>{'GuestBook'|@translate}</h2> |
---|
| 5 | </div> |
---|
| 6 | |
---|
| 7 | {footer_script}{literal} |
---|
| 8 | jQuery(document).ready(function(){ |
---|
| 9 | function highlighComments() { |
---|
| 10 | jQuery(".checkComment").each(function() { |
---|
| 11 | var parent = jQuery(this).parent('tr'); |
---|
| 12 | if (jQuery(this).children("input[type=checkbox]").is(':checked')) { |
---|
| 13 | jQuery(parent).addClass('selectedComment'); |
---|
| 14 | } |
---|
| 15 | else { |
---|
| 16 | jQuery(parent).removeClass('selectedComment'); |
---|
| 17 | } |
---|
| 18 | }); |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | jQuery(".checkComment").click(function(event) { |
---|
| 22 | var checkbox = jQuery(this).children("input[type=checkbox]"); |
---|
| 23 | if (event.target.type !== 'checkbox') { |
---|
| 24 | jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked')); |
---|
| 25 | } |
---|
| 26 | highlighComments(); |
---|
| 27 | }); |
---|
| 28 | |
---|
| 29 | jQuery("#commentSelectAll").click(function () { |
---|
| 30 | jQuery(".checkComment input[type=checkbox]").attr('checked', true); |
---|
| 31 | highlighComments(); |
---|
| 32 | return false; |
---|
| 33 | }); |
---|
| 34 | |
---|
| 35 | jQuery("#commentSelectNone").click(function () { |
---|
| 36 | jQuery(".checkComment input[type=checkbox]").attr('checked', false); |
---|
| 37 | highlighComments(); |
---|
| 38 | return false; |
---|
| 39 | }); |
---|
| 40 | |
---|
| 41 | jQuery("#commentSelectInvert").click(function () { |
---|
| 42 | jQuery(".checkComment input[type=checkbox]").each(function() { |
---|
| 43 | jQuery(this).attr('checked', !$(this).is(':checked')); |
---|
| 44 | }); |
---|
| 45 | highlighComments(); |
---|
| 46 | return false; |
---|
| 47 | }); |
---|
| 48 | |
---|
| 49 | }); |
---|
| 50 | {/literal}{/footer_script} |
---|
| 51 | |
---|
| 52 | {if !empty($comments) } |
---|
| 53 | <form method="post" action="{$F_ACTION}" id="pendingComments"> |
---|
| 54 | |
---|
| 55 | <table> |
---|
| 56 | {foreach from=$comments item=comment name=comment} |
---|
| 57 | <tr valign="top" class="{if $smarty.foreach.comment.index is odd}row2{else}row1{/if}"> |
---|
| 58 | <td style="width:20px;text-align:center;" valign="middle" class="checkComment"> |
---|
| 59 | <input type="checkbox" name="comments[]" value="{$comment.ID}"> |
---|
| 60 | </td> |
---|
| 61 | <td> |
---|
| 62 | <div class="comment"> |
---|
| 63 | <p class="commentHeader"><strong><a href="mailto:{$comment.EMAIL}">{$comment.AUTHOR}</a></strong> - <em>{$comment.DATE}</em><br> |
---|
| 64 | |
---|
| 65 | {if $comment.WEBSITE}<a href="{$comment.WEBSITE}">{$comment.WEBSITE_NAME}</a>{/if} |
---|
| 66 | {if $comment.RATE}{$comment.STARS}{/if} |
---|
| 67 | </p> |
---|
| 68 | <blockquote>{$comment.CONTENT}</blockquote> |
---|
| 69 | </div> |
---|
| 70 | </td> |
---|
| 71 | </tr> |
---|
| 72 | {/foreach} |
---|
| 73 | </table> |
---|
| 74 | |
---|
| 75 | <p class="checkActions"> |
---|
| 76 | {'Select:'|@translate} |
---|
| 77 | <a href="#" id="commentSelectAll">{'All'|@translate}</a>, |
---|
| 78 | <a href="#" id="commentSelectNone">{'None'|@translate}</a>, |
---|
| 79 | <a href="#" id="commentSelectInvert">{'Invert'|@translate}</a> |
---|
| 80 | </p> |
---|
| 81 | |
---|
| 82 | <p class="bottomButtons"> |
---|
| 83 | <input class="submit" type="submit" name="validate" value="{'Validate'|@translate}"> |
---|
| 84 | <input class="submit" type="submit" name="reject" value="{'Reject'|@translate}"> |
---|
| 85 | </p> |
---|
| 86 | |
---|
| 87 | </form> |
---|
| 88 | {else} |
---|
| 89 | {'No pending comment'|@translate} |
---|
| 90 | {/if} |
---|