svn:keywords
[plewww.git] / planetlab / persons / person.php
index 322f98f..ce87e07 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: index.php 11645 2009-01-21 23:09:49Z thierry $
+// $Id$
 
 // Require login
 require_once 'plc_login.php';
@@ -67,16 +67,18 @@ if (empty($persons)) {
 
   if ($local_peer && $privileges) {
     if (plc_is_admin())
-       $tabs['Events'] = array('url'=>l_event("Person","person",$person_id),
-                               'bubble'=>'Related events',
-                               'image'=>'/planetlab/icons/event.png',
-                               'height'=>18);
+      $tabs['Events'] = array('url'=>l_events(),
+                             'values'=>array('type'=>'Person','person'=>$person_id),
+                             'bubble'=>'Related events',
+                             'image'=>'/planetlab/icons/event.png',
+                             'height'=>18);
     if ($enabled) 
       $tabs['Disable'] = array ('method'=>'POST',
                                'url'=>'/db/persons/person_actions.php',
                                'values'=> array ('person_id'=>$person_id,
                                                  'action'=>'disable'),
-                               'bubble'=>"Disable $first_name");
+                               'bubble'=>"Disable $first_name",
+                               'confirm'=>"Are you sure you want to disable $first_name $last_name");
     else 
       $tabs['Enable'] = array ('method'=>'POST',
                                'url'=>'/db/persons/person_actions.php',
@@ -96,11 +98,18 @@ if (empty($persons)) {
                            'values'=>array('id'=>$person_id),
                            'bubble'=>"Update $first_name");
 
-  $tabs['Persons'] = array ('url'=>l_persons());
+  $tabs['All Users'] = array ('url'=>l_persons());
 
   plc_tabs($tabs);
     
+  if ($privileges && ! $enabled ) 
+    drupal_set_message ("$first_name $last_name is not enabled yet, please use the 'Enable' button below");
+
+  $enabled_text="Enabled";
+  if ( ! $enabled ) $enabled_text = plc_warning_div("Disabled");
+
   plc_details_start();
+  plc_details_line("Enabled",$enabled_text);
   plc_details_line("First Name",$first_name);
   plc_details_line("Last Name",$last_name);
   plc_details_line("Title",$title);