Mercurial > hg > cmmr2012-drupal-site
diff core/modules/views/templates/views-view-summary.html.twig @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/views/templates/views-view-summary.html.twig Thu Jul 05 14:24:15 2018 +0000 @@ -0,0 +1,31 @@ +{# +/** + * @file + * Default theme implementation to display a list of summary lines. + * + * Available variables: + * - rows: The rows contained in this view. + * Each row contains: + * - url: The summary link URL. + * - link: The summary link text. + * - count: The number of items under this grouping. + * - attributes: HTML attributes to apply to each row. + * - active: A flag indicating whtether the row is active. + * - options: Flags indicating how the summary should be displayed. + * This contains: + * - count: A flag indicating whether the count should be displayed. + * + * @see template_preprocess_views_view_summary() + * + * @ingroup themeable + */ +#} +<ul> + {% for row in rows %} + <li><a href="{{ row.url }}"{{ row.attributes.addClass(row.active ? 'is-active')|without('href') }}>{{ row.link }}</a> + {% if options.count %} + ({{ row.count }}) + {% endif %} + </li> + {% endfor %} +</ul>