$panel) { $panel_fields = $fields[$panel_id]; $collapsible_item = array('element' => array()); // If the format is horizontal table then format the fields in tabular format. if ($horz_table) { $rows = array(); foreach ($panel_fields as $field) { $rows[] = array( array( 'data' => $field['#title'], 'header' => TRUE, 'width' => '20%', ), $field[0]['#markup'] ); } $collapsible_item['element']['#description'] = theme_table(array( 'header' => array(), 'rows' => $rows, 'attributes' => array( 'id' => '', // TODO: need to add an ID 'class' => 'tripal-data-table' ), 'sticky' => FALSE, 'caption' => '', 'colgroups' => array(), 'empty' => '', )); } // If no format is provided then use the default Drupal render. else { $collapsible_item['element']['#description'] = render($panel_fields); } // If this is not the base content then the field should be collapsible. if ($panel->name != 'te_base') { $collapsible_item['element']['#title'] = $panel->label; $collapsible_item['element']['#children'] = ''; $collapsible_item['element']['#attributes']['class'][] = 'collapsible'; $collapsible_item['element']['#attributes']['class'][] = 'collapsed'; $toc_item_id = $panel_id; $toc .= "
name . "\" class=\"tripal_toc_list_item_link\" href=\"?pane=" . $panel->name . "\">" . $panel->label . "
"; $content .= theme('fieldset', $collapsible_item); } // The base field should just be the fields else { $content .= render($panel_fields); } } $bundle_type = ''; // TODO: need to add the bundle type ?>