commit 5518e18c530181191a32b714056352ec834a95fe Author: Joel Pittet Date: Tue May 7 17:49:46 2013 -0700 only the tpl conversion diff --git a/core/modules/views/templates/views-view-grouping.html.twig b/core/modules/views/templates/views-view-grouping.html.twig index 0f05da1..ad80090 100644 --- a/core/modules/views/templates/views-view-grouping.html.twig +++ b/core/modules/views/templates/views-view-grouping.html.twig @@ -1,28 +1,24 @@ {# /** * @file - * Default theme implementation to print a single grouping in a view. + * Default theme implementation to display a single views grouping. * - * It is not actually used in default Views, as this is registered as a theme - * function which has better performance. For single overrides, the template is - * perfectly okay. - * - * Variables available: - * - view: The view object + * Available variables: + * - view: The View object. * - grouping: The grouping instruction. * - grouping_level: Integer indicating the hierarchical level of the grouping. - * - rows: The rows contained in this grouping. - * - title: The title of this grouping. - * - content: The processed content output that will normally be used. + * - title: The group heading. + * - content: The content to be grouped. This is set via aggregation settings + * on the view. + * - rows: The rows returned from the view. * * @see template_preprocess() + * @see template_preprocess_views_view_grouping() * * @ingroup themeable */ #}
{{ title }}
-
- {{ content }} -
+
{{ content }}
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index d620493..476f6b0 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -296,18 +296,38 @@ function template_preprocess_views_view_fields(&$vars) { } /** - * Prepares variables for a single grouping within a view templates. + * Display a single views grouping. + */ +function theme_views_view_grouping($vars) { + $view = $vars['view']; + $title = $vars['title']; + $content = $vars['content']; + + $output = '
'; + $output .= '
' . $title . '
'; + $output .= '
' . $content . '
' ; + $output .= '
'; + + return $output; +} + +/** + * Prepares variables for views single grouping templates. * * Default template: views-view-grouping.html.twig. * * @param array $variables * An associative array containing: - * - view: @todo. - * - rows: @todo. - * - grouping_level: @todo. - */ -function template_preprocess_views_view_grouping(&$variables) { - $variables['content'] = $variables['view']->style_plugin->render_grouping_sets($variables['rows'], $variables['grouping_level']); + * - view: The view object. + * - rows: The rows returned from the view. + * - grouping_level: Integer indicating the hierarchical level of the + * grouping. + * - content: The content to be grouped. This is set via aggregation settings + * on the view. + * - title: The group heading. + */ +function template_preprocess_views_view_grouping(&$vars) { + $vars['content'] = $vars['view']->style_plugin->render_grouping_sets($vars['rows'], $vars['grouping_level']); } /**