add link to user being banned in forums banishment administration
authorPascal Corpet <pascal.corpet@m4x.org>
Sun, 23 Mar 2008 23:59:04 +0000 (00:59 +0100)
committerPascal Corpet <pascal.corpet@m4x.org>
Sun, 23 Mar 2008 23:59:55 +0000 (00:59 +0100)
modules/forums.php
templates/forums/admin.tpl

index f02a9dc..3354d85 100644 (file)
@@ -157,6 +157,7 @@ class ForumsModule extends PLModule
         $table_editor->describe('comment','commentaire',true);
         $table_editor->apply($page, $action, $id);
         $page->changeTpl('forums/admin.tpl');
+        $page->addJsLink('jquery.js');
     }
 
     static function run_banana(&$page, $params = null)
index 0cac7fb..188ed33 100644 (file)
@@ -40,5 +40,18 @@ Les différentes règles sont appliquées par ordre de priorité décroissante.
 
 {include file="core/table-editor.tpl"}
 
+{literal}
+<script type="text/javascript">
+  $('#body td table tr').each(function() { 
+    var uidcell = $('td:eq(3)',this);
+    if (uidcell.length != 1) {
+      return;
+    }
+    var uid = uidcell.text().replace(/^\s+/g,'').replace(/\s+$/g,'');
+    uidcell.replaceWith('<'+'a href="admin/user/'+uid+'">'+uid+'</'+'a>');
+  });
+</script>
+{/literal}
+
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}