Browse Source

changing to address needs in github ticket 91.

Shawna Spoor 7 years ago
parent
commit
47b3ed52b9

+ 14 - 20
tripal_ds/includes/tripal_ds.ds.inc

@@ -98,51 +98,48 @@ function _ds_layout_settings_info($bundle_name, $instances) {
       _summary_field_group_info($bundle_name, $summary_fields);
 
       // Add the fields to the regions.
-      array_unshift($summary_fields, 'group_summary_tripalpane', 'group_summary', 'group_summary_table');
-      $fields_with_regions += [ 'group_summary_tripalpane' =>'right', 'group_summary' => 'right', 'group_summary_table' => 'right' ];
+      array_unshift($summary_fields, 'group_summary_tripalpane',  'group_summary_table');
+      $fields_with_regions += [ 'group_summary_tripalpane' =>'right', 'group_summary_table' => 'right' ];
       $region_right = array_merge($summary_fields, $region_right);
 
     }
     if (!empty($prop_fields)){
       _prop_field_group_info($bundle_name, $prop_fields);
-      array_unshift($prop_fields, 'group_prop_tripalpane', 'group_prop', 'group_prop_table');
+      array_unshift($prop_fields, 'group_prop_tripalpane', 'group_prop_table');
 
       // Add the fields to the regions.
       $region_right = array_merge($region_right, $prop_fields);
-      $fields_with_regions += [ 'group_prop_tripalpane' => 'right', 'group_prop' => 'right', 'group_prop_table' => 'right' ];
+      $fields_with_regions += [ 'group_prop_tripalpane' => 'right', 'group_prop_table' => 'right' ];
     }
     if (!empty($data_sequence_fields)){
       _data_sequence_field_group_info($bundle_name, $data_sequence_fields);
-      array_unshift($data_sequence_fields, 'group_sequence_tripalpane', 'group_sequence', 'group_sequence_table');
+      array_unshift($data_sequence_fields, 'group_sequence_tripalpane', 'group_sequence_table');
 
       // Add the fields to the regions.
       $region_right = array_merge($region_right, $data_sequence_fields);
-      $fields_with_regions += [ 'group_sequence_tripalpane' => 'right', 'group_sequence' => 'right', 'group_sequence_table' => 'right' ];
+      $fields_with_regions += [ 'group_sequence_tripalpane' => 'right', 'group_sequence_table' => 'right' ];
     }
     if (!empty($all_other_fields)){
       foreach ($all_other_fields as $key => $other_field) {
         // Temporary field names.
         $temporary_field = array();
         $group_field_name = 'gp_'.$other_field['field_name'];
-        $fieldset_field_name = 'ft_'.$other_field['field_name'];
 
         // Need to truncate the names because of database field size restrictions,
         // updating fields here to ensure name consistency.
         $group_field_name = substr($group_field_name, 0, 27);
-        $fieldset_field_name = substr($fieldset_field_name, 0, 27);
 
         // Add random numbers to ensure the field name is unique within the 32
         // character limit of the field.
         $group_field_name = $group_field_name.rand(0, 99999);
-        $fieldset_field_name = $fieldset_field_name.rand(0, 99999);
 
         // Build the field group.
-        _additional_fields_field_group_info($bundle_name, $other_field['label'], $group_field_name, $fieldset_field_name, $other_field['field_name']);
+        _additional_fields_field_group_info($bundle_name, $other_field['label'], $group_field_name, $other_field['field_name']);
 
         // Update arrays.
-        array_push($temporary_field, $group_field_name, $fieldset_field_name, $other_field['field_name']);
+        array_push($temporary_field, $group_field_name, $other_field['field_name']);
         $region_right = array_merge($region_right, $temporary_field);
-        $fields_with_regions += [ $group_field_name => 'right', $fieldset_field_name => 'right' ];
+        $fields_with_regions += [ $group_field_name => 'right',];
       }
     }
 
@@ -233,33 +230,30 @@ function _ds_layout_pub_settings_info($bundle_name, $instances) {
       // Temporary field names.
       $temporary_field = array();
       $group_field_name = 'gp_'.$other_field['field_name'];
-      $fieldset_field_name = 'ft_'.$other_field['field_name'];
 
       // Need to truncate the names because of database field size restrictions,
       // updating fields here to ensure name consistency.
       $group_field_name = substr($group_field_name, 0, 27);
-      $fieldset_field_name = substr($fieldset_field_name, 0, 27);
 
       // Add randomm numbers to ensure the field name is unique within the 32
       // character limit of the field.
       $group_field_name = $group_field_name.rand(0, 99999);
-      $fieldset_field_name = $fieldset_field_name.rand(0, 99999);
 
       // Build the field group.
-      _additional_fields_field_group_info($bundle_name, $other_field['label'], $group_field_name, $fieldset_field_name, $other_field['field_name']);
+      _additional_fields_field_group_info($bundle_name, $other_field['label'], $other_field['field_name']);
 
       // Update arrays.
-      array_push($temporary_field, $group_field_name, $fieldset_field_name, $other_field['field_name']);
+      array_push($temporary_field, $group_field_name, $other_field['field_name']);
       $region_right = array_merge($region_right, $temporary_field);
-      $all_fields += [ $group_field_name => 'right', $fieldset_field_name => 'right' ];
+      $all_fields += [ $group_field_name => 'right', ];
     }
 
     //Properties table fields.
     if(!empty($properties)){
       _publication_prop_field_group_info($bundle_name, $properties);
-      array_unshift($properties, 'group_prop_tripalpane', 'group_prop', 'group_prop_table');
+      array_unshift($properties, 'group_prop_tripalpane', 'group_prop_table');
       $region_right = array_merge($region_right, $properties);
-      $all_fields+= [ 'group_prop_tripalpane' => 'right', 'group_prop' => 'right', 'group_prop_table' => 'right' ];
+      $all_fields+= [ 'group_prop_tripalpane' => 'right', 'group_prop_table' => 'right' ];
     }
 
     // Add blocks to $region_left and build the toc field that is placed within.

+ 6 - 1
tripal_ds/includes/tripal_ds.field_formatter.inc

@@ -50,9 +50,14 @@ function tripal_ds_field_group_format_settings($group) {
  */
 function tripal_ds_field_group_pre_render(&$element, $group, &$form) {
   $group_name = $group->group_name;
+  //watchdog('debug', '<pre>$group->description: '. print_r($group->description, TRUE) .'</pre>');
+  watchdog('debug', '<pre>$$group->format_settings: '. print_r($group->format_settings['instance_settings'], TRUE) .'</pre>');
   switch ($group->format_type) {
     case 'tripalpane':
-      $element['#prefix'] = '<div class="tripal_pane-fieldset-'.$group_name.' '.$group_name.'">';
+      $element['#prefix'] = '<div class="tripal_pane-fieldset-'.$group_name.' '.$group_name.' tripal_pane"> <span class="field-group-format-title">' . check_plain(t($group->label)) . '</span>';
+      if (!empty($group->description)) {
+        $element['#prefix'] .= '<div class="description">' . $group->description . '</div>';
+      }
       $element['#suffix'] = '</div>';
       break;
   }

+ 23 - 175
tripal_ds/includes/tripal_ds.field_group.inc

@@ -16,14 +16,14 @@ function _summary_field_group_info($bundle_name, $fields){
   $field_group_tripalpane->mode = 'default';
   $field_group_tripalpane->parent_name = '';
   $field_group_tripalpane->data = array(
-    'label' => 'Tripal Pane Summary',
+    'label' => 'Summary',
     'weight' => '1',
     'children' => array(
-      0 => 'group_summary',
+      0 => 'group_summary_table',
     ),
     'format_type' => 'tripalpane',
     'format_settings' => array(
-      'label' => 'Tripal Pane Summary',
+      'label' => 'Summary',
       'instance_settings' => array(
         'id' => 'tripal_ds-fieldset-group_summary_tripalpane',
         'classes' => 'group-summary-tripalpane field-group-tripalpane',
@@ -37,36 +37,6 @@ function _summary_field_group_info($bundle_name, $fields){
   tripal_ds_bundle_menu_item($bundle_name, 'Summary', 'group_summary_tripalpane', 'TripalEntity');
 
 
-  //Fieldset field to nest the table within.
-  $field_group_fieldset = new stdClass();
-  $field_group_fieldset->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially*/
-  $field_group_fieldset->api_version = 1;
-  $field_group_fieldset->identifier = 'group_summary|TripalEntity|'.$bundle_name.'|default';
-  $field_group_fieldset->group_name = 'group_summary';
-  $field_group_fieldset->entity_type = 'TripalEntity';
-  $field_group_fieldset->bundle = $bundle_name;
-  $field_group_fieldset->mode = 'default';
-  $field_group_fieldset->parent_name = 'group_summary_tripalpane';
-  $field_group_fieldset->data = array(
-    'label' => 'Summary',
-    'weight' => '5',
-    'children' => array(
-      0 => 'group_summary_table',
-    ),
-    'format_type' => 'fieldset',
-    'format_settings' => array(
-      'label' => 'Summary',
-      'instance_settings' => array(
-        'id' => '',
-        'classes' => 'group-summary field-group-fieldset',
-        'description' => '',
-      ),
-      'formatter' => 'collapsible',
-    ),
-  );
-
-  drupal_write_record('field_group', $field_group_fieldset);
-
   //Table of fields.
   $field_group = new stdClass();
   $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially*/
@@ -76,7 +46,7 @@ function _summary_field_group_info($bundle_name, $fields){
   $field_group->entity_type = 'TripalEntity';
   $field_group->bundle = $bundle_name;
   $field_group->mode = 'default';
-  $field_group->parent_name = 'group_summary';
+  $field_group->parent_name = 'group_summary_tripalpane';
   $field_group->data = array(
     'label' => 'Summary Table',
     'weight' => '30',
@@ -117,17 +87,17 @@ function _prop_field_group_info($bundle_name, $fields){
   $field_group_tripalpane->mode = 'default';
   $field_group_tripalpane->parent_name = '';
   $field_group_tripalpane->data = array(
-    'label' => 'Properties Tripal Pane',
+    'label' => 'Properties',
     'weight' => '2',
     'children' => array(
-        0 => 'group_prop',
+        0 => 'group_prop_table',
     ),
     'format_type' => 'tripalpane',
     'format_settings' => array(
-      'label' => 'Tripal Pane Properties',
+      'label' => 'Properties',
       'instance_settings' => array(
         'id' => 'tripal_ds-fieldset-group_prop_tripalpane',
-        'classes' => 'group-prop-tripalpane field-group-tripalpane',
+        'classes' => 'group-prop-tripalpane field-group-tripalpane hideTripalPane',
         'description' => '',
       ),
     ),
@@ -138,36 +108,6 @@ function _prop_field_group_info($bundle_name, $fields){
   tripal_ds_bundle_menu_item($bundle_name, 'Properties', 'group_prop_tripalpane', 'TripalEntity');
 
 
-  //Fieldset field to nest the table within.
-  $field_group_fieldset = new stdClass();
-  $field_group_fieldset->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially*/
-  $field_group_fieldset->api_version = 1;
-  $field_group_fieldset->identifier = 'group_prop|TripalEntity|'.$bundle_name.'|default';
-  $field_group_fieldset->group_name = 'group_prop';
-  $field_group_fieldset->entity_type = 'TripalEntity';
-  $field_group_fieldset->bundle = $bundle_name;
-  $field_group_fieldset->mode = 'default';
-  $field_group_fieldset->parent_name = 'group_prop_tripalpane';
-  $field_group_fieldset->data = array(
-    'label' => 'Properties',
-    'weight' => '3',
-    'children' => array(
-      0 => 'group_prop_table',
-    ),
-    'format_type' => 'fieldset',
-    'format_settings' => array(
-      'label' => 'Properties',
-      'instance_settings' => array(
-        'id' => '',
-        'classes' => 'group-prop field-group-fieldset',
-        'description' => '',
-        ),
-      'formatter' => 'collapsible',
-    ),
-  );
-
-  drupal_write_record('field_group', $field_group_fieldset);
-
   //Table of fields.
   $field_group = new stdClass();
   $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially*/
@@ -177,7 +117,7 @@ function _prop_field_group_info($bundle_name, $fields){
   $field_group->entity_type = 'TripalEntity';
   $field_group->bundle = $bundle_name;
   $field_group->mode = 'default';
-  $field_group->parent_name = 'group_prop';
+  $field_group->parent_name = 'group_prop_tripalpane';
   $field_group->data = array(
     'label' => 'Properties Table',
     'weight' => '30',
@@ -216,17 +156,17 @@ function _data_sequence_field_group_info($bundle_name, $fields){
   $field_group_tripalpane->mode = 'default';
   $field_group_tripalpane->parent_name = '';
   $field_group_tripalpane->data = array(
-    'label' => 'Tripal Pane Data Sequences',
+    'label' => 'Data Sequences',
     'weight' => '2',
     'children' => array(
-        0 => 'group_sequence',
+        0 => 'group_sequence_table',
     ),
     'format_type' => 'tripalpane',
     'format_settings' => array(
-      'label' => 'Tripal Pane Data Sequences',
+      'label' => 'Data Sequences',
       'instance_settings' => array(
         'id' => 'tripal_ds-fieldset-group_sequence_tripalpane',
-        'classes' => 'group-sequence-tripalpane field-group-tripalpane',
+        'classes' => 'group-sequence-tripalpane field-group-tripalpane hideTripalPane',
         'description' => '',
       ),
     ),
@@ -236,36 +176,6 @@ function _data_sequence_field_group_info($bundle_name, $fields){
   //Write to the tripal_ds table to record the new tripal pane.
   tripal_ds_bundle_menu_item($bundle_name, 'Sequence', 'group_sequence_tripalpane', 'TripalEntity');
 
-  //Fieldset field to nest the table within.
-  $field_group_fieldset = new stdClass();
-  $field_group_fieldset->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially*/
-  $field_group_fieldset->api_version = 1;
-  $field_group_fieldset->identifier = 'group_sequence|TripalEntity|'.$bundle_name.'|default';
-  $field_group_fieldset->group_name = 'group_sequence';
-  $field_group_fieldset->entity_type = 'TripalEntity';
-  $field_group_fieldset->bundle = $bundle_name;
-  $field_group_fieldset->mode = 'default';
-  $field_group_fieldset->parent_name = 'group_sequence_tripalpane';
-  $field_group_fieldset->data = array(
-    'label' => 'Sequence',
-    'weight' => '3',
-    'children' => array(
-      0 => 'group_sequence_table',
-    ),
-    'format_type' => 'fieldset',
-    'format_settings' => array(
-      'label' => 'Data Sequences',
-      'instance_settings' => array(
-        'id' => '',
-        'classes' => 'group-sequence field-group-fieldset',
-        'description' => '',
-      ),
-      'formatter' => 'collapsible',
-    ),
-  );
-
-  drupal_write_record('field_group', $field_group_fieldset);
-
   //Table of fields.
   $field_group = new stdClass();
   $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially*/
@@ -275,7 +185,7 @@ function _data_sequence_field_group_info($bundle_name, $fields){
   $field_group->entity_type = 'TripalEntity';
   $field_group->bundle = $bundle_name;
   $field_group->mode = 'default';
-  $field_group->parent_name = 'group_sequence';
+  $field_group->parent_name = 'group_sequence_tripalpane';
   $field_group->data = array(
     'label' => 'Data Sequences Table',
     'weight' => '30',
@@ -304,7 +214,7 @@ function _data_sequence_field_group_info($bundle_name, $fields){
 * Processes all additional fields into Tripal Panes
 */
 
-function _additional_fields_field_group_info($bundle_name, $field_label, $group_field_name, $fieldset_field_name, $field_name){
+function _additional_fields_field_group_info($bundle_name, $field_label, $group_field_name, $field_name){
   //Write to the tripal_ds table to record the new tripal pane.
   tripal_ds_bundle_menu_item($bundle_name, $field_label, $group_field_name, 'TripalEntity');
 
@@ -319,61 +229,28 @@ function _additional_fields_field_group_info($bundle_name, $field_label, $group_
   $field_group_fieldset->mode = 'default';
   $field_group_fieldset->parent_name = '';
   $field_group_fieldset->data = array(
-    'label' => $field_label.' TripalPane',
+    'label' => $field_label,
     'weight' => '5',
     'children' => array(
-      0 => $fieldset_field_name,
+      0 => $field_name,
     ),
     'format_type' => 'tripalpane',
     'format_settings' => array(
-      'label' => $field_label.' TripalPane',
+      'label' => $field_label,
       'instance_settings' => array(
         'id' => 'tripal_ds-fieldset-'.$group_field_name,
-        'classes' => $group_field_name.' field-group-tripalpane',
+        'classes' => $group_field_name.' field-group-tripalpane hideTripalPane',
         'description' => '',
       ),
-      'formatter' => 'collapsible',
     ),
   );
 
   drupal_write_record('field_group', $field_group_fieldset);
 
-  //Fieldset to nest the field within the tripal pane.
-  $field_group = new stdClass();
-  $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially*/
-  $field_group->api_version = 1;
-  $field_group->identifier =  $fieldset_field_name.'|TripalEntity|'.$bundle_name.'|default';
-  $field_group->group_name =  $fieldset_field_name;
-  $field_group->entity_type = 'TripalEntity';
-  $field_group->bundle = $bundle_name;
-  $field_group->mode = 'default';
-  $field_group->parent_name =  $group_field_name;
-  $field_group->data = array(
-    'label' => $field_label,
-    'weight' => '30',
-    'children' => array(
-      0 =>$field_name,
-    ),
-    'format_type' => 'fieldset',
-    'format_settings' => array(
-      'label' => $field_label,
-      'instance_settings' => array(
-        'label_visibility' => '1',
-        'id' => '',
-        'classes' => $fieldset_field_name.' field-group-fieldset',
-        'description' => '',
-      ),
-      'formatter' => 'collapsible',
-    ),
-  );
-
-  drupal_write_record('field_group', $field_group);
-
 }
 /**
  * Implements hook_field_group_info().
  */
-
 function _publication_prop_field_group_info($bundle_name, $fields){
 
   //Tripal pane  to nest the fieldset within.
@@ -387,17 +264,17 @@ function _publication_prop_field_group_info($bundle_name, $fields){
   $field_group_tripalpane->mode = 'default';
   $field_group_tripalpane->parent_name = '';
   $field_group_tripalpane->data = array(
-    'label' => 'Properties Tripal Pane',
+    'label' => 'Properties',
     'weight' => '2',
     'children' => array(
       0 => 'group_prop',
     ),
     'format_type' => 'tripalpane',
     'format_settings' => array(
-      'label' => 'Tripal Pane Properties',
+      'label' => 'Properties',
       'instance_settings' => array(
         'id' => 'tripal_ds-fieldset-group_prop_tripalpane',
-        'classes' => 'group-prop-tripalpane field-group-tripalpane',
+        'classes' => 'group-prop-tripalpane field-group-tripalpane hideTripalPane',
         'description' => '',
       ),
     ),
@@ -407,35 +284,6 @@ function _publication_prop_field_group_info($bundle_name, $fields){
   //write to the tripal_ds table to record the new tripal pane.
   tripal_ds_bundle_menu_item($bundle_name, 'Properties', 'group_prop_tripalpane', 'TripalEntity');
 
-  //Fieldset field to nest the table within.
-  $field_group_fieldset = new stdClass();
-  $field_group_fieldset->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially*/
-  $field_group_fieldset->api_version = 1;
-  $field_group_fieldset->identifier = 'group_prop|TripalEntity|'.$bundle_name.'|default';
-  $field_group_fieldset->group_name = 'group_prop';
-  $field_group_fieldset->entity_type = 'TripalEntity';
-  $field_group_fieldset->bundle = $bundle_name;
-  $field_group_fieldset->mode = 'default';
-  $field_group_fieldset->parent_name = 'group_prop_tripalpane';
-  $field_group_fieldset->data = array(
-    'label' => 'Properties',
-    'weight' => '3',
-    'children' => array(
-      0 => 'group_prop_table',
-    ),
-    'format_type' => 'fieldset',
-    'format_settings' => array(
-      'label' => 'Properties',
-      'instance_settings' => array(
-        'id' => '',
-        'classes' => 'group-prop field-group-fieldset',
-        'description' => '',
-      ),
-      'formatter' => 'collapsible',
-    ),
-  );
-
-  drupal_write_record('field_group', $field_group_fieldset);
 
   //Table of fields.
   $field_group = new stdClass();
@@ -446,7 +294,7 @@ function _publication_prop_field_group_info($bundle_name, $fields){
   $field_group->entity_type = 'TripalEntity';
   $field_group->bundle = $bundle_name;
   $field_group->mode = 'default';
-  $field_group->parent_name = 'group_prop';
+  $field_group->parent_name = 'group_prop_tripalpane';
   $field_group->data = array(
     'label' => 'Properties Table',
     'weight' => '30',

+ 34 - 38
tripal_ds/theme/css/tripaldsfeature.css

@@ -20,42 +20,38 @@
 .showTripalPane {
 	display: inherit;
 }
-/*
-fieldset {
-	border: none!important;
-}
-
-th {
-	border-bottom: none;
-}
-
-.tripal-entity-unattached {
-    vertical-align: top;
-    border-top: 1px solid #CCCCCC;
-    font-size: 14px;
-}
-
-.tripal-entity-unattached .field-label {
-	font-weight: bold;
-	font-size: 16px;
-	padding: 10px 0;
-}
-.tripal-entity-unattached .field {
-	padding: 10px 0 0 20px;
-}
-
-.tripal-entity-unattached tr.odd {
-	border:	none;
-	background: none;
-	padding: 0;
-}
 
-.tripal-entity-unattached tbody {
-	border: none;
-}
-
-
-fieldset.collapsed {
-	height: 2em!important;
-}
-*/
+.tripal_pane {
+    background: #ffffff;
+    border: 1px solid #cccccc;
+    margin-top: 10px;
+    margin-bottom: 32px;
+    padding: 0 0 10px;
+    top: 12px;
+    -khtml-border-radius: 4px;
+    -moz-border-radius: 4px;
+    -webkit-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.tripal_pane span {
+    background: #dbdbdb;
+    border: 1px solid #ccc;
+    border-bottom: none;
+    color: #3b3b3b;
+    display: block;
+    font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif;
+    line-height: 2;
+    text-indent: 10px;
+    text-shadow: 0 1px 0 #fff;
+    top: -12px;
+    width: 100%;
+    -khtml-border-radius-topleft: 4px;
+    -moz-border-radius-topleft: 4px;
+    -webkit-border-top-left-radius: 4px;
+    border-top-left-radius: 4px;
+    -khtml-border-radius-topright: 4px;
+    -moz-border-radius-topright: 4px;
+    -webkit-border-top-right-radius: 4px;
+    border-top-right-radius: 4px;
+}

+ 3 - 3
tripal_ds/theme/js/tripal_ds.js

@@ -4,8 +4,8 @@
     attach: function (context, settings){
 
       // Add a close button for each pane except for the te_base
-      $('.field-group-fieldset .fieldset-legend').each(function (i) {
-        $(this).append('<div class="tripal_pane-fieldset-close_button"><div id="tripal-pane-close-button" class="tripal-pane-button">[x]</div></div>');
+      $('div.tripal_pane').each(function (i) {
+        $(this).prepend('<div class="tripal_pane-fieldset-close_button"><div id="tripal-pane-close-button" class="tripal-pane-button">[x]</div></div>');
         var id = '.tripal_pane-fieldset-' + $(this).attr('id');
       });
       // Hide the pane when the close button is clicked
@@ -14,7 +14,7 @@
         $(this).css('cursor', 'pointer');
         $(this).css('margin', '0px 5px');
         $(this).click(function () {
-          var fs = $(this).parents('.field-group-fieldset');
+          var fs = $(this).parents('div.tripal_pane');
           if($(fs).hasClass('showTripalPane'))  {
             $(fs).removeClass('showTripalPane');
             $(fs).addClass('hideTripalPane');

+ 29 - 3
tripal_ds/tripal_ds.module

@@ -104,10 +104,10 @@ function tripal_ds_ds_field_settings_alter(&$field_settings, $form, $form_state)
     }
   }
 
-  // Now grab the labels of the field_groups whose parent is a tripalpane.
+  // Now grab the labels of the tripalpane.
   foreach($updated_field_groups as $updated_field_group){
     foreach($tripal_pane_field_groups as $tripal_pane_field_group){
-      if($updated_field_group->parent_name == $tripal_pane_field_group){
+      if($updated_field_group->group_name == $tripal_pane_field_group){
         if($fields[$tripal_pane_field_group]['region'] !== 'hidden'){
           tripal_ds_bundle_menu_item($bundle_id, $updated_field_group->label, $tripal_pane_field_group, 'tripalentity');
         }
@@ -115,7 +115,33 @@ function tripal_ds_ds_field_settings_alter(&$field_settings, $form, $form_state)
     }
   }
 }
-
+/**
+ * Implements hook_field_group_pre_render().
+ *
+ * This function gives you the oppertunity to create the given
+ * wrapper element that can contain the fields.
+ * In the example beneath, some variables are prepared and used when building the
+ * actual wrapper element. All elements in drupal fapi can be used.
+ *
+ * Note that at this point, the field group has no notion of the fields in it.
+ *
+ * There is also an alternative way of handling this. The default implementation
+ * within field_group calls "field_group_pre_render_<format_type>".
+ * @see field_group_pre_render_fieldset.
+ *
+ * @param Array $elements by address.
+ * @param Object $group The Field group info.
+
+function tripal_ds_field_group_pre_render(& $element, $group, & $form) {
+  watchdog('debug', '<pre>tripal_ds_preprocess_TripalEntity  $group: '. print_r($group, TRUE) .'</pre>');
+  if ($group->format_settings['formatter'] != 'open') {
+    $add['#prefix'] = '<div class="field-group-format ' . $classes . '">
+      <span class="field-group-format-toggler">' . check_plain(t($group->label)) . '</span>
+      <div class="field-group-format-wrapper" style="display: none;">';
+    $add['#suffix'] = '</div></div>';
+  }
+}
+ */
 /**
  * Trigger the update to the tripal_ds table when a tripal pane is deleted.
  */