closes #231
authorx2000habouzit <x2000habouzit>
Sat, 27 Nov 2004 16:01:03 +0000 (16:01 +0000)
committerx2000habouzit <x2000habouzit>
Sat, 27 Nov 2004 16:01:03 +0000 (16:01 +0000)
ChangeLog
htdocs/listes/moderate.php
templates/listes/moderate.tpl

index bce28af..29ef281 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,9 @@ Bug/Wish :
        * Fiche :
                - #83,208,222 : New fiche.                                                                                      -MC
        
+       * Lists :
+               - #231 : Add a link to the user's fiche on moderation page.                     -MC
+       
        * User Interface :
                - #211 : All imgs in the skins are links to login.php.                          -MC
 
index 9b08fc5..27fd105 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: moderate.php,v 1.22 2004-11-22 20:04:44 x2000habouzit Exp $
+        $Id: moderate.php,v 1.23 2004-11-27 16:01:03 x2000habouzit Exp $
  ***************************************************************************/
 
 if(empty($_REQUEST['liste'])) header('Location: index.php');
@@ -53,6 +53,8 @@ if(isset($_REQUEST['mid'])) {
     $mailer->setFrom("$liste-bounces@polytechnique.org");
     $mailer->addHeader('Reply-To', "$liste-owner@polytechnique.org");
 
+    $mail = $client->get_pending_mail($liste, $mid);
+
     if(isset($_REQUEST['mok'])) {
        unset($_GET['mid']);
        if($client->handle_request($liste,$mid,1,'')) { /** 1 = APPROVE **/
@@ -67,7 +69,6 @@ if(isset($_REQUEST['mid'])) {
        }
     } elseif(isset($_POST['mno'])) {
        $reason = stripslashes($_POST['reason']);
-       $mail = $client->get_pending_mail($liste, $mid);
        if($client->handle_request($liste,$mid,2,$reason)) { /** 2 = REJECT **/
            $mailer->setSubject("Message refusé");
            $texte = "le message suivant :\n\n"
@@ -81,7 +82,6 @@ if(isset($_REQUEST['mid'])) {
        }
     } elseif(isset($_REQUEST['mdel'])) {
        unset($_GET['mid']);
-       $mail = $client->get_pending_mail($liste, $mid);
        if($client->handle_request($liste,$mid,3,'')) { /** 3 = DISCARD **/
            $mailer->setSubject("Message supprimé");
            $texte = "le message suivant :\n\n"
@@ -132,6 +132,11 @@ if(isset($_REQUEST['sid'])) {
         $page->assign_by_ref('mail', $mail);
     } else {
        if(list($subs,$mails) = $client->get_pending_ops($liste)) {
+            foreach ($subs as $key=>$val) {
+                if (preg_match('/^([^.]*\.[^.]*\.\d\d\d\d)@polytechnique.org$/', $subs['addr'], $matches)) {
+                    $subs[$key]['login'] = $matches[1];
+                }
+            }
            $page->assign_by_ref('subs', $subs);
            $page->assign_by_ref('mails', $mails);
        } else
index 7e379bc..14276c6 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: moderate.tpl,v 1.20 2004-11-09 10:13:49 x2000habouzit Exp $
+        $Id: moderate.tpl,v 1.21 2004-11-27 16:01:04 x2000habouzit Exp $
  ***************************************************************************}
 
 {dynamic}
   </tr>
   {foreach from=$subs item=s}
   <tr class='{cycle values="pair,impair"}'>
-    <td>{$s.name}</td>
+    <td>{$s.name}{if $s.login}
+      <a href="{rel}/fiche.php?user={$s.login}" class="popup2">{*
+        *}<img src="{rel}/images/loupe.gif" alt="Afficher la fiche" title="Afficher la fiche" /></a>
+      {/if}
+    </td>
     <td>{$s.addr}</td>
     <td class='action'>
       <a href='?liste={$smarty.request.liste}&amp;sadd={$s.id}'>ajouter</a>