summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2010-06-16 19:18:24 (GMT)
committer Earl Miles2010-06-16 19:18:24 (GMT)
commit034403fe3a440098596532a968e9ed1c8b749e28 (patch)
tree84167934aa0003ac9019c52af1fba1dd4c2024b0
parent3d745067783bbcb83397733b61ede2e988a941d1 (diff)
#768162: Revert inadvertant change to grid style behavior.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--plugins/views_plugin_style_grid.inc8
-rw-r--r--theme/theme.inc4
3 files changed, 11 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 7485f00..1ca395e 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -8,6 +8,7 @@ Views 2.x-dev
o #781296 by dereine: Node: Type "link to its node" option broken.
o #769010 by andrea.gariboldi: Overuse of query substitutions fails on some databases.
o #607418: Fix queries broken with "ambiguous nid" due to uncommon relationships.
+ o #768162: Revert inadvertant change to grid style behavior.
Views 2.10 (Apr 08, 2010)
Bug fixes:
diff --git a/plugins/views_plugin_style_grid.inc b/plugins/views_plugin_style_grid.inc
index bd7277b..d04dd80 100644
--- a/plugins/views_plugin_style_grid.inc
+++ b/plugins/views_plugin_style_grid.inc
@@ -19,6 +19,7 @@ class views_plugin_style_grid extends views_plugin_style {
$options['columns'] = array('default' => '4');
$options['alignment'] = array('default' => 'horizontal');
+ $options['fill_single_line'] = array('default' => TRUE);
return $options;
}
@@ -40,6 +41,13 @@ class views_plugin_style_grid extends views_plugin_style {
'#default_value' => $this->options['alignment'],
'#description' => t('Horizontal alignment will place items starting in the upper left and moving right. Vertical alignment will place items starting in the upper left and moving down.'),
);
+
+ $form['fill_single_line'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Fill up single line'),
+ '#description' => t('If you disable this option a grid with only one row will have the amount of items as tds. If you disable it this can cause problems with your css.'),
+ '#default_value' => !empty($this->options['fill_single_line']),
+ );
}
}
diff --git a/theme/theme.inc b/theme/theme.inc
index 429e1ea..d2b5aac 100644
--- a/theme/theme.inc
+++ b/theme/theme.inc
@@ -430,8 +430,8 @@ function template_preprocess_views_view_grid(&$vars) {
}
}
if ($row) {
- // Fill up the last line.
- if (count($rows)) {
+ // Fill up the last line only if it's configured, but this is default.
+ if (!empty($handler->options['fill_single_line']) || count($rows)) {
for ($i = 0; $i < ($columns - $row_count); $i++) {
$row[] = '';
}