Update to Drupal 8.0.2. For more information, see https://www.drupal.org/drupal-8.0.2-release-notes
This commit is contained in:
parent
1a0e9d9fac
commit
a6b049dd05
538 changed files with 5247 additions and 1594 deletions
|
|
@ -547,18 +547,18 @@ function template_preprocess_views_view_table(&$variables) {
|
|||
$column_reference['attributes'] = new Attribute($column_reference['attributes']);
|
||||
}
|
||||
|
||||
// Remove columns if the option is hide empty column is checked and the
|
||||
// field is not empty.
|
||||
// Remove columns if the "empty_column" option is checked and the
|
||||
// field is empty.
|
||||
if (!empty($options['info'][$field]['empty_column'])) {
|
||||
$empty = TRUE;
|
||||
foreach ($variables['rows'] as $columns) {
|
||||
$empty &= empty($columns[$column]);
|
||||
$empty &= empty($columns['columns'][$column]['content']);
|
||||
}
|
||||
if ($empty) {
|
||||
foreach ($variables['rows'] as &$column_items) {
|
||||
unset($column_items[$column]);
|
||||
unset($variables['header'][$column]);
|
||||
unset($column_items['columns'][$column]);
|
||||
}
|
||||
unset($variables['header'][$column]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -598,6 +598,10 @@ function template_preprocess_views_view_table(&$variables) {
|
|||
$variables['caption'] = ['#markup' => $handler->options['caption']];
|
||||
$variables['caption_needed'] = TRUE;
|
||||
}
|
||||
elseif (!empty($variables['title'])) {
|
||||
$variables['caption'] = ['#markup' => $variables['title']];
|
||||
$variables['caption_needed'] = TRUE;
|
||||
}
|
||||
else {
|
||||
$variables['caption'] = '';
|
||||
$variables['caption_needed'] = FALSE;
|
||||
|
|
|
|||
Reference in a new issue