From: Barış Metin Date: Mon, 8 Jun 2009 12:28:16 +0000 (+0000) Subject: show slice_id for admins only X-Git-Tag: PLEWWW-4.3-19~14 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=e7cd33ab4cbb2dc94b896f850342823c18a7f933;p=plewww.git show slice_id for admins only --- diff --git a/planetlab/slices/slices.php b/planetlab/slices/slices.php index e541e0d..92210e4 100644 --- a/planetlab/slices/slices.php +++ b/planetlab/slices/slices.php @@ -106,7 +106,7 @@ if ( ! $slices ) { $nifty=new PlekitNifty ('','objects-list','big'); $nifty->start(); -$headers["I"]="int"; +if (plc_is_admin()) $headers["I"]="int"; $headers["Peer"]="string"; $headers["Name"]="string"; $headers["Users"]="string"; @@ -115,7 +115,10 @@ $headers["N"]="int"; $headers["Exp. d/m/y"]="date-dmy"; # initial sort on hostnames -$table=new PlekitTable ("slices",$headers,3, +if (plc_is_admin()) $slices_sort_column = 3; +else $slices_sort_column = 2; + +$table=new PlekitTable ("slices",$headers,$slices_sort_column, array('search_width'=>20)); $table->start(); @@ -128,7 +131,7 @@ foreach ($slices as $slice) { $expires= date( "d/m/Y", $slice['expires'] ); $table->row_start(); - $table->cell (l_slice_t($slice_id,$slice_id)); + if (plc_is_admin()) $table->cell (l_slice_t($slice_id,$slice_id)); $peers->cell($table,$peer_id); $table->cell (l_slice_obj($slice)); $table->cell ($users);