X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fpersons%2Fpersons.php;h=7308baa71f281c1cfb9ab7b78d052490bcc74d87;hb=ca9e63ad300735e10ae9d0bd9a8b0ad2feed276a;hp=575da0e177e8bc8dfd54b12a4120f151bb65135e;hpb=847006de47d4f1868cecf6126801a94e26f709ad;p=plewww.git diff --git a/planetlab/persons/persons.php b/planetlab/persons/persons.php index 575da0e..7308baa 100644 --- a/planetlab/persons/persons.php +++ b/planetlab/persons/persons.php @@ -18,9 +18,10 @@ require_once 'plc_functions.php'; require_once 'plc_peers.php'; require_once 'linetabs.php'; require_once 'table.php'; +require_once 'nifty.php'; //fix the memory limit for this page -ini_set("memory_limit","48M"); +ini_set("memory_limit","64M"); // -------------------- // recognized URL arguments @@ -127,54 +128,60 @@ foreach ($sites as $site) { // -------------------- drupal_set_title($title); -//plekit_linetabs($tabs); +plekit_linetabs($tabs); if ( ! $persons ) { drupal_set_message ('No account found'); return; } +$nifty=new PlekitNifty ('','objects-list','big'); +$nifty->start(); $headers = array ("Peer"=>"string", "First"=>"string", "Last"=>"string", "Email"=>"string", "Site" => "string", - "Roles"=>"string", + "R"=>"string", "S" => "int", "Status"=>"string", ); // initial sort on email -$table=new PlekitTable("persons",$headers,4); +$table=new PlekitTable("persons",$headers,3); $table->start(); $peers=new Peers ($api); + // write rows foreach ($persons as $person) { $person_id=$person['person_id']; $email=$person['email']; - $shortname = $peers->shortname($person['peer_id']); $site_id=$person['site_ids'][0]; $site=$site_hash[$site_id]; $login_base = $site['login_base']; $roles = plc_vertical_table ($person['roles']); + $peer_id=$person['peer_id']; $table->row_start(); - $table->cell($shortname); - $table->cell ($person['first_name']); - $table->cell ($person['last_name']); + $peers->cell($table,$peer_id); + $table->cell (href(l_person($person_id),$person['first_name'])); + $table->cell (href(l_person($person_id),$person['last_name'])); $table->cell(l_person_t($person_id,$email)); - $table->cell(l_site_t($site_id,$login_base)); - $table->cell($roles); + $table->cell(l_site_t($site_id,$login_base),array('only-if'=>!$peer_id)); + $table->cell($roles,array('only-if'=>!$peer_id)); $table->cell(count($person['slice_ids'])); $table->cell(person_status($person)); $table->row_end(); } -$notes=array("The S column shows the number of slices for the given user"); +$notes = array(); +$notes []= "R = roles"; +$notes []= "S = number of slices"; $table->end(array('notes'=>$notes)); +$nifty->end(); //plekit_linetabs ($tabs,"bottom");