Browse Source

fixing some errant code

Shawna 7 years ago
parent
commit
ed952a5b55

+ 3 - 4
tripal/includes/tripal.fields.inc

@@ -757,14 +757,13 @@ function tripal_field_formatter_settings_summary($field, $instance, $view_mode)
   $summary = '';
 
   $summary = t('Hide this field if empty.');
-
-  watchdog('debug', '<pre>$summary: '. print_r($summary, TRUE) .'</pre>');
   $formatter_class = $field['type'] . '_formatter';
   if (tripal_load_include_field_class($formatter_class)) {
     $formatter = new $formatter_class($field, $instance);
     $summary = $formatter->settingsSummary($view_mode);
-    watchdog('debug', '<pre>$summary insdie the if: '. print_r($summary, TRUE) .'</pre>');
-
+  }
+  if(!$summary){
+    $summary = t('Hide this field if empty.');
   }
   return $summary;
 }

+ 0 - 18
tripal_chado/tripal_chado.module

@@ -769,24 +769,6 @@ function tripal_chado_theme($existing, $type, $theme, $path) {
       $chado_table = $mapped_table->chado_table;
       $legacy_template = 'legacy_template--chado_' . $chado_table;
       if (key_exists($legacy_template, $enabled_templates) && $enabled_templates[$legacy_template]) {
-        //Find the row in the ds_layout_settings table associated with the
-        // bundle_id and delete it.
-        db_delete('ds_layout_settings')
-          ->condition('entity_type', 'TripalEntity')
-          ->condition('bundle', $bundle->name)
-          ->execute();
-
-        // Delete all custom field_sets and field_groups.
-        db_delete('tripal_ds')
-          ->condition('entity_type', 'TripalEntity')
-          ->condition('bundle', $bundle->name)
-          ->execute();
-
-        // Delete the entries from the tripal_ds table.
-        db_delete('field_group')
-          ->condition('bundle', $bundle->name)
-          ->execute();
-
         $themes['TripalEntity__' . $bundle->name] = array(
           'template' => 'node--chado-generic',
           'render element' => 'entity',

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

@@ -65,6 +65,7 @@ function tripal_ds_field_group_pre_render(&$element, $group, &$form) {
   switch ($group->format_type) {
     case 'tripalpane':
       $group_name = $group->group_name;
+      //Hide the tripal panes here if there are no children.
       $description = $group->format_settings['instance_settings']['description'];
       $hide = isset($group->format_settings['instance_settings']['hide']) ? $group->format_settings['instance_settings']['hide'] : 'none';
       $classes = $group->format_settings['instance_settings']['classes'];