handling toggle parts visible tag: now rely on local storage, so avoid
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 6 Oct 2011 14:00:20 +0000 (16:00 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 6 Oct 2011 14:00:20 +0000 (16:00 +0200)
to specify that as much as possible

planetlab/includes/plc_functions.php
planetlab/nodes/interface.php
planetlab/nodes/node.php
planetlab/nodes/node_add.php
planetlab/persons/person.php
planetlab/sites/site.php
planetlab/slices/slice.php
planetlab/slices/slice_add.php
planetlab/tags/tag.php

index d40de74..678de29 100644 (file)
@@ -75,13 +75,13 @@ function l_actions_download ()              { return "/db/nodes/node_downloads.php"; }
 function l_register_node ()            { return "/registerwizard/index.php"; }
 function l_pcu_add ()                  { return "/registerwizard/index.php/register/stage1_addpcu"; }
 function l_pcu ($pcu_id)               { return "/db/sites/pcu.php?id=$pcu_id"; }
 function l_register_node ()            { return "/registerwizard/index.php"; }
 function l_pcu_add ()                  { return "/registerwizard/index.php/register/stage1_addpcu"; }
 function l_pcu ($pcu_id)               { return "/db/sites/pcu.php?id=$pcu_id"; }
-function l_pcu_href ($pcu_id, $text)           { return href(l_pcu($pcu_id), $text); }
+function l_pcu_href ($pcu_id, $text)   { return href(l_pcu($pcu_id), $text); }
 
 function l_nodes ()                    { return "/db/nodes/index.php"; }
 function l_nodes_peer ($peer_id)       { return "/db/nodes/index.php?peerscope=$peer_id"; }
 function l_node ($node_id)             { return "/db/nodes/node.php?id=$node_id"; }
 
 function l_nodes ()                    { return "/db/nodes/index.php"; }
 function l_nodes_peer ($peer_id)       { return "/db/nodes/index.php?peerscope=$peer_id"; }
 function l_node ($node_id)             { return "/db/nodes/node.php?id=$node_id"; }
-function l_node_interfaces ($node_id)  { return "/db/nodes/node.php?id=$node_id%show_details=0&show_interfaces=1"; }
-function l_node_tags ($node_id)                { return "/db/nodes/node.php?id=$node_id%show_details=0&show_tags=1"; }
+function l_node_interfaces ($node_id)  { return "/db/nodes/node.php?id=$node_id&show_interfaces=1"; }
+function l_node_tags ($node_id)                { return "/db/nodes/node.php?id=$node_id&show_tags=1"; }
 function l_node_t ($node_id,$text)     { return href (l_node($node_id),$text); }
 function l_node_obj($node)             { return href(l_node($node['node_id']),$node['hostname']); }
 function l_node_add ()                 { return "/db/nodes/node_add.php"; }
 function l_node_t ($node_id,$text)     { return href (l_node($node_id),$text); }
 function l_node_obj($node)             { return href(l_node($node['node_id']),$node['hostname']); }
 function l_node_add ()                 { return "/db/nodes/node_add.php"; }
@@ -92,7 +92,7 @@ function l_nodes_person ($person_id)  { return "/db/nodes/index.php?person_id=$pe
 function l_nodes_slice ($slice_id)     { return "/db/nodes/index.php?slice_id=$slice_id"; }
 
 function l_interface ($interface_id)   { return "/db/nodes/interface.php?id=$interface_id"; }
 function l_nodes_slice ($slice_id)     { return "/db/nodes/index.php?slice_id=$slice_id"; }
 
 function l_interface ($interface_id)   { return "/db/nodes/interface.php?id=$interface_id"; }
-function l_interface_tags($interface_id){ return "/db/nodes/interface.php?id=$interface_id&show_details=0&show_tags=1"; }
+function l_interface_tags($interface_id){ return "/db/nodes/interface.php?id=$interface_id&show_tags=1"; }
 function l_interface_t ($interface_id,$text) { 
                                          return href (l_interface($interface_id),$text); }
 function l_interface_add($node_id)     { return "/db/nodes/interface.php?node_id=$node_id"; }
 function l_interface_t ($interface_id,$text) { 
                                          return href (l_interface($interface_id),$text); }
 function l_interface_add($node_id)     { return "/db/nodes/interface.php?node_id=$node_id"; }
@@ -106,7 +106,7 @@ function l_site_obj($site)          { return href (l_site($site['site_id']),$site['name'
 function l_slices ()                   { return "/db/slices/index.php"; }
 function l_slices_peer ($peer_id)      { return "/db/slices/index.php?peerscope=$peer_id"; }
 function l_slice ($slice_id)           { return "/db/slices/index.php?id=$slice_id"; }
 function l_slices ()                   { return "/db/slices/index.php"; }
 function l_slices_peer ($peer_id)      { return "/db/slices/index.php?peerscope=$peer_id"; }
 function l_slice ($slice_id)           { return "/db/slices/index.php?id=$slice_id"; }
-function l_slice_nodes ($slice_id)     { return "/db/slices/index.php?id=$slice_id&show_details=0&show_nodes=1&show_nodes_current=1&show_nodes_add=1"; }
+function l_slice_nodes ($slice_id)     { return "/db/slices/index.php?id=$slice_id&show_nodes=1&show_nodes_current=1&show_nodes_add=1"; }
 function l_slice_t ($slice_id,$text)   { return href (l_slice($slice_id),$text); }
 function l_slice_add ()                        { return "/db/slices/slice_add.php"; }
 function l_slices_site($site_id)       { return "/db/slices/index.php?site_id=$site_id"; }
 function l_slice_t ($slice_id,$text)   { return href (l_slice($slice_id),$text); }
 function l_slice_add ()                        { return "/db/slices/slice_add.php"; }
 function l_slices_site($site_id)       { return "/db/slices/index.php?site_id=$site_id"; }
@@ -123,7 +123,7 @@ function l_sliver_t ($node_id,$slice_id,$text) {
 function l_persons ()                  { return "/db/persons/index.php&active_line_tab=All Accounts"; }
 function l_persons_peer ($peer_id)     { return "/db/persons/index.php?peerscope=$peer_id&active_line_tab=Local Accounts"; }
 function l_person ($person_id)         { return "/db/persons/index.php?id=$person_id"; }
 function l_persons ()                  { return "/db/persons/index.php&active_line_tab=All Accounts"; }
 function l_persons_peer ($peer_id)     { return "/db/persons/index.php?peerscope=$peer_id&active_line_tab=Local Accounts"; }
 function l_person ($person_id)         { return "/db/persons/index.php?id=$person_id"; }
-function l_person_roles ($person_id)   { return "/db/persons/index.php?id=$person_id&show_details=0&show_roles=1"; }
+function l_person_roles ($person_id)   { return "/db/persons/index.php?id=$person_id&show_roles=1"; }
 function l_person_t ($person_id,$text) { return href (l_person($person_id),$text); }
 function l_persons_site ($site_id)     { return "/db/persons/index.php?site_id=$site_id"; }
 function l_persons_slice ($slice_id)   { return "/db/persons/index.php?slice_id=$slice_id"; }
 function l_person_t ($person_id,$text) { return href (l_person($person_id),$text); }
 function l_persons_site ($site_id)     { return "/db/persons/index.php?site_id=$site_id"; }
 function l_persons_slice ($slice_id)   { return "/db/persons/index.php?slice_id=$slice_id"; }
@@ -132,7 +132,7 @@ function l_person_obj ($person)             { return l_person_t($person['person_id'],$perso
 function l_tags ()                     { return "/db/tags/index.php"; }
 function l_tag ($tag_type_id)          { return "/db/tags/index.php?id=$tag_type_id"; }
 function l_tag_obj ($tag)              { return href(l_tag($tag['tag_type_id']),$tag['tagname']); }
 function l_tags ()                     { return "/db/tags/index.php"; }
 function l_tag ($tag_type_id)          { return "/db/tags/index.php?id=$tag_type_id"; }
 function l_tag_obj ($tag)              { return href(l_tag($tag['tag_type_id']),$tag['tagname']); }
-function l_tag_roles ($tag_type_id)    { return "/db/tags/index.php?id=$tag_type_id&show_details=0&show_roles=1"; }
+function l_tag_roles ($tag_type_id)    { return "/db/tags/index.php?id=$tag_type_id&show_roles=1"; }
 
 function l_nodegroups ()               { return "/db/tags/nodegroups.php"; }
 function l_nodegroup ($nodegroup_id)   { return "/db/tags/nodegroup.php?id=$nodegroup_id"; }
 
 function l_nodegroups ()               { return "/db/tags/nodegroups.php"; }
 function l_nodegroup ($nodegroup_id)   { return "/db/tags/nodegroup.php?id=$nodegroup_id"; }
@@ -576,7 +576,7 @@ function instantiation_label ($slice) {
   
 //////////////////// toggle areas
 // get_arg ('show_persons',false) returns $_GET['show_persons'] if set and false otherwise
   
 //////////////////// toggle areas
 // get_arg ('show_persons',false) returns $_GET['show_persons'] if set and false otherwise
-function get_arg ($name,$default,$method='get') {
+function get_arg ($name,$default=NULL,$method='get') {
   if ($method == 'get') $var=$_GET; else $var=$_POST;
   if (isset ($var[$name])) return $var[$name];
   else return $default;
   if ($method == 'get') $var=$_GET; else $var=$_POST;
   if (isset ($var[$name])) return $var[$name];
   else return $default;
index a2d13c2..744ce3f 100644 (file)
@@ -50,7 +50,7 @@ if ( ! $node_id) {
 
 $tabs=array();
 $tabs[] = array('label'=>'Back to node', 'url'=>l_node($node_id), 
 
 $tabs=array();
 $tabs[] = array('label'=>'Back to node', 'url'=>l_node($node_id), 
-               'values' => array('show_details'=>False,'show_interfaces'=>True),
+               'values' => array('show_interfaces'=>True),
                'bubble'=>'Cancel pending changes');
 plekit_linetabs($tabs);
 
                'bubble'=>'Cancel pending changes');
 plekit_linetabs($tabs);
 
@@ -76,7 +76,7 @@ drupal_set_html_head ('
 $nifty_id = ($mode == 'add' ) ? 'add-interface' : 'interface';
 $toggle = new PlekitToggle ($nifty_id,"Details",
                            array('bubble'=>'Display and modify details for that interface',
 $nifty_id = ($mode == 'add' ) ? 'add-interface' : 'interface';
 $toggle = new PlekitToggle ($nifty_id,"Details",
                            array('bubble'=>'Display and modify details for that interface',
-                                 'visible'=>get_arg('show_details',true)));
+                                 'visible'=>get_arg('show_details')));
 $toggle->start();
 
 $details=new PlekitDetails($can_update);
 $toggle->start();
 
 $details=new PlekitDetails($can_update);
@@ -156,7 +156,7 @@ if ($mode == 'add') return;
 //////////////////////////////////////// tags
 $tags=$api->GetInterfaceTags (array('interface_id'=>$interface_id));
 $toggle=new PlekitToggle ('tags',count_english($tags,'tag'),
 //////////////////////////////////////// tags
 $tags=$api->GetInterfaceTags (array('interface_id'=>$interface_id));
 $toggle=new PlekitToggle ('tags',count_english($tags,'tag'),
-                         array('visible'=>get_arg('show_tags',true)));
+                         array('visible'=>get_arg('show_tags')));
 $toggle->start();
 
 $form = new PlekitForm (l_actions(),array('interface_id'=>$interface_id));
 $toggle->start();
 
 $form = new PlekitForm (l_actions(),array('interface_id'=>$interface_id));
index f7c5e6f..52dfddc 100644 (file)
@@ -132,7 +132,7 @@ $peers->block_start ($peer_id);
   
 $toggle = new PlekitToggle ('node',"Details",
                            array('bubble'=>'Display and modify details for that node',
   
 $toggle = new PlekitToggle ('node',"Details",
                            array('bubble'=>'Display and modify details for that node',
-                                 'visible'=>get_arg('show_details',true)));
+                                 'visible'=>get_arg('show_details')));
 $toggle->start();
 
 $details=new PlekitDetails($privileges);
 $toggle->start();
 
 $details=new PlekitDetails($privileges);
@@ -362,7 +362,7 @@ $form->start();
 {
   $toggle=new PlekitToggle ('slices',count_english_warning($slices,'sliver'),
                            array('bubble'=>'Review slices running on that node',
 {
   $toggle=new PlekitToggle ('slices',count_english_warning($slices,'sliver'),
                            array('bubble'=>'Review slices running on that node',
-                                 'visible'=>get_arg('show_slices',false)));
+                                 'visible'=>get_arg('show_slices')));
   $toggle->start();
   if ( ! $slices  ) {
     plc_warning ("This node is not associated to any slice");
   $toggle->start();
   if ( ! $slices  ) {
     plc_warning ("This node is not associated to any slice");
@@ -405,7 +405,7 @@ if ( $local_peer ) {
   
   $toggle = new PlekitToggle ('tags',count_english($tags,'tag'),
                              array('bubble'=>'Inspect and set tags on that node',
   
   $toggle = new PlekitToggle ('tags',count_english($tags,'tag'),
                              array('bubble'=>'Inspect and set tags on that node',
-                                   'visible'=>get_arg('show_tags',false)));
+                                   'visible'=>get_arg('show_tags')));
   $toggle->start();
 
   $headers=array("Name"=>"string",
   $toggle->start();
 
   $headers=array("Name"=>"string",
@@ -463,7 +463,7 @@ if ( $local_peer ) {
 if ( $local_peer ) {
   $toggle=new PlekitToggle ('interfaces',count_english_warning($interfaces,'interface'),
                            array('bubble'=>'Inspect and tune interfaces on that node',
 if ( $local_peer ) {
   $toggle=new PlekitToggle ('interfaces',count_english_warning($interfaces,'interface'),
                            array('bubble'=>'Inspect and tune interfaces on that node',
-                                 'visible'=>get_arg('show_interfaces',false)));
+                                 'visible'=>get_arg('show_interfaces')));
   $toggle->start();
   // display interfaces
   if( ! $interfaces ) {
   $toggle->start();
   // display interfaces
   if( ! $interfaces ) {
index 8a17774..cbcb3d0 100644 (file)
@@ -168,7 +168,7 @@ EOF;
 
 $toggle = new PlekitToggle ('add-node',"Add Node",
                            array('bubble'=>'Add a node - does not enforce PCU - for admins only !',
 
 $toggle = new PlekitToggle ('add-node',"Add Node",
                            array('bubble'=>'Add a node - does not enforce PCU - for admins only !',
-                                 'visible'=>get_arg('show_details',true)));
+                                 'visible'=>get_arg('show_details')));
 $toggle->start();
 
 $details=new PlekitDetails($has_privileges);
 $toggle->start();
 
 $details=new PlekitDetails($has_privileges);
index 0f26168..ea948f9 100644 (file)
@@ -129,7 +129,7 @@ $can_update = (plc_is_admin() && $local_peer) || $is_my_account;
 
 $toggle = new PlekitToggle ('person',"Details",
                            array('bubble'=>'Display and modify details for that account',
 
 $toggle = new PlekitToggle ('person',"Details",
                            array('bubble'=>'Display and modify details for that account',
-                                 'visible'=>get_arg('show_details',true)));
+                                 'visible'=>get_arg('show_details')));
 $toggle->start();
 
 $details = new PlekitDetails($can_update);
 $toggle->start();
 
 $details = new PlekitDetails($can_update);
@@ -169,7 +169,7 @@ $toggle->end();
 if ($local_peer) {
   $slices_title=count_english_warning($slices,'slice');
   $toggle=new PlekitToggle ('slices',$slices_title,
 if ($local_peer) {
   $slices_title=count_english_warning($slices,'slice');
   $toggle=new PlekitToggle ('slices',$slices_title,
-                           array('visible'=>get_arg('show_slices',false)));
+                           array('visible'=>get_arg('show_slices')));
   $toggle->start();
   
   if( ! $slices) {
   $toggle->start();
   
   if( ! $slices) {
@@ -205,7 +205,7 @@ $form->start();
 //////////////////// keys
 if ($local_peer) {
   $keys_title = count_english_warning($keys,'key');
 //////////////////// keys
 if ($local_peer) {
   $keys_title = count_english_warning($keys,'key');
-  $toggle=new PlekitToggle ('keys',$keys_title,array('visible'=>get_arg('show_keys',false)));
+  $toggle=new PlekitToggle ('keys',$keys_title,array('visible'=>get_arg('show_keys')));
   $toggle->start();
                
   $can_manage_keys = ( $local_peer && ( plc_is_admin() || $is_my_account) );
   $toggle->start();
                
   $can_manage_keys = ( $local_peer && ( plc_is_admin() || $is_my_account) );
@@ -257,7 +257,7 @@ if ($local_peer) {
 if ($local_peer) {
   $sites_title = count_english_warning($sites,'site');
   $toggle=new PlekitToggle('sites',$sites_title,
 if ($local_peer) {
   $sites_title = count_english_warning($sites,'site');
   $toggle=new PlekitToggle('sites',$sites_title,
-                          array('visible'=>get_arg('show_sites',false)));
+                          array('visible'=>get_arg('show_sites')));
   $toggle->start();
   
   if (empty( $sites ) ) {
   $toggle->start();
   
   if (empty( $sites ) ) {
@@ -314,7 +314,7 @@ if ($local_peer) {
  }
 //////////////////// roles
 if ($local_peer) {
  }
 //////////////////// roles
 if ($local_peer) {
-  $toggle=new PlekitToggle ('roles',count_english($roles,"role"),array('visible'=>get_arg('show_roles',false)));
+  $toggle=new PlekitToggle ('roles',count_english($roles,"role"),array('visible'=>get_arg('show_roles')));
   $toggle->start();
 
   if (! $roles) plc_warning ("This user has no role !");
   $toggle->start();
 
   if (! $roles) plc_warning ("This user has no role !");
index 760cb0e..dc10a90 100644 (file)
@@ -172,7 +172,7 @@ $can_update=(plc_is_admin ()  && $local_peer) || ( plc_in_site($site_id) && plc_
 
 
 $toggle = new PlekitToggle ('site',"Details",
 
 
 $toggle = new PlekitToggle ('site',"Details",
-                           array('visible'=>get_arg('show_details',true),
+                           array('visible'=>get_arg('show_details'),
                                  'bubble'=>'Display and modify details for that site'));
 $toggle->start();
 
                                  'bubble'=>'Display and modify details for that site'));
 $toggle->start();
 
@@ -237,7 +237,7 @@ if ( $local_peer ) {
   $nodes_title .= href(l_nodes_site($site_id)," (See as nodes)");
 
   $toggle=new PlekitToggle ('nodes',$nodes_title,
   $nodes_title .= href(l_nodes_site($site_id)," (See as nodes)");
 
   $toggle=new PlekitToggle ('nodes',$nodes_title,
-                           array('visible'=>get_arg('show_nodes',true)));
+                           array('visible'=>get_arg('show_nodes')));
   $toggle->start();
 
   $headers=array();
   $toggle->start();
 
   $headers=array();
@@ -310,7 +310,7 @@ if ( $local_peer ) {
   $persons_title .= href(l_persons_site($site_id)," (See as users)");
 
   $toggle=new PlekitToggle ('persons',$persons_title,
   $persons_title .= href(l_persons_site($site_id)," (See as users)");
 
   $toggle=new PlekitToggle ('persons',$persons_title,
-                           array('visible'=>get_arg('show_persons',false)));
+                           array('visible'=>get_arg('show_persons')));
   $toggle->start();
 
   $headers = array ();
   $toggle->start();
 
   $headers = array ();
@@ -348,7 +348,7 @@ if ( $local_peer ) {
   $slices_title .= href(l_slices_site($site_id)," (See as slices)");
   
   $toggle=new PlekitToggle ('slices',$slices_title,
   $slices_title .= href(l_slices_site($site_id)," (See as slices)");
   
   $toggle=new PlekitToggle ('slices',$slices_title,
-                           array('visible'=>get_arg('show_slices',false)));
+                           array('visible'=>get_arg('show_slices')));
   $toggle->start();
 
   $headers = array ();
   $toggle->start();
 
   $headers = array ();
@@ -384,7 +384,7 @@ if ( $local_peer ) {
 
   //////////////////// Addresses
   $toggle=new PlekitToggle ('addresses',"Addresses",
 
   //////////////////// Addresses
   $toggle=new PlekitToggle ('addresses',"Addresses",
-                           array('visible'=>get_arg('show_addresses',false)));
+                           array('visible'=>get_arg('show_addresses')));
   $toggle->start();
   if ( ! $addresses) {
     print "<p class='addresses'>No known address for this site</p>";
   $toggle->start();
   if ( ! $addresses) {
     print "<p class='addresses'>No known address for this site</p>";
index d04d7dc..af265b6 100644 (file)
@@ -233,7 +233,7 @@ $toggle =
   new PlekitToggle ('my-slice-details',"Details",
                    array('bubble'=>
                          'Display and modify details for that slice',
   new PlekitToggle ('my-slice-details',"Details",
                    array('bubble'=>
                          'Display and modify details for that slice',
-                         'visible'=>get_arg('show_details',NULL)));
+                         'visible'=>get_arg('show_details')));
 $toggle->start();
 
 $details=new PlekitDetails($privileges);
 $toggle->start();
 
 $details=new PlekitDetails($privileges);
@@ -285,7 +285,7 @@ $toggle=
   new PlekitToggle ('my-slice-persons',"$count users",
                    array('bubble'=>
                          'Manage accounts attached to this slice',
   new PlekitToggle ('my-slice-persons',"$count users",
                    array('bubble'=>
                          'Manage accounts attached to this slice',
-                         'visible'=>get_arg('show_persons',NULL)));
+                         'visible'=>get_arg('show_persons')));
 $toggle->start();
 
 ////////// people currently in
 $toggle->start();
 
 ////////// people currently in
@@ -295,7 +295,7 @@ $toggle->start();
 // show otherwise
 $toggle_persons = new PlekitToggle ('my-slice-persons-current',
                                    "$count people currently in $name",
 // show otherwise
 $toggle_persons = new PlekitToggle ('my-slice-persons-current',
                                    "$count people currently in $name",
-                                   array('visible'=>get_arg('show_persons_current',!$privileges)));
+                                   array('visible'=>get_arg('show_persons_current')));
 $toggle_persons->start();
 
 $headers=array();
 $toggle_persons->start();
 
 $headers=array();
@@ -337,7 +337,7 @@ if ($privileges) {
   $count=count($potential_persons);
   $toggle_persons = new PlekitToggle ('my-slice-persons-add',
                                      "$count people may be added to $name",
   $count=count($potential_persons);
   $toggle_persons = new PlekitToggle ('my-slice-persons-add',
                                      "$count people may be added to $name",
-                                     array('visible'=>get_arg('show_persons_add',NULL)));
+                                     array('visible'=>get_arg('show_persons_add')));
   $toggle_persons->start();
   if ( ! $potential_persons ) {
     // xxx improve style
   $toggle_persons->start();
   if ( ! $potential_persons ) {
     // xxx improve style
@@ -556,7 +556,7 @@ if (count($reservable_nodes)) $nodes_message .= " (" . count($reservable_nodes)
 $toggle=new PlekitToggle ('my-slice-nodes',$nodes_message,
                          array('bubble'=>
                                'Manage nodes attached to this slice',
 $toggle=new PlekitToggle ('my-slice-nodes',$nodes_message,
                          array('bubble'=>
                                'Manage nodes attached to this slice',
-                               'visible'=>get_arg('show_nodes',NULL)));
+                               'visible'=>get_arg('show_nodes')));
 $toggle->start();
 
 
 $toggle->start();
 
 
@@ -578,7 +578,7 @@ if ($count && $privileges) {
   // having reservable nodes in white lists looks a bit off scope for now...
   $toggle_nodes=new PlekitToggle('my-slice-nodes-reserve',
                                 "Leases - " . count($reservable_nodes) . " reservable node(s)",
   // having reservable nodes in white lists looks a bit off scope for now...
   $toggle_nodes=new PlekitToggle('my-slice-nodes-reserve',
                                 "Leases - " . count($reservable_nodes) . " reservable node(s)",
-                                array('visible'=>get_arg('show_nodes_resa',NULL), 
+                                array('visible'=>get_arg('show_nodes_resa'), 
                                       'info-text'=>$leases_info,
                                       'info-visible'=>$show_reservable_info));
   $toggle_nodes->start();
                                       'info-text'=>$leases_info,
                                       'info-visible'=>$show_reservable_info));
   $toggle_nodes->start();
@@ -691,7 +691,7 @@ foreach ($interfaces as $interface) $interface_hash[$interface['node_id']]=$inte
 //////////////////// nodes currently in
 $toggle_nodes=new PlekitToggle('my-slice-nodes-current',
                               count_english($slice_nodes,"node") . " currently in $name",
 //////////////////// nodes currently in
 $toggle_nodes=new PlekitToggle('my-slice-nodes-current',
                               count_english($slice_nodes,"node") . " currently in $name",
-                              array('visible'=>get_arg('show_nodes_current',!$privileges)));
+                              array('visible'=>get_arg('show_nodes_current')));
 $toggle_nodes->start();
 
 $headers=array();
 $toggle_nodes->start();
 
 $headers=array();
@@ -787,7 +787,7 @@ if ($privileges) {
   $count=count($potential_nodes);
   $toggle_nodes=new PlekitToggle('my-slice-nodes-add',
                                 count_english($potential_nodes,"more node") . " available",
   $count=count($potential_nodes);
   $toggle_nodes=new PlekitToggle('my-slice-nodes-add',
                                 count_english($potential_nodes,"more node") . " available",
-                                array('visible'=>get_arg('show_nodes_add',NULL)));
+                                array('visible'=>get_arg('show_nodes_add')));
   $toggle_nodes->start();
 
   if ( $potential_nodes ) {
   $toggle_nodes->start();
 
   if ( $potential_nodes ) {
@@ -919,7 +919,7 @@ if ($local_peer) {
 
   $toggle = new PlekitToggle('slice-initscripts',$label,
                             array('bubble'=>'Manage initscript on that slice',
 
   $toggle = new PlekitToggle('slice-initscripts',$label,
                             array('bubble'=>'Manage initscript on that slice',
-                                  'visible'=>get_arg('show_initscripts',NULL),
+                                  'visible'=>get_arg('show_initscripts'),
                                   'info-text'=>$initscript_info
                                   // not messing with persontags to guess whether this should be displayed or not
                                   // hopefully some day toggle will know how to handle that using web storage
                                   'info-text'=>$initscript_info
                                   // not messing with persontags to guess whether this should be displayed or not
                                   // hopefully some day toggle will know how to handle that using web storage
@@ -994,7 +994,7 @@ $tag_value_threshold=24;
   
   $toggle = new PlekitToggle ('slice-tags',count_english_warning($tags,'tag'),
                              array('bubble'=>'Inspect and set tags on that slice',
   
   $toggle = new PlekitToggle ('slice-tags',count_english_warning($tags,'tag'),
                              array('bubble'=>'Inspect and set tags on that slice',
-                                   'visible'=>get_arg('show_tags',NULL)));
+                                   'visible'=>get_arg('show_tags')));
   $toggle->start();
   
   $headers=array(
   $toggle->start();
   
   $headers=array(
index f258bda..59c0efc 100644 (file)
@@ -215,7 +215,7 @@ New software releases and available services are announced here as well.
 EOF;
 
 $toggle = new PlekitToggle ('create-slice-details','Slice Details',
 EOF;
 
 $toggle = new PlekitToggle ('create-slice-details','Slice Details',
-                           array ('visible'=>get_arg('show_slice',true)));
+                           array ('visible'=>get_arg('show_slice')));
 $details = new PlekitDetails(TRUE);
 
 $form_variables = array('site_id'=>plc_my_site_id());
 $details = new PlekitDetails(TRUE);
 
 $form_variables = array('site_id'=>plc_my_site_id());
@@ -281,7 +281,7 @@ $toggle->end();
 if ($persons) {
   $title = count($persons) . " people can be added in slice";
   $toggle=new PlekitToggle ('create-slice-persons',$title,
 if ($persons) {
   $title = count($persons) . " people can be added in slice";
   $toggle=new PlekitToggle ('create-slice-persons',$title,
-                         array('visible'=>get_arg('show_persons',true)));
+                         array('visible'=>get_arg('show_persons')));
   $toggle->start();
   
   $headers = array();
   $toggle->start();
   
   $headers = array();
index 2f915e9..d4458cf 100644 (file)
@@ -111,7 +111,7 @@ $toggle->end();
 $form=new PlekitForm(l_actions(), array("tag_type_id"=>$tag_type_id));
 $form->start();
 
 $form=new PlekitForm(l_actions(), array("tag_type_id"=>$tag_type_id));
 $form->start();
 
-$toggle=new PlekitToggle ('roles',count_english($roles,"role"),array('visible'=>get_arg('show_roles',false)));
+$toggle=new PlekitToggle ('roles',count_english($roles,"role"),array('visible'=>get_arg('show_roles')));
 $toggle->start();
 
 if (! $roles) plc_warning ("This tag type has no role !");
 $toggle->start();
 
 if (! $roles) plc_warning ("This tag type has no role !");