commit 11fdb92ea43b88cfa6c3fa477d24dcb55ad2ea3e
Author: Patrick Plitzner
Date: Fri Jun 1 11:17:15 2018 +0200
Do not show specimen table if no data available
diff --git a/modules/cdm_dataportal/includes/pages.inc b/modules/cdm_dataportal/includes/pages.inc
index f3a82be2..f9a032d1 100644
--- a/modules/cdm_dataportal/includes/pages.inc
+++ b/modules/cdm_dataportal/includes/pages.inc
@@ -222,37 +222,37 @@ function cdm_dataportal_taxon_page_specimens($taxon) {
$rowcount++;
}
}
- }
-
- $tableId = "derivate_hierarchy_table";
- $derivateHierarchyTable = array(
- "#theme" => "table",
- "#weight" => 2,
- "#header" => array(
- array(
- 'data' => "",
- 'class' => array('expand_column')
- ),
- "Country", "Date", "Collector + collecting number", "Herbaria", "Type", "Scan", "Derivatives"),
- "#rows" => $rows,
- "#attributes" => array(
- "id" => $tableId,
- "border" => 2
- )
- );
- //add toggle functionality to derivate hierarchy table
- drupal_add_js_rowToggle("#".$tableId);
-
- $render_array['derivate_hierarchy_table'] = $derivateHierarchyTable;
- $render_array['pager'] = markup_to_render_array(
- theme('cdm_pager', array(
- 'pager' => $pagerFieldUnits,
- 'path' => $_REQUEST['q'],
- 'parameters' => $_REQUEST
- )),
- 10 // weight
- );
+ $tableId = "derivate_hierarchy_table";
+ $derivateHierarchyTable = array(
+ "#theme" => "table",
+ "#weight" => 2,
+ "#header" => array(
+ array(
+ 'data' => "",
+ 'class' => array('expand_column')
+ ),
+ "Country", "Date", "Collector + collecting number", "Herbaria", "Type", "Scan", "Derivatives"),
+ "#rows" => $rows,
+ "#attributes" => array(
+ "id" => $tableId,
+ "border" => 2
+ )
+ );
+
+ //add toggle functionality to derivate hierarchy table
+ drupal_add_js_rowToggle("#".$tableId);
+
+ $render_array['derivate_hierarchy_table'] = $derivateHierarchyTable;
+ $render_array['pager'] = markup_to_render_array(
+ theme('cdm_pager', array(
+ 'pager' => $pagerFieldUnits,
+ 'path' => $_REQUEST['q'],
+ 'parameters' => $_REQUEST
+ )),
+ 10 // weight
+ );
+ }
}
else{
//BOTTOM-UP-SPECIMEN-TABLE