source: trunk/admin/themes/default/template/comments.tpl @ 15577

Last change on this file since 15577 was 13079, checked in by plg, 12 years ago

slight redesign on pending comments screen

  • Property svn:eol-style set to LF
File size: 2.5 KB
RevLine 
[9586]1{footer_script}{literal}
2jQuery(document).ready(function(){
[13078]3  function highlighComments() {
4    jQuery(".checkComment").each(function() {
5      var parent = jQuery(this).parent('tr');
6      if (jQuery(this).children("input[type=checkbox]").is(':checked')) {
7        jQuery(parent).addClass('selectedComment');
8      }
9      else {
10        jQuery(parent).removeClass('selectedComment');
11      }
12    });
13  }
14
[9586]15  jQuery(".checkComment").click(function(event) {
[5569]16    if (event.target.type !== 'checkbox') {
[9586]17      var checkbox = jQuery(this).children("input[type=checkbox]");
18      jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked'));
[13078]19      highlighComments();
[5569]20    }
[5381]21  });
22
[9586]23  jQuery("#commentSelectAll").click(function () {
24    jQuery(".checkComment input[type=checkbox]").attr('checked', true);
[13078]25    highlighComments();
[5381]26    return false;
27  });
28
[9586]29  jQuery("#commentSelectNone").click(function () {
30    jQuery(".checkComment input[type=checkbox]").attr('checked', false);
[13078]31    highlighComments();
[5381]32    return false;
33  });
34
[9586]35  jQuery("#commentSelectInvert").click(function () {
36    jQuery(".checkComment input[type=checkbox]").each(function() {
37      jQuery(this).attr('checked', !$(this).is(':checked'));
[5381]38    });
[13078]39    highlighComments();
[5381]40    return false;
41  });
42
43});
[9586]44{/literal}{/footer_script}
[5381]45
[2531]46<div class="titrePage">
[13079]47  <h2>{'Pending Comments'|@translate} {$TABSHEET_TITLE}</h2>
[2531]48</div>
49
50{if !empty($comments) }
[13079]51<form method="post" action="{$F_ACTION}" id="pendingComments">
[2531]52 
[13079]53<table>
[5381]54  {foreach from=$comments item=comment name=comment}
55  <tr valign="top" class="{if $smarty.foreach.comment.index is odd}row2{else}row1{/if}">
56    <td style="width:50px;" class="checkComment">
57      <input type="checkbox" name="comments[]" value="{$comment.ID}">
58    </td>
59    <td>
[2531]60  <div class="comment">
[3185]61    <a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}"></a>
[2531]62    <p class="commentHeader"><strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
63    <blockquote>{$comment.CONTENT}</blockquote>
[2944]64  </div>
[5381]65    </td>
66  </tr>
[2531]67  {/foreach}
[5381]68</table>
[2531]69
[5381]70  <p class="checkActions">
71    {'Select:'|@translate}
72    <a href="#" id="commentSelectAll">{'All'|@translate}</a>,
73    <a href="#" id="commentSelectNone">{'None'|@translate}</a>,
74    <a href="#" id="commentSelectInvert">{'Invert'|@translate}</a>
75  </p>
76
[2531]77  <p class="bottomButtons">
[8128]78    <input class="submit" type="submit" name="validate" value="{'Validate'|@translate}">
79    <input class="submit" type="submit" name="reject" value="{'Reject'|@translate}">
[2531]80  </p>
81
82</form>
[3185]83{/if}
Note: See TracBrowser for help on using the repository browser.