Mercurial > hg > isophonics-drupal-site
annotate core/modules/comment/templates/field--comment.html.twig @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 {# |
Chris@0 | 2 /** |
Chris@0 | 3 * @file |
Chris@0 | 4 * Default theme override for comment fields. |
Chris@0 | 5 * |
Chris@0 | 6 * Available variables: |
Chris@0 | 7 * - attributes: HTML attributes for the containing element. |
Chris@0 | 8 * - label_hidden: Whether to show the field label or not. |
Chris@0 | 9 * - title_attributes: HTML attributes for the title. |
Chris@0 | 10 * - label: The label for the field. |
Chris@0 | 11 * - title_prefix: Additional output populated by modules, intended to be |
Chris@0 | 12 * displayed in front of the main title tag that appears in the template. |
Chris@0 | 13 * - title_suffix: Additional title output populated by modules, intended to |
Chris@0 | 14 * be displayed after the main title tag that appears in the template. |
Chris@0 | 15 * - comments: List of comments rendered through comment.html.twig. |
Chris@0 | 16 * - content_attributes: HTML attributes for the form title. |
Chris@0 | 17 * - comment_form: The 'Add new comment' form. |
Chris@0 | 18 * - comment_display_mode: Is the comments are threaded. |
Chris@0 | 19 * - comment_type: The comment type bundle ID for the comment field. |
Chris@0 | 20 * - entity_type: The entity type to which the field belongs. |
Chris@0 | 21 * - field_name: The name of the field. |
Chris@0 | 22 * - field_type: The type of the field. |
Chris@0 | 23 * - label_display: The display settings for the label. |
Chris@0 | 24 * |
Chris@0 | 25 * @see template_preprocess_field() |
Chris@0 | 26 * @see comment_preprocess_field() |
Chris@0 | 27 */ |
Chris@0 | 28 #} |
Chris@0 | 29 <section{{ attributes }}> |
Chris@0 | 30 {% if comments and not label_hidden %} |
Chris@0 | 31 {{ title_prefix }} |
Chris@0 | 32 <h2{{ title_attributes }}>{{ label }}</h2> |
Chris@0 | 33 {{ title_suffix }} |
Chris@0 | 34 {% endif %} |
Chris@0 | 35 |
Chris@0 | 36 {{ comments }} |
Chris@0 | 37 |
Chris@0 | 38 {% if comment_form %} |
Chris@0 | 39 <h2{{ content_attributes }}>{{ 'Add new comment'|t }}</h2> |
Chris@0 | 40 {{ comment_form }} |
Chris@0 | 41 {% endif %} |
Chris@0 | 42 |
Chris@0 | 43 </section> |