source: extensions/GuestBook/admin/template/pending.tpl @ 26065

Last change on this file since 26065 was 26065, checked in by mistic100, 10 years ago

update for Piwigo 2.6 + code clean

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