Index: /trunk/admin/comments.php
===================================================================
--- /trunk/admin/comments.php	(revision 5380)
+++ /trunk/admin/comments.php	(revision 5381)
@@ -39,47 +39,24 @@
 // +-----------------------------------------------------------------------+
 
-if (isset($_POST))
+if (!empty($_POST) and !is_adviser())
 {
-  $to_validate = array();
-  $to_reject = array();
-
-  if (isset($_POST['submit']) and !is_adviser())
+  if (empty($_POST['comments']))
   {
-    foreach (explode(',', $_POST['list']) as $comment_id)
+    array_push(
+      $page['errors'],
+      l10n('Select at least one comment')
+      );
+  }
+  else
+  {
+    check_input_parameter('comments', $_POST, true, PATTERN_ID);
+    
+    if (isset($_POST['validate']))
     {
-      if (isset($_POST['action-'.$comment_id]))
-      {
-        switch ($_POST['action-'.$comment_id])
-        {
-          case 'reject' :
-          {
-            array_push($to_reject, $comment_id);
-            break;
-          }
-          case 'validate' :
-          {
-            array_push($to_validate, $comment_id);
-            break;
-          }
-        }
-      }
-    }
-  }
-  else if (isset($_POST['validate-all']) and !empty($_POST['list']) and !is_adviser())
-  {
-    $to_validate = explode(',', $_POST['list']);
-  }
-  else if (isset($_POST['reject-all']) and !empty($_POST['list']) and !is_adviser())
-  {
-    $to_reject = explode(',', $_POST['list']);
-  }
-
-  if (count($to_validate) > 0)
-  {
-    $query = '
+      $query = '
 UPDATE '.COMMENTS_TABLE.'
   SET validated = \'true\'
     , validation_date = NOW()
-  WHERE id IN ('.implode(',', $to_validate).')
+  WHERE id IN ('.implode(',', $_POST['comments']).')
 ;';
     pwg_query($query);
@@ -89,25 +66,26 @@
       l10n_dec(
         '%d user comment validated', '%d user comments validated',
-        count($to_validate)
+        count($_POST['comments'])
         )
       );
-  }
+    }
 
-  if (count($to_reject) > 0)
-  {
-    $query = '
+    if (isset($_POST['reject']))
+    {
+      $query = '
 DELETE
   FROM '.COMMENTS_TABLE.'
-  WHERE id IN ('.implode(',', $to_reject).')
+  WHERE id IN ('.implode(',', $_POST['comments']).')
 ;';
-    pwg_query($query);
+      pwg_query($query);
 
-    array_push(
-      $page['infos'],
-      l10n_dec(
-        '%d user comment rejected', '%d user comments rejected',
-        count($to_reject)
-        )
-      );
+      array_push(
+        $page['infos'],
+        l10n_dec(
+          '%d user comment rejected', '%d user comments rejected',
+          count($_POST['comments'])
+          )
+        );
+    }
   }
 }
Index: /trunk/admin/themes/default/default-layout.css
===================================================================
--- /trunk/admin/themes/default/default-layout.css	(revision 5380)
+++ /trunk/admin/themes/default/default-layout.css	(revision 5381)
@@ -789,2 +789,5 @@
 
 .content .infos li, .content .errors li { list-style-type:square; }
+
+.checkActions {text-align:left;padding:0;margin:0;}
+.comment A:hover {border:none;}
Index: /trunk/admin/themes/default/template/comments.tpl
===================================================================
--- /trunk/admin/themes/default/template/comments.tpl	(revision 5380)
+++ /trunk/admin/themes/default/template/comments.tpl	(revision 5381)
@@ -1,2 +1,31 @@
+{literal}
+<script>
+$(document).ready(function(){
+  $(".checkComment").click(function () {
+    var checkbox = $(this).children("input[type=checkbox]");
+    $(checkbox).attr('checked', !$(checkbox).is(':checked'));
+  });
+
+  $("#commentSelectAll").click(function () {
+    $(".checkComment input[type=checkbox]").attr('checked', true);
+    return false;
+  });
+
+  $("#commentSelectNone").click(function () {
+    $(".checkComment input[type=checkbox]").attr('checked', false);
+    return false;
+  });
+
+  $("#commentSelectInvert").click(function () {
+    $(".checkComment input[type=checkbox]").each(function() {
+      $(this).attr('checked', !$(this).is(':checked'));
+    });
+    return false;
+  });
+
+});
+</script>
+{/literal}
+
 <div class="titrePage">
   <h2>{'Waiting'|@translate} {$TABSHEET_TITLE}</h2>
@@ -8,5 +37,11 @@
 <form method="post" action="{$F_ACTION}">
   
-  {foreach from=$comments item=comment}
+<table width="99%">
+  {foreach from=$comments item=comment name=comment}
+  <tr valign="top" class="{if $smarty.foreach.comment.index is odd}row2{else}row1{/if}">
+    <td style="width:50px;" class="checkComment">
+      <input type="checkbox" name="comments[]" value="{$comment.ID}">
+    </td>
+    <td>
   <div class="comment">
     <a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}"></a>
@@ -14,16 +49,19 @@
     <blockquote>{$comment.CONTENT}</blockquote>
   </div>
-    <ul class="actions">
-      <li><label><input type="radio" name="action-{$comment.ID}" value="reject">{'Reject'|@translate}</label></li>
-      <li><label><input type="radio" name="action-{$comment.ID}" value="validate">{'Validate'|@translate}</label></li>
-    </ul>
+    </td>
+  </tr>
   {/foreach}
+</table>
+
+  <p class="checkActions">
+    {'Select:'|@translate}
+    <a href="#" id="commentSelectAll">{'All'|@translate}</a>,
+    <a href="#" id="commentSelectNone">{'None'|@translate}</a>,
+    <a href="#" id="commentSelectInvert">{'Invert'|@translate}</a>
+  </p>
 
   <p class="bottomButtons">
-    <input type="hidden" name="list" value="{$LIST}">
-    <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}>
-    <input class="submit" type="submit" name="validate-all" value="{'Validate All'|@translate}" {$TAG_INPUT_ENABLED}>
-    <input class="submit" type="submit" name="reject-all" value="{'Reject All'|@translate}" {$TAG_INPUT_ENABLED}>
-    <input class="submit" type="reset" value="{'Reset'|@translate}">
+    <input class="submit" type="submit" name="validate" value="{'Validate'|@translate}" {$TAG_INPUT_ENABLED}>
+    <input class="submit" type="submit" name="reject" value="{'Reject'|@translate}" {$TAG_INPUT_ENABLED}>
   </p>
 
Index: /trunk/language/en_UK/admin.lang.php
===================================================================
--- /trunk/language/en_UK/admin.lang.php	(revision 5380)
+++ /trunk/language/en_UK/admin.lang.php	(revision 5381)
@@ -756,3 +756,6 @@
 $lang['Add New Language'] = 'Add New Language';
 $lang['Language has been successfully installed'] = 'Language has been successfully installed';
+$lang['Select:'] = 'Select:';
+$lang['None'] = 'None';
+$lang['Invert'] = 'Invert';
 ?>
Index: /trunk/language/fr_FR/admin.lang.php
===================================================================
--- /trunk/language/fr_FR/admin.lang.php	(revision 5380)
+++ /trunk/language/fr_FR/admin.lang.php	(revision 5381)
@@ -761,3 +761,6 @@
 $lang['Language has been successfully installed'] = 'La langue a été installée avec succès';
 $lang['Allow user customization'] = "Permettre la personnalisation de l'affichage";
+$lang['Select:'] = 'Sélectionner:';
+$lang['None'] = 'Rien';
+$lang['Invert'] = 'Inverser';
 ?>
