annotate core/modules/system/templates/details.html.twig @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 {#
Chris@0 2 /**
Chris@0 3 * @file
Chris@0 4 * Default theme implementation for a details element.
Chris@0 5 *
Chris@0 6 * Available variables
Chris@0 7 * - attributes: A list of HTML attributes for the details element.
Chris@0 8 * - errors: (optional) Any errors for this details element, may not be set.
Chris@0 9 * - title: (optional) The title of the element, may not be set.
Chris@0 10 * - description: (optional) The description of the element, may not be set.
Chris@0 11 * - children: (optional) The children of the element, may not be set.
Chris@0 12 * - value: (optional) The value of the element, may not be set.
Chris@0 13 *
Chris@0 14 * @see template_preprocess_details()
Chris@0 15 *
Chris@0 16 * @ingroup themeable
Chris@0 17 */
Chris@0 18 #}
Chris@0 19 <details{{ attributes }}>
Chris@0 20 {%
Chris@0 21 set summary_classes = [
Chris@0 22 required ? 'js-form-required',
Chris@0 23 required ? 'form-required',
Chris@0 24 ]
Chris@0 25 %}
Chris@0 26 {%- if title -%}
Chris@0 27 <summary{{ summary_attributes.addClass(summary_classes) }}>{{ title }}</summary>
Chris@0 28 {%- endif -%}
Chris@0 29
Chris@0 30 {% if errors %}
Chris@0 31 <div>
Chris@0 32 {{ errors }}
Chris@0 33 </div>
Chris@0 34 {% endif %}
Chris@0 35
Chris@0 36 {{ description }}
Chris@0 37 {{ children }}
Chris@0 38 {{ value }}
Chris@0 39 </details>