add tabs on bottom as well
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sun, 15 Feb 2009 15:50:02 +0000 (15:50 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sun, 15 Feb 2009 15:50:02 +0000 (15:50 +0000)
16 files changed:
planetlab/events/events.php
planetlab/events/events_choser.php
planetlab/includes/plc_minitabs.php
planetlab/nodes/interface.php
planetlab/nodes/node.php
planetlab/nodes/nodes.php
planetlab/peers/peer.php
planetlab/peers/peers.php
planetlab/persons/person.php
planetlab/persons/persons.php
planetlab/sites/site.php
planetlab/sites/sites.php
planetlab/tags/nodegroup.php
planetlab/tags/nodegroups.php
planetlab/tags/tag.php
planetlab/tags/tags.php

index 5ef4ec4..07edd3a 100644 (file)
@@ -283,6 +283,8 @@ $table->set_options(array('notes'=>array("The R column shows the call result val
                                         "Click the button in the D(etails) column to get more details")));
 $table->end();
   
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index 08cc193..6d86ca7 100644 (file)
@@ -72,6 +72,8 @@ $details->th_th(html_div($from_picker->html()) , html_div($until_picker->html())
 $details->end();
 $form->end();
 
+plc_tabs ($tabs,"bottom");
+
   // Print footer
 include 'plc_footer.php';
 
index db8301d..b6dbf36 100644 (file)
@@ -44,7 +44,9 @@ drupal_set_html_head('
 // (*) you need to tune the image size, which is wrong, as the image should rather be bottom-aligned 
 
 function plc_tabs ($array, $id=NULL) {
-  if (! $id) $id="minitabs";
+  // need id to pass to the onclick function attached to the input buttons
+  $id="minitabs";
+  if (! $id) $id .= '-' + $id;
   print "<div id='$id' class='minitabs'>";
   print "<ul>";
   foreach ($array as $label=>$todo) {
@@ -52,9 +54,8 @@ function plc_tabs ($array, $id=NULL) {
     if (is_string ($todo)) $todo=array('method'=>'GET','url'=>$todo);
     // the 'label' key, if set in the hash, supersedes key
     if ($todo['label']) $label=$todo['label'];
-    $tracer="class=minitabs";
-    if ($todo['id']) 
-      $tracer .= " id=".$todo['id'];
+    $tracer="";
+    if ($todo['id']) $tracer .= "id=".$todo['id'];
     print "<li $tracer>";
     // set default method
     if ( ! $todo['method'] ) $todo['method']='GET';
@@ -72,7 +73,7 @@ function plc_tabs ($array, $id=NULL) {
     if ( ! $values) $values = array();
     if ($url_values) $values = array_merge($values,$url_values);
     if ( $values ) foreach ($values as $key=>$value) {
-       print "<input class='minitabs-hidden' type=hidden name='$key' value='$value' />";
+       print "<input type=hidden name='$key' value='$value' />";
       }
     $tracer="class=minitabs-submit";
     // image and its companions 'height' 
index a1f9011..697a843 100644 (file)
@@ -189,6 +189,8 @@ if ($can_update) {
 $table->end();
 $form->end();
 
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index d58317a..63f345c 100644 (file)
@@ -379,6 +379,7 @@ $form->end();
 ////////////////////////////////////////////////////////////
 $peers->block_end($peer_id);
 
+plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index 8541c13..6d443a2 100644 (file)
@@ -169,6 +169,8 @@ foreach ($nodes as $node) {
 
 $table->end();
 
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index e43ed4a..9dab8c0 100644 (file)
@@ -57,6 +57,8 @@ $nb=sizeof($peer['slice_ids']);
 $details->th_td("Number of slices",href(l_slices_peer($peer_id),"$nb slices"));
 $details->end();
 
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index b22673c..a8a6f6a 100644 (file)
@@ -53,6 +53,8 @@ if ( empty($peers)) {
   $table->end();
  }
                    
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index b98f529..c3eea4b 100644 (file)
@@ -337,6 +337,8 @@ $table->end();
 $form->end();
 $peers->block_end($peer_id);
   
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index f5f5323..32c3816 100644 (file)
@@ -176,6 +176,8 @@ foreach ($persons as $person) {
 $notes=array("The S column shows the number of slices for the given user");
 $table->end(array('notes'=>$notes));
 
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index 2efd127..5bc3fe6 100644 (file)
@@ -100,7 +100,6 @@ $privileges = plc_is_admin () || ( plc_in_site($site_id) && plc_is_pi());
   
 $tabs=array();
 
-$tabs []= tab_sites();
 $tabs []= tab_sites_local();
 
 // available actions
@@ -238,6 +237,8 @@ $details->end();
 ////////////////////////////////////////
 $peers->block_end($peer_id);
 
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index 227bec1..afed00d 100644 (file)
@@ -142,6 +142,8 @@ $notes=array("N = number of sites / U = number of users / S = number of slices")
 
 $table->end(array('notes'=>$notes));
 
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index ac7ec61..caa62b6 100644 (file)
@@ -73,6 +73,9 @@ if ($nodes) foreach ($nodes as $node) {
 }
 
 $table->end ();
+
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index 2242544..afaf501 100644 (file)
@@ -76,6 +76,8 @@ foreach ($nodegroups as $nodegroup) {
 
 $table->end();
 
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index 771117e..b3d30a6 100644 (file)
@@ -135,6 +135,8 @@ if (count ($slice_tags)) {
   $table->end();
  }
 
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';
 
index 3583abd..6f394ea 100644 (file)
@@ -106,6 +106,8 @@ if (plc_is_admin()) {
 $table->end();
 $form->end();
 
+plc_tabs ($tabs,"bottom");
+
 // Print footer
 include 'plc_footer.php';