[9641] | 1 | {* this is a copy of admin/theme/defaults/template/comments.tpl a bit modified *} |
---|
[10984] | 2 | |
---|
[14528] | 3 | {footer_script}{literal} |
---|
| 4 | jQuery(document).ready(function(){ |
---|
| 5 | function highlighComments() { |
---|
| 6 | jQuery(".checkComment").each(function() { |
---|
| 7 | var parent = jQuery(this).parent('tr'); |
---|
| 8 | if (jQuery(this).children("input[type=checkbox]").is(':checked')) { |
---|
| 9 | jQuery(parent).addClass('selectedComment'); |
---|
[10984] | 10 | } |
---|
[14528] | 11 | else { |
---|
| 12 | jQuery(parent).removeClass('selectedComment'); |
---|
| 13 | } |
---|
[10984] | 14 | }); |
---|
[14528] | 15 | } |
---|
| 16 | |
---|
| 17 | jQuery(".checkComment").click(function(event) { |
---|
[15995] | 18 | var checkbox = jQuery(this).children("input[type=checkbox]"); |
---|
[14528] | 19 | if (event.target.type !== 'checkbox') { |
---|
| 20 | jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked')); |
---|
| 21 | } |
---|
[15995] | 22 | highlighComments(); |
---|
[14528] | 23 | }); |
---|
| 24 | |
---|
| 25 | jQuery("#commentSelectAll").click(function () { |
---|
| 26 | jQuery(".checkComment input[type=checkbox]").attr('checked', true); |
---|
| 27 | highlighComments(); |
---|
| 28 | return false; |
---|
| 29 | }); |
---|
| 30 | |
---|
| 31 | jQuery("#commentSelectNone").click(function () { |
---|
| 32 | jQuery(".checkComment input[type=checkbox]").attr('checked', false); |
---|
| 33 | highlighComments(); |
---|
| 34 | return false; |
---|
| 35 | }); |
---|
| 36 | |
---|
| 37 | jQuery("#commentSelectInvert").click(function () { |
---|
| 38 | jQuery(".checkComment input[type=checkbox]").each(function() { |
---|
| 39 | jQuery(this).attr('checked', !$(this).is(':checked')); |
---|
[10984] | 40 | }); |
---|
[14528] | 41 | highlighComments(); |
---|
| 42 | return false; |
---|
[10984] | 43 | }); |
---|
[9634] | 44 | |
---|
[14528] | 45 | }); |
---|
| 46 | {/literal}{/footer_script} |
---|
| 47 | |
---|
[9634] | 48 | <div class="titrePage"> |
---|
[14528] | 49 | <h2>{'Pending Comments'|@translate} [{'Albums'|@translate}]</h2> |
---|
[9634] | 50 | </div> |
---|
| 51 | |
---|
| 52 | {if !empty($comments) } |
---|
[14528] | 53 | <form method="post" action="{$F_ACTION}" id="pendingComments"> |
---|
[9634] | 54 | |
---|
[14528] | 55 | <table> |
---|
[10984] | 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:50px;" class="checkComment"> |
---|
| 59 | <input type="checkbox" name="comments[]" value="{$comment.ID}"> |
---|
| 60 | </td> |
---|
| 61 | <td> |
---|
| 62 | <div class="comment"> |
---|
[11327] | 63 | <a class="illustration" href="{$comment.CAT_URL}"><img src="{$comment.TN_SRC}"><br/>{$comment.CAT_NAME}</a> |
---|
[10984] | 64 | <p class="commentHeader"><strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p> |
---|
| 65 | <blockquote>{$comment.CONTENT}</blockquote> |
---|
| 66 | </div> |
---|
| 67 | </td> |
---|
| 68 | </tr> |
---|
| 69 | {/foreach} |
---|
[14528] | 70 | </table> |
---|
[9634] | 71 | |
---|
[10984] | 72 | <p class="checkActions"> |
---|
| 73 | {'Select:'|@translate} |
---|
| 74 | <a href="#" id="commentSelectAll">{'All'|@translate}</a>, |
---|
| 75 | <a href="#" id="commentSelectNone">{'None'|@translate}</a>, |
---|
| 76 | <a href="#" id="commentSelectInvert">{'Invert'|@translate}</a> |
---|
| 77 | </p> |
---|
[9634] | 78 | |
---|
[10984] | 79 | <p class="bottomButtons"> |
---|
| 80 | <input class="submit" type="submit" name="validate_albums" value="{'Validate'|@translate}"> |
---|
| 81 | <input class="submit" type="submit" name="reject_albums" value="{'Reject'|@translate}"> |
---|
| 82 | </p> |
---|
[9634] | 83 | |
---|
| 84 | </form> |
---|
[15995] | 85 | {else} |
---|
| 86 | {'No pending comment'|@translate} |
---|
| 87 | {/if} |
---|