Display message in place of table if no assets match filter criteria.

This commit is contained in:
paul121 2020-07-16 13:07:06 -07:00 committed by Michael Stenta
parent 6b52f0f771
commit a0c9a7ecbc
1 changed files with 6 additions and 2 deletions

View File

@ -593,8 +593,12 @@ function farm_livestock_weight_group_report(&$form_state) {
$csvdata .= implode(',', $row) . PHP_EOL;
}
// Create HTML Table
$table = theme('table', array('header' => $header, 'rows' => $table_data));
$table = '<div class="alert alert-danger">' . t('No animal assets match the above criteria.') . '</div>';
if (!empty($table_data)) {
// Create HTML Table
$table = theme('table', array('header' => $header, 'rows' => $table_data));
}
// Create the div to hold report graphs.
$graph_markup = array();