togglable sections everywhere
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 18 Feb 2009 22:05:34 +0000 (22:05 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 18 Feb 2009 22:05:34 +0000 (22:05 +0000)
20 files changed:
planetlab/css/plc_style.css
planetlab/events/events.php
planetlab/events/events_choser.php
planetlab/includes/plc_forms.php
planetlab/includes/plc_functions.php
planetlab/includes/plc_minitabs.php
planetlab/includes/plc_toggles.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 26c2b67..5d3e791 100644 (file)
@@ -24,14 +24,6 @@ body {
     position: relative;
 }
 
-h2.plc { 
-    text-align: center;
-}
-
-/* tmp - for visual checking */
-/*.plc-local {
-    border: 1px solid #00f; */
-}
 .plc-foreign {
     background:  #e0e0e0;
 }
index 07edd3a..685370a 100644 (file)
@@ -283,7 +283,7 @@ $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");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index 6d86ca7..8d1d272 100644 (file)
@@ -72,7 +72,7 @@ $details->th_th(html_div($from_picker->html()) , html_div($until_picker->html())
 $details->end();
 $form->end();
 
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
   // Print footer
 include 'plc_footer.php';
index 748465e..d054097 100644 (file)
@@ -20,7 +20,7 @@ class PlcForm {
     // and add them to the 'values' argument if any
 
     // extract var=value settings from url if any
-    $split=split_url($full_url);
+    $split=plkit_split_url($full_url);
     $this->url=$split['url'];
     
     $url_values=$split['values'];
index ad41d99..636da7a 100644 (file)
@@ -9,6 +9,24 @@
 function my_is_int ($x) {
     return (is_numeric($x) ? intval($x) == $x : false);
 }
+
+//// belongs to plkit
+// returns array ['url' => path, 'values' => hash (key=>value)* ]
+function plkit_split_url ($full_url) {
+  list($url,$args) = explode("?",$full_url);
+  $values=array();
+  if ($args) {
+    $pairs=explode("&",$args);
+    foreach ($pairs as $pair) {
+      list ($name,$value) = explode("=",$pair);
+      $values[$name]=$value;
+    }
+  }
+  return array("url"=>$url,"values"=>$values);
+}
+
+
+
 //////////////////////////////////////////////////////////// roles & other checks on global $plc
 function plc_is_admin () {
   global $plc;
@@ -86,6 +104,7 @@ function l_persons_peer ($peer_id)   { return "/db/persons/index.php?peerscope=$pe
 function l_person ($person_id)         { return "/db/persons/index.php?id=$person_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_person_obj ($person)                { return l_person_t($person['person_id'],$person['email']); }
 
 function l_tags ()                     { return "/db/tags/index.php"; }
 function l_tag ($tag_type_id)          { return "/db/tags/index.php?id=$tag_type_id"; }
@@ -161,20 +180,6 @@ function tablook_comon()   { return array('image'=>'/planetlab/icons/comon.png','h
 
 ////////////////////
 
-// returns array ['url' => path, 'values' => hash (key=>value)* ]
-function split_url ($full_url) {
-  list($url,$args) = explode("?",$full_url);
-  $values=array();
-  if ($args) {
-    $pairs=explode("&",$args);
-    foreach ($pairs as $pair) {
-      list ($name,$value) = explode("=",$pair);
-      $values[$name]=$value;
-    }
-  }
-  return array("url"=>$url,"values"=>$values);
-}
-
 //////////////////////////////////////////////////////////// validation functions
 function topdomain ($hostname) {
   $exploded=array_reverse(explode(".",$hostname));
@@ -265,7 +270,6 @@ function plc_role_global_hash ($api) {
   }
   return $hash;
 }
-  
 
 //////////////////////////////////////////////////////////// nodegroups
 // hash by 'tagname=value'
@@ -302,11 +306,6 @@ function plc_vertical_table ($messages, $class="") {
   return $formatted;
 }
 
-function plc_section ($text,$line=true) {
-  if ($line) { print "<hr/>";}
-  print "<h2 class=plc> $text </h2>\n";
-}
-
 function plc_error ($text) {
   // should use the same channel as the php errors..
   print "<div class='plc-error'> Error " . $text . "</div>";
index d5617eb..20a9efa 100644 (file)
@@ -62,7 +62,7 @@ function plc_tabs ($array, $id=NULL) {
     if ( ! $todo['method'] ) $todo['method']='GET';
     // extract var=value settings from url if any
     $full_url=$todo['url'];
-    $split=split_url($full_url);
+    $split=plkit_split_url($full_url);
     $url=$split['url'];
     $url_values=$split['values'];
 
index cf247be..7700401 100644 (file)
@@ -80,9 +80,9 @@ class PlcToggle {
   function trigger ()          { print $this->trigger_html(); }
   function trigger_html () {
     $trigger_id=$this->id_name('trigger');
-    $tagname='span';
     if (array_key_exists ('trigger-tagname',$this->options)) $tagname=$this->options['trigger-tagname'];
     if (array_key_exists ('trigger-bubble',$this->options)) $bubble=$this->options['trigger-bubble'];
+    if (empty($tagname)) $tagname="span";
     
     $html="<$tagname";
     $html .= " id=$trigger_id";
index d199c0c..0822143 100644 (file)
@@ -12,7 +12,7 @@ require_once 'plc_functions.php';
 require_once 'plc_minitabs.php';
 require_once 'plc_details.php';
 require_once 'plc_tables.php';
-require_once 'prototype.php';
+require_once 'plc_toggles.php';
 
 require_once 'plc_drupal.php';
 include 'plc_header.php';
@@ -138,6 +138,9 @@ if ($mode == 'add') return;
 
 
 //////////////////////////////////////// tags
+$toggle=new PlcToggle ('tags','Tags',array('trigger-tagname'=>'h2'));
+$toggle->start();
+
 $form = new PlcForm (l_actions(),array('interface_id'=>$interface_id));
 $form->start();
 
@@ -145,7 +148,7 @@ $tags=$api->GetInterfaceTags (array('interface_id'=>$interface_id));
 function get_tagname ($tag) { return $tag['tagname'];}
 $tagnames = array_map ("get_tagname",$tags);
   
-plc_section("Tags");
+
 $headers=array("Name"=>"string",
               "Value"=>"string",
               );
@@ -188,8 +191,9 @@ if ($can_update) {
   
 $table->end();
 $form->end();
+$toggle->end();
 
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index 7129187..c6e26f0 100644 (file)
@@ -395,7 +395,7 @@ $form->end();
 ////////////////////////////////////////////////////////////
 $peers->block_end($peer_id);
 
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index 6d443a2..16f8ef6 100644 (file)
@@ -169,7 +169,7 @@ foreach ($nodes as $node) {
 
 $table->end();
 
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index 9dab8c0..c424d8f 100644 (file)
@@ -57,7 +57,7 @@ $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");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index a8a6f6a..7e346fb 100644 (file)
@@ -53,7 +53,7 @@ if ( empty($peers)) {
   $table->end();
  }
                    
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index 6bff3b0..fc20c1c 100644 (file)
@@ -20,6 +20,7 @@ require_once 'plc_minitabs.php';
 require_once 'plc_tables.php';
 require_once 'plc_details.php';
 require_once 'plc_forms.php';
+require_once 'plc_toggles.php';
 
 // -------------------- 
 // recognized URL arguments
@@ -159,7 +160,8 @@ $details->end();
 $details->form_end();
 
 //////////////////// slices
-plc_section('Slices');
+$toggle=new PlcToggle ('slices','Slices',array('trigger-tagname'=>'h2'));
+$toggle->start();
 
 if( ! $slices) {
   plc_warning ("User has no slice");
@@ -183,13 +185,15 @@ if( ! $slices) {
   }
   $table->end();
  }
+$toggle->end();
 
 // we don't set 'action', but use the submit button name instead
 $form=new PlcForm(l_actions(), array("person_id"=>$person_id));
 $form->start();
 
 //////////////////// keys
-plc_section ("Keys");
+$toggle=new PlcToggle ('keys',"Keys",array('trigger-tagname'=>'h2'));
+$toggle->start();
                
 $can_manage_keys = ( $local_peer && ( plc_is_admin() || $is_my_account) );
 if ( empty( $key_ids ) ) {
@@ -233,9 +237,11 @@ if ($can_manage_keys) {
 }
 
 $table->end();
+$toggle->end();
 
 //////////////////// sites
-plc_section('Sites');
+$toggle=new PlcToggle('sites','Sites',array('trigger-tagname'=>'h2'));
+$toggle->start();
   
 if (empty( $sites ) ) {
   plc_warning('This user is not affiliated with a site !!');
@@ -284,9 +290,12 @@ if ($can_manage_sites) {
   $table->row_end();
  }
 $table->end();
+$toggle->end();
 
 //////////////////// roles
-plc_section("Roles");
+$toggle=new PlcToggle ('roles','Roles',array('trigger-tagname'=>'h2'));
+$togle->start();
+
 if (! $roles) plc_warning ("This user has no role !");
 
 $can_manage_roles= ($local_peer && plc_is_admin());
@@ -332,12 +341,13 @@ if ($can_manage_roles) {
   $table->row_end();
  }
 $table->end();
+$toggle->end();
 
 //////////////////////////////
 $form->end();
 $peers->block_end($peer_id);
   
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index 32c3816..79366a8 100644 (file)
@@ -127,7 +127,7 @@ foreach ($sites as $site) {
 // --------------------
 drupal_set_title($title);
 
-plc_tabs($tabs);
+//plc_tabs($tabs);
 
 if ( ! $persons ) {
   drupal_set_message ('No account found');
@@ -176,7 +176,7 @@ 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");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index 5bc3fe6..7f75d79 100644 (file)
@@ -20,6 +20,7 @@ require_once 'plc_minitabs.php';
 require_once 'plc_tables.php';
 require_once 'plc_details.php';
 require_once 'plc_forms.php';
+require_once 'plc_toggles.php';
 
 // -------------------- 
 // recognized URL arguments
@@ -28,7 +29,7 @@ if ( ! $site_id ) { plc_error('Malformed URL - id not set'); return; }
 
 ////////////////////
 // Get all columns as we focus on only one entry
-$sites= $api->GetSites( array($site_id));
+$sites = $api->GetSites( array($site_id));
 
 if (empty($sites)) {
   drupal_set_message ("Site " . $site_id . " not found");
@@ -51,11 +52,11 @@ $enabled = $site['enabled'];
 // extra privileges to admins, and (pi||tech) on this site
 $privileges = plc_is_admin () || ( plc_in_site($site_id) && ( plc_is_pi() || plc_is_tech()));
   
-// get peer details
+// get peer 
 $peer_id= $site['peer_id'];
 $peers = new Peers ($api);
 
-$adress_ids= $site['address_ids'];
+$address_ids= $site['address_ids'];
 $pcu_ids= $site['pcu_ids'];
 $node_ids= $site['node_ids'];
 $person_ids= $site['person_ids'];
@@ -63,7 +64,7 @@ $slice_ids= $site['slice_ids'];
 
 $api->begin();
 // gets address info
-$api->GetAddresses( $adress_ids );
+$api->GetAddresses( $address_ids );
 
 // gets pcu info
 // GetPCUs is not accessible to the 'user' role
@@ -92,6 +93,8 @@ foreach( $persons as $person ) {
   
 }
 
+$has_disabled_persons = count ($disabled_persons) !=0;
+
 drupal_set_title("Details for site " . $sitename);
 $local_peer = ! $peer_id;
   
@@ -151,7 +154,7 @@ $details->start();
 $details->form_start(l_actions(),array('action'=>'update-site','site_id'=>$site_id));
 $details->th_td("Full name",$sitename,'name',array('width'=>50));
 $details->th_td("Abbreviated name",$abbreviated_name,'abbreviated_name',array('width'=>15));
-$details->th_td("URL",$site_url,'url',array('width'=>50));
+$details->th_td("URL",$site_url,'url',array('width'=>40));
 $details->th_td("Latitude",$site_lat,'latitude');
 $details->th_td("Longitude",$site_long,'longitude');
 
@@ -171,39 +174,90 @@ if ( ! $local_peer) {
   $details->space();
   $details->th_td("Peer",$peers->peer_link($peer_id));
  }
+$details->end();
 
+//////////////////// mode details - for local object
 if ( $local_peer ) {
 
-  // Nodes
-  $details->space();
+  //////////////////// nodes
+  // xxx missing : would need to add columns on attached PCU name and port if avail
   $nb_boot = 0;
   if ($nodes) foreach ($nodes as $node) if ($node['boot_state'] == 'boot') $nb_boot ++;
-  $node_label = $nb_boot . " boot / " .  count($nodes) . " total";
-  $details->th_td("# Nodes", href(l_nodes_site($site_id),$node_label));
-  function n_link ($n) { return l_node_t($n['node_id'],$n['hostname'] . " (" . $n['boot_state'] . ")");}
-  $nodes_label= plc_vertical_table(array_map ("n_link",$nodes));
-  $details->th_td ("Hostnames",$nodes_label);
-  $button=new PlcFormButton (l_node_add(),"add_node","Add node","POST");
-  $details->tr($button->html(),"right");
 
-  // Users
-  $details->space();
-  $user_label = count($person_ids) . " Total / " .
-    count ($pis) . " PIs / " .
-    count ($techs) . " Techs";
-  if ( (count ($pis) == 0) || (count ($techs) == 0) || (count($person_ids) >=50)) 
-    $user_label = plc_warning_html ($user_label);
-  $details->th_td ("# Users",href(l_persons_site($site_id),$user_label));
-  function p_link ($p) { return l_person_t($p['person_id'],$p['email']); }
-  // PIs
-  $details->th_td("PI's",plc_vertical_table (array_map ("p_link",$pis)));
-  // techs
-  $details->th_td("Techs's",plc_vertical_table (array_map ("p_link",$techs)));
-  if (count ($disabled_persons)) 
-    $details->th_td("Disabled",plc_vertical_table (array_map ("p_link",$disabled_persons)));
-
-  // Slices
-  $details->space();
+  $nodes_title = "# Nodes : ";
+  $nodes_title .= count($nodes) . " total";
+  $nodes_title .= " / " . $nb_boot . " boot";
+  if ($nb_boot < 2 ) 
+    $nodes_title = plc_warning_html ($nodes_title);
+  $nodes_title .= href(l_nodes_site($site_id)," (See as nodes)");
+
+  $toggle=new PlcToggle ('nodes',$nodes_title,array('trigger-tagname'=>'h2'));
+  $toggle->start();
+
+  $headers=array();
+  $headers['hostname']='string';
+  $headers['state']='string';
+
+  $table = new PlcTable ('nodes',$headers,'0',array('search_area'=>false,
+                                                   'notes_area'=>false,
+                                                   'pagesize_area'=>false));
+  $table->start();
+  foreach ($nodes as $node) {
+    $table->row_start();
+    $table->cell (l_node_obj($node));
+    $table->cell ($node['boot_state']);
+    $table->row_end();
+  }
+  $table->tfoot_start();
+  $table->row_start();
+  $button=new PlcFormButton (l_node_add(),"node_add","Add node","POST");
+  $table->cell($button->html(),$table->columns(),"right");
+  $table->row_end();
+  $table->end();
+  $toggle->end();
+    
+  //////////////////// Users
+  $persons_title = "# Users : ";
+  $persons_title .= count($person_ids) . " total";
+  $persons_title .= " / " . count ($pis) . " PIs";
+  $persons_title .= " / " . count ($techs) . " Techs";
+  if ($has_disabled_persons) 
+    $persons_title .= " / " . ($disabled_persons) . " Disabled";
+  if ( (count ($pis) == 0) || (count ($techs) == 0) || (count($person_ids) >= 30) || count($disabled_persons) != 0 ) 
+    $persons_title = plc_warning_html ($persons_title);
+  $persons_title .= href(l_persons_site($site_id)," (See as users)");
+
+  $toggle=new PlcToggle ('persons',$persons_title,array('trigger-tagname'=>'h2'));
+  $toggle->start();
+
+  $headers = array ();
+  $headers["email"]='string';
+  $headers["PI"]='string';
+  $headers['User']='string';
+  $headers["Tech"]='string';
+  if ($has_disabled_persons) $headers["Disabled"]='string';
+  $table=new PlcTable('persons',$headers,'1r-3r-0',array('search_area'=>false,
+                                                        'notes_area'=>false,
+                                                        'pagesize_area'=>false));
+  $table->start();
+  foreach ($persons as $person) {
+    $table->row_start();
+    $table->cell(l_person_obj($person));
+    $table->cell( in_array ('20',$person['role_ids']) ? "yes" : "no");
+    $table->cell( in_array ('30',$person['role_ids']) ? "yes" : "no");
+    $table->cell( in_array ('40',$person['role_ids']) ? "yes" : "no");
+    if ($has_disabled_persons) $table->cell( $person['enabled'] ? "no" : "yes");
+    $table->row_end();
+  }
+  $table->end();
+  $toggle->end();
+
+  //////////////////// Slices
+  // xxx to review after slices gets reworked
+  $toggle=new PlcToggle ('slices',"Slices",array('trigger-tagname'=>'h2'));
+  $toggle->start();
+  $details=new PlcDetails (false);
+  $details->start();
   // summary on slices
   $slice_label = count($slice_ids) . " running / " . $max_slices . " max";
   if (count($slice_ids) >= $max_slices) 
@@ -213,10 +267,18 @@ if ( $local_peer ) {
      $details->th_td($slice['instantiation'],l_slice_obj($slice));
   $button=new PlcFormButton (l_slice_add(),"slice_add","Add slice","POST");
   $details->tr($button->html(),"right");
+  $details->end();
+  $toggle->end();
 
   // Addresses
-  if ($addresses) {
-    $details->space();
+  $toggle=new PlcToggle ('addresses',"Addresses",array('trigger-tagname'=>'h2',
+                                                      'start-visible'=>false));
+  $toggle->start();
+  if ( ! $addresses) {
+    print "No known address for this site";
+  } else {
+    $details=new PlcDetails (false);
+    $details->start();
     $details->th_td("Addresses","");
     foreach ($addresses as $address) {
       $details->th_td(plc_vertical_table($address['address_types']),
@@ -228,16 +290,16 @@ if ( $local_peer ) {
                                                $address['postalcode'],
                                                $address['country'])));
     }
+    $details->end();
   }
+  $toggle->end();
 
  }
 
-$details->end();
-
 ////////////////////////////////////////
 $peers->block_end($peer_id);
 
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index afed00d..dbab8ba 100644 (file)
@@ -142,7 +142,7 @@ $notes=array("N = number of sites / U = number of users / S = number of slices")
 
 $table->end(array('notes'=>$notes));
 
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index caa62b6..08da358 100644 (file)
@@ -18,6 +18,7 @@ require_once 'plc_functions.php';
 require_once 'plc_minitabs.php';
 require_once 'plc_tables.php';
 require_once 'plc_details.php';
+require_once 'plc_toggles.php';
 
 // -------------------- 
 // recognized URL arguments
@@ -60,7 +61,8 @@ $details->th_td("# nodes",count($nodegroup['node_ids']));
 $details->end();
 
 // xxx : add & delete buttons would make sense here too
-plc_section("Nodes");
+$toggle=new PlcToggle('nodes',"Nodes",array('trigger-tagname'=>'h2'));
+$toggle=>start();
 
 $headers["Hostname"]="string";
 
@@ -73,8 +75,9 @@ if ($nodes) foreach ($nodes as $node) {
 }
 
 $table->end ();
+$toggle->end();
 
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index afaf501..23259a5 100644 (file)
@@ -76,7 +76,7 @@ foreach ($nodegroups as $nodegroup) {
 
 $table->end();
 
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index b3d30a6..da0a6c8 100644 (file)
@@ -19,6 +19,7 @@ require_once 'plc_minitabs.php';
 require_once 'plc_details.php';
 require_once 'plc_tables.php';
 require_once 'plc_forms.php';
+require_once 'plc_toggles.php';
 
 // -------------------- 
 // recognized URL arguments
@@ -89,7 +90,8 @@ $table_options=array('notes_area'=>false, 'pagesize_area'=>false, 'search_width'
 
 // xxx could outline values corresponding to a nodegroup
 if (count ($node_tags)) {
-  plc_section("Nodes");
+  $toggle=new PlcToggle('tag_nodes',"Nodes",array('trigger-tagname'=>'h2'));
+  $toggle->start();
   $table=new PlcTable ("tag_nodes",array("Hostname"=>"string","value"=>"string"),0,$table_options);
   $table->start();
   foreach ($node_tags as $node_tag) {
@@ -99,10 +101,12 @@ if (count ($node_tags)) {
     $table->row_end();
   }
   $table->end();
+  $toggle->end();
  }
 
 if (count ($interface_tags)) {
-  plc_section("Interfaces");
+  $toggle=new PlcToggle('tag_interfaces',"Interfaces",array('trigger-tagname'=>'h2'));
+  $toggle->start();
   $table=new PlcTable ("tag_interfaces",array("IP"=>"IPAddress","value"=>"string"),0,$table_options);
   $table->start();
   foreach ($interface_tags as $interface_tag) {
@@ -112,13 +116,15 @@ if (count ($interface_tags)) {
     $table->row_end();
   }
   $table->end();
+  $toggle->end();
  }
 
 // grouping both kinds of slice tags 
 // xxx don't show hostnames yet
 $slice_tags = array_merge ($slice_tags,$sliver_tags);
 if (count ($slice_tags)) {
-  plc_section("Slice and sliver tags");
+  $toggle=new PlcToggle('tag_slices',"Slice and sliver tags",array('trigger-tagname'=>'h2'));
+  $toggle->start();
   $table=new PlcTable ("tag_slices",array("Slice"=>"string","value"=>"string","Node id"=>"int"),0,$table_options);
   $table->start();
   foreach ($slice_tags as $slice_tag) {
@@ -133,9 +139,10 @@ if (count ($slice_tags)) {
     $table->row_end();
   }
   $table->end();
+  $toggle->end();
  }
 
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';
index 6f394ea..b210cb2 100644 (file)
@@ -50,6 +50,8 @@ $headers['Name']="string";
 $headers['Description']="string";
 $headers['Category']="string";
 $headers['Min role']="string";
+// xxx ref count would be helpful
+//if (plc_is_admin()) $headers['#']='int';
 $headers["Id"]="int";
 if (plc_is_admin()) $headers[plc_delete_icon()]="none";
 
@@ -72,6 +74,8 @@ foreach( $tag_types as $tag_type ) {
   $table->cell(wordwrap($tag_type['description'],$description_width,"<br/>"));
   $table->cell($tag_type['category']);
   $table->cell($role_name);
+  // ref count
+  //  if (plc_is_admin())     $table->cell('xxx');
   $table->cell($tag_type_id);
   if (plc_is_admin()) 
     $table->cell ($form->checkbox_html('tag_type_ids[]',$tag_type_id));
@@ -106,7 +110,7 @@ if (plc_is_admin()) {
 $table->end();
 $form->end();
 
-plc_tabs ($tabs,"bottom");
+//plc_tabs ($tabs,"bottom");
 
 // Print footer
 include 'plc_footer.php';