use ext_consortium_id for pending sites
[plewww.git] / planetlab / sites / site.php
index 887adcf..ef5fe1e 100644 (file)
@@ -92,7 +92,7 @@ else
 $techs = array();
 $pis = array();
 $disabled_persons = array();
-foreach( $persons as $person ) {
+if ($persons) foreach( $persons as $person ) {
   $role_ids= $person['role_ids'];
 
   if ( in_array( '20', $role_ids ))    $pis[] = $person;
@@ -112,6 +112,8 @@ drupal_set_title("Details for site " . $sitename);
   
 $tabs=array();
 
+$tabs []= tab_mysite();
+
 // available actions
 if ( $is_site_admin)
   $tabs['Expire slices'] = array('url'=>l_actions(),
@@ -148,10 +150,15 @@ plekit_linetabs($tabs);
 // show gray background on foreign objects : start a <div> with proper class
 $peers->block_start ($peer_id);
 
-if ( $local_peer && ( ! $enabled ) )
-  plc_warning ("This site is not enabled - Please visit " . 
-              href (l_sites_pending(),"this page") . 
-              " to review pending applications.");
+if ( $local_peer && ( ! $enabled ) ) {
+    if ($site['ext_consortium_id'] == $PENDING_CONSORTIUM_ID) {
+        plc_warning ("This site is not enabled - Please visit " . 
+                     href (l_sites_pending(),"this page") . 
+                     " to review pending applications.");
+    } else {
+        plc_warning ("This site is disabled.");
+    }
+}
 
 $can_update=(plc_is_admin ()  && $local_peer) || ( plc_in_site($site_id) && plc_is_pi());
 
@@ -222,7 +229,7 @@ if ( $local_peer ) {
   $nodes_title .= href(l_nodes_site($site_id)," (See as nodes)");
 
   $toggle=new PlekitToggle ('nodes',$nodes_title,
-                           array('visible'=>get_arg('show_nodes',false)));
+                           array('visible'=>get_arg('show_nodes',true)));
   $toggle->start();
 
   $headers=array();