Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
34
core/modules/system/templates/admin-block-content.html.twig
Normal file
34
core/modules/system/templates/admin-block-content.html.twig
Normal file
|
@ -0,0 +1,34 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for the content of an administrative block.
|
||||
*
|
||||
* Available variables:
|
||||
* - content: A list containing information about the block. Each element
|
||||
* of the array represents an administrative menu item, and must at least
|
||||
* contain the keys 'title', 'link_path', and 'localized_options', which are
|
||||
* passed to l(). A 'description' key may also be provided.
|
||||
* - attributes: HTML attributes to be added to the element.
|
||||
* - compact: Boolean indicating whether compact mode is turned on or not.
|
||||
*
|
||||
* @see template_preprocess_admin_block_content()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
'list-group',
|
||||
compact ? 'compact',
|
||||
]
|
||||
%}
|
||||
{% if content %}
|
||||
<dl{{ attributes.addClass(classes) }}>
|
||||
{% for item in content %}
|
||||
<dt class="list-group__link">{{ item.link }}</dt>
|
||||
{% if item.description %}
|
||||
<dd class="list-group__description">{{ item.description }}</dd>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endif %}
|
26
core/modules/system/templates/admin-block.html.twig
Normal file
26
core/modules/system/templates/admin-block.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for an administrative block.
|
||||
*
|
||||
* Available variables:
|
||||
* - block: An array of information about the block, including:
|
||||
* - show: A flag indicating if the block should be displayed.
|
||||
* - title: The block title.
|
||||
* - content: (optional) The content of the block.
|
||||
* - description: (optional) A description of the block.
|
||||
* (Description should only be output if content is not available).
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div class="panel">
|
||||
{% if block.title %}
|
||||
<h3 class="panel__title">{{ block.title }}</h3>
|
||||
{% endif %}
|
||||
{% if block.content %}
|
||||
<div class="panel__content">{{ block.content }}</div>
|
||||
{% elseif block.description %}
|
||||
<div class="panel__description">{{ block.description }}</div>
|
||||
{% endif %}
|
||||
</div>
|
26
core/modules/system/templates/admin-page.html.twig
Normal file
26
core/modules/system/templates/admin-page.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for an administrative page.
|
||||
*
|
||||
* Available variables:
|
||||
* - system_compact_link: Themed link to toggle compact view.
|
||||
* - containers: An list of administrative blocks keyed by position: left or
|
||||
* right. Contains:
|
||||
* - blocks: A list of blocks within a container.
|
||||
*
|
||||
* @see template_preprocess_admin_page()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div class="clearfix">
|
||||
{{ system_compact_link }}
|
||||
{% for container in containers %}
|
||||
<div class="layout-column half">
|
||||
{% for block in container.blocks %}
|
||||
{{ block }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
|
@ -0,0 +1,28 @@
|
|||
{% extends "block.html.twig" %}
|
||||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a branding block.
|
||||
*
|
||||
* Each branding element variable (logo, name, slogan) is only available if
|
||||
* enabled in the block configuration.
|
||||
*
|
||||
* Available variables:
|
||||
* - site_logo: Logo for site as defined in Appearance or theme settings.
|
||||
* - site_name: Name for site as defined in Site information settings.
|
||||
* - site_slogan: Slogan for site as defined in Site information settings.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% block content %}
|
||||
{% if site_logo %}
|
||||
<a href="{{ url('<front>') }}" title="{{ 'Home'|t }}" rel="home">
|
||||
<img src="{{ site_logo }}" alt="{{ 'Home'|t }}" />
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if site_name %}
|
||||
<a href="{{ url('<front>') }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
|
||||
{% endif %}
|
||||
{{ site_slogan }}
|
||||
{% endblock %}
|
|
@ -0,0 +1,57 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a menu block.
|
||||
*
|
||||
* Available variables:
|
||||
* - plugin_id: The ID of the block implementation.
|
||||
* - label: The configured label of the block if visible.
|
||||
* - configuration: A list of the block's configuration values.
|
||||
* - label: The configured label for the block.
|
||||
* - label_display: The display settings for the label.
|
||||
* - module: The module that provided this block plugin.
|
||||
* - cache: The cache settings.
|
||||
* - Block plugin specific settings will also be stored here.
|
||||
* - block - The full block entity.
|
||||
* - label_hidden: The hidden block title value if the block was
|
||||
* configured to hide the title ('label' is empty in this case).
|
||||
* - module: The module that generated the block.
|
||||
* - delta: An ID for the block, unique within each module.
|
||||
* - region: The block region embedding the current block.
|
||||
* - content: The content of this block.
|
||||
* - attributes: HTML attributes for the containing element.
|
||||
* - id: A valid HTML ID and guaranteed unique.
|
||||
* - title_attributes: HTML attributes for the title element.
|
||||
* - content_attributes: HTML attributes for the content element.
|
||||
* - title_prefix: Additional output populated by modules, intended to be
|
||||
* displayed in front of the main title tag that appears in the template.
|
||||
* - title_suffix: Additional output populated by modules, intended to be
|
||||
* displayed after the main title tag that appears in the template.
|
||||
*
|
||||
* Headings should be used on navigation menus that consistently appear on
|
||||
* multiple pages. When this menu block's label is configured to not be
|
||||
* displayed, it is automatically made invisible using the 'visually-hidden' CSS
|
||||
* class, which still keeps it visible for screen-readers and assistive
|
||||
* technology. Headings allow screen-reader and keyboard only users to navigate
|
||||
* to or skip the links.
|
||||
* See http://juicystudio.com/article/screen-readers-display-none.php and
|
||||
* http://www.w3.org/TR/WCAG-TECHS/H42.html for more information.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% set heading_id = attributes.id ~ '-menu'|clean_id %}
|
||||
<nav role="navigation" aria-labelledby="{{ heading_id }}"{{ attributes|without('role', 'aria-labelledby') }}>
|
||||
{# Label. If not displayed, we still provide it for screen readers. #}
|
||||
{% if not configuration.label_display %}
|
||||
{% set title_attributes = title_attributes.addClass('visually-hidden') %}
|
||||
{% endif %}
|
||||
{{ title_prefix }}
|
||||
<h2{{ title_attributes }}>{{ configuration.label }}</h2>
|
||||
{{ title_suffix }}
|
||||
|
||||
{# Menu. #}
|
||||
{% block content %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
</nav>
|
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for the messages block.
|
||||
*
|
||||
* Removes wrapper elements from block so that empty block does not appear when
|
||||
* there are no messages.
|
||||
*
|
||||
* Available variables:
|
||||
* - content: The content of this block.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{{ content }}
|
27
core/modules/system/templates/breadcrumb.html.twig
Normal file
27
core/modules/system/templates/breadcrumb.html.twig
Normal file
|
@ -0,0 +1,27 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a breadcrumb trail.
|
||||
*
|
||||
* Available variables:
|
||||
* - breadcrumb: Breadcrumb trail items.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if breadcrumb %}
|
||||
<nav role="navigation" aria-labelledby="system-breadcrumb">
|
||||
<h2 class="visually-hidden">{{ 'Breadcrumb'|t }}</h2>
|
||||
<ol>
|
||||
{% for item in breadcrumb %}
|
||||
<li>
|
||||
{% if item.url %}
|
||||
<a href="{{ item.url }}">{{ item.text }}</a>
|
||||
{% else %}
|
||||
{{ item.text }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</nav>
|
||||
{% endif %}
|
17
core/modules/system/templates/checkboxes.html.twig
Normal file
17
core/modules/system/templates/checkboxes.html.twig
Normal file
|
@ -0,0 +1,17 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a 'checkboxes' #type form element.
|
||||
*
|
||||
* Available variables
|
||||
* - attributes: A list of HTML attributes for the wrapper element.
|
||||
* - children: The rendered checkboxes.
|
||||
*
|
||||
* @see template_preprocess_checkboxes()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
@todo: remove this file once https://www.drupal.org/node/1819284 is resolved.
|
||||
This is identical to core/modules/system/templates/container.html.twig
|
||||
#}
|
||||
<div{{ attributes.addClass('form-checkboxes') }}>{{ children }}</div>
|
15
core/modules/system/templates/confirm-form.html.twig
Normal file
15
core/modules/system/templates/confirm-form.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for confirm form.
|
||||
*
|
||||
* By default this does not alter the appearance of a form at all,
|
||||
* but is provided as a convenience for themers.
|
||||
*
|
||||
* Available variables:
|
||||
* - form: The confirm form.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{{ form }}
|
26
core/modules/system/templates/container.html.twig
Normal file
26
core/modules/system/templates/container.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation of a container used to wrap child elements.
|
||||
*
|
||||
* Used for grouped form items. Can also be used as a #theme_wrapper for any
|
||||
* renderable element, to surround it with a <div> and HTML attributes.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the containing element.
|
||||
* - children: The rendered child elements of the container.
|
||||
* - has_parent: A flag to indicate that the container has one or more parent
|
||||
containers.
|
||||
*
|
||||
* @see template_preprocess_container()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
has_parent ? 'js-form-wrapper',
|
||||
has_parent ? 'form-wrapper',
|
||||
]
|
||||
%}
|
||||
<div{{ attributes.addClass(classes) }}>{{ children }}</div>
|
17
core/modules/system/templates/datetime-form.html.twig
Normal file
17
core/modules/system/templates/datetime-form.html.twig
Normal file
|
@ -0,0 +1,17 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation of a datetime form element.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the datetime form element.
|
||||
* - content: The datelist form element to be output.
|
||||
*
|
||||
* @see template_preprocess_datetime_form()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes }}>
|
||||
{{ content }}
|
||||
</div>
|
32
core/modules/system/templates/datetime-wrapper.html.twig
Normal file
32
core/modules/system/templates/datetime-wrapper.html.twig
Normal file
|
@ -0,0 +1,32 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation of a datetime form wrapper.
|
||||
*
|
||||
* Available variables:
|
||||
* - content: The form element to be output, usually a datelist, or datetime.
|
||||
* - title: The title of the form element.
|
||||
* - title_attributes: HTML attributes for the title wrapper.
|
||||
* - description: Description text for the form element.
|
||||
* - required: An indicator for whether the associated form element is required.
|
||||
*
|
||||
* @see template_preprocess_datetime_wrapper()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set title_classes = [
|
||||
required ? 'form-required',
|
||||
]
|
||||
%}
|
||||
{% if title %}
|
||||
<h4{{ title_attributes.addClass(title_classes) }}>{{ title }}</h4>
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
{% if errors %}
|
||||
<div>
|
||||
{{ errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ description }}
|
26
core/modules/system/templates/details.html.twig
Normal file
26
core/modules/system/templates/details.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a details element.
|
||||
*
|
||||
* Available variables
|
||||
* - attributes: A list of HTML attributes for the details element.
|
||||
* - title: (optional) The title of the element, may not be set.
|
||||
* - description: (optional) The description of the element, may not be set.
|
||||
* - children: (optional) The children of the element, may not be set.
|
||||
* - value: (optional) The value of the element, may not be set.
|
||||
*
|
||||
* @see template_preprocess_details()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<details{{ attributes }}>
|
||||
{%- if title -%}
|
||||
<summary{{ summary_attributes }}>{{ title }}</summary>
|
||||
{%- endif -%}
|
||||
|
||||
{{ description }}
|
||||
{{ children }}
|
||||
{{ value }}
|
||||
</details>
|
23
core/modules/system/templates/dropbutton-wrapper.html.twig
Normal file
23
core/modules/system/templates/dropbutton-wrapper.html.twig
Normal file
|
@ -0,0 +1,23 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a dropbutton wrapper.
|
||||
*
|
||||
* Available variables:
|
||||
* - children: Contains the child elements of the dropbutton menu.
|
||||
*
|
||||
* @see template_preprocess()
|
||||
* @see template_preprocess_dropbutton_wrapper()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if children %}
|
||||
{% spaceless %}
|
||||
<div class="dropbutton-wrapper">
|
||||
<div class="dropbutton-widget">
|
||||
{{ children }}
|
||||
</div>
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
{% endif %}
|
18
core/modules/system/templates/feed-icon.html.twig
Normal file
18
core/modules/system/templates/feed-icon.html.twig
Normal file
|
@ -0,0 +1,18 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a feed icon.
|
||||
*
|
||||
* Available variables:
|
||||
* - url: An internal system path or a fully qualified external URL of the feed.
|
||||
* - icon: The rendered HTML (<img> tag) for the feed icon image.
|
||||
* - attributes: Remaining HTML attributes for the feed link.
|
||||
* - title: A descriptive title of the feed link.
|
||||
* - class: HTML classes to be applied to the feed link.
|
||||
*
|
||||
* @see template_preprocess_feed_icon()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<a href="{{ url }}"{{ attributes.addClass('feed-icon')|without('href') }}>{{ icon }}</a>
|
|
@ -0,0 +1,36 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for an individual form element.
|
||||
*
|
||||
* Available variables for all fields:
|
||||
* - multiple: Whether there are multiple instances of the field.
|
||||
*
|
||||
* Available variables for single cardinality fields:
|
||||
* - elements: Form elements to be rendered.
|
||||
*
|
||||
* Available variables when there are multiple fields.
|
||||
* - table: Table of field items.
|
||||
* - description: Description text for the form element.
|
||||
* - button: "Add another item" button.
|
||||
*
|
||||
* @see template_preprocess_field_multiple_value_form()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if multiple %}
|
||||
<div class="form-item">
|
||||
{{ table }}
|
||||
{% if description %}
|
||||
<div class="description">{{ description }}</div>
|
||||
{% endif %}
|
||||
{% if button %}
|
||||
<div class="clearfix">{{ button }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% for element in elements %}
|
||||
{{ element }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
67
core/modules/system/templates/field.html.twig
Normal file
67
core/modules/system/templates/field.html.twig
Normal file
|
@ -0,0 +1,67 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a field.
|
||||
*
|
||||
* To override output, copy the "field.html.twig" from the templates directory
|
||||
* to your theme's directory and customize it, just like customizing other
|
||||
* Drupal templates such as page.html.twig or node.html.twig.
|
||||
*
|
||||
* Instead of overriding the theming for all fields, you can also just override
|
||||
* theming for a subset of fields using
|
||||
* @link themeable Theme hook suggestions. @endlink For example,
|
||||
* here are some theme hook suggestions that can be used for a field_foo field
|
||||
* on an article node type:
|
||||
* - field--node--field-foo--article.html.twig
|
||||
* - field--node--field-foo.html.twig
|
||||
* - field--node--article.html.twig
|
||||
* - field--field-foo.html.twig
|
||||
* - field--text-with-summary.html.twig
|
||||
* - field.html.twig
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the containing element.
|
||||
* - label_hidden: Whether to show the field label or not.
|
||||
* - title_attributes: HTML attributes for the title.
|
||||
* - label: The label for the field.
|
||||
* - content_attributes: HTML attributes for the content.
|
||||
* - items: List of all the field items. Each item contains:
|
||||
* - attributes: List of HTML attributes for each item.
|
||||
* - content: The field item's content.
|
||||
* - entity_type: The entity type to which the field belongs.
|
||||
* - field_name: The name of the field.
|
||||
* - field_type: The type of the field.
|
||||
* - label_display: The display settings for the label.
|
||||
*
|
||||
* @see template_preprocess_field()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% set field_name_class = field_name|clean_class %}
|
||||
{%
|
||||
set classes = [
|
||||
'field',
|
||||
'field-' ~ entity_type|clean_class ~ '--' ~ field_name_class,
|
||||
'field-name-' ~ field_name_class,
|
||||
'field-type-' ~ field_type|clean_class,
|
||||
'field-label-' ~ label_display,
|
||||
label_display == 'inline' ? 'clearfix',
|
||||
]
|
||||
%}
|
||||
{%
|
||||
set title_classes = [
|
||||
'field-label',
|
||||
label_display == 'visually_hidden' ? 'visually-hidden',
|
||||
]
|
||||
%}
|
||||
<div{{ attributes.addClass(classes) }}>
|
||||
{% if not label_hidden %}
|
||||
<div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
|
||||
{% endif %}
|
||||
<div{{ content_attributes.addClass('field-items') }}>
|
||||
{% for item in items %}
|
||||
<div{{ item.attributes.addClass('field-item') }}>{{ item.content }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
60
core/modules/system/templates/fieldset.html.twig
Normal file
60
core/modules/system/templates/fieldset.html.twig
Normal file
|
@ -0,0 +1,60 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a fieldset element and its children.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the fieldset element.
|
||||
* - errors: (optional) Any errors for this fieldset element, may not be set.
|
||||
* - required: Boolean indicating whether the fieldeset element is required.
|
||||
* - legend: The legend element containing the following properties:
|
||||
* - title: Title of the fieldset, intended for use as the text of the legend.
|
||||
* - attributes: HTML attributes to apply to the legend.
|
||||
* - description: The description element containing the following properties:
|
||||
* - content: The description content of the fieldset.
|
||||
* - attributes: HTML attributes to apply to the description container.
|
||||
* - children: The rendered child elements of the fieldset.
|
||||
* - prefix: The content to add before the fieldset children.
|
||||
* - suffix: The content to add after the fieldset children.
|
||||
*
|
||||
* @see template_preprocess_fieldset()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
'form-item',
|
||||
'js-form-wrapper',
|
||||
'form-wrapper',
|
||||
]
|
||||
%}
|
||||
<fieldset{{ attributes.addClass(classes) }}>
|
||||
{%
|
||||
set legend_span_classes = [
|
||||
'fieldset-legend',
|
||||
required ? 'form-required',
|
||||
]
|
||||
%}
|
||||
{# Always wrap fieldset legends in a SPAN for CSS positioning. #}
|
||||
<legend{{ legend.attributes }}>
|
||||
<span{{ legend_span.attributes.addClass(legend_span_classes) }}>{{ legend.title }}</span>
|
||||
</legend>
|
||||
<div class="fieldset-wrapper">
|
||||
{% if errors %}
|
||||
<div>
|
||||
{{ errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if prefix %}
|
||||
<span class="field-prefix">{{ prefix }}</span>
|
||||
{% endif %}
|
||||
{{ children }}
|
||||
{% if suffix %}
|
||||
<span class="field-suffix">{{ suffix }}</span>
|
||||
{% endif %}
|
||||
{% if description.content %}
|
||||
<div{{ description.attributes.addClass('description') }}>{{ description.content }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</fieldset>
|
26
core/modules/system/templates/form-element-label.html.twig
Normal file
26
core/modules/system/templates/form-element-label.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a form element label.
|
||||
*
|
||||
* Available variables:
|
||||
* - title: The label's text.
|
||||
* - title_display: Elements title_display setting.
|
||||
* - required: An indicator for whether the associated form element is required.
|
||||
* - attributes: A list of HTML attributes for the label.
|
||||
*
|
||||
* @see template_preprocess_form_element_label()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
title_display == 'after' ? 'option',
|
||||
title_display == 'invisible' ? 'visually-hidden',
|
||||
required ? 'form-required',
|
||||
]
|
||||
%}
|
||||
{% if title is not empty or required -%}
|
||||
<label{{ attributes.addClass(classes) }}>{{ title }}</label>
|
||||
{%- endif %}
|
94
core/modules/system/templates/form-element.html.twig
Normal file
94
core/modules/system/templates/form-element.html.twig
Normal file
|
@ -0,0 +1,94 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a form element.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the containing element.
|
||||
* - errors: (optional) Any errors for this form element, may not be set.
|
||||
* - prefix: (optional) The form element prefix, may not be set.
|
||||
* - suffix: (optional) The form element suffix, may not be set.
|
||||
* - required: The required marker, or empty if the associated form element is
|
||||
* not required.
|
||||
* - type: The type of the element.
|
||||
* - name: The name of the element.
|
||||
* - label: A rendered label element.
|
||||
* - label_display: Label display setting. It can have these values:
|
||||
* - before: The label is output before the element. This is the default.
|
||||
* The label includes the #title and the required marker, if #required.
|
||||
* - after: The label is output after the element. For example, this is used
|
||||
* for radio and checkbox #type elements. If the #title is empty but the
|
||||
* field is #required, the label will contain only the required marker.
|
||||
* - invisible: Labels are critical for screen readers to enable them to
|
||||
* properly navigate through forms but can be visually distracting. This
|
||||
* property hides the label for everyone except screen readers.
|
||||
* - attribute: Set the title attribute on the element to create a tooltip but
|
||||
* output no label element. This is supported only for checkboxes and radios
|
||||
* in \Drupal\Core\Render\Element\CompositeFormElementTrait::preRenderCompositeFormElement().
|
||||
* It is used where a visual label is not needed, such as a table of
|
||||
* checkboxes where the row and column provide the context. The tooltip will
|
||||
* include the title and required marker.
|
||||
* - description: (optional) A list of description properties containing:
|
||||
* - content: A description of the form element, may not be set.
|
||||
* - attributes: (optional) A list of HTML attributes to apply to the
|
||||
* description content wrapper. Will only be set when description is set.
|
||||
* - description_display: Description display setting. It can have these values:
|
||||
* - before: The description is output before the element.
|
||||
* - after: The description is output after the element. This is the default
|
||||
* value.
|
||||
* - invisible: The description is output after the element, hidden visually
|
||||
* but available to screen readers.
|
||||
* - disabled: True if the element is disabled.
|
||||
* - title_display: Title display setting.
|
||||
*
|
||||
* @see template_preprocess_form_element()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
'form-item',
|
||||
'js-form-type-' ~ type|clean_class,
|
||||
'form-item-' ~ name|clean_class,
|
||||
title_display not in ['after', 'before'] ? 'form-no-label',
|
||||
disabled == 'disabled' ? 'form-disabled',
|
||||
errors ? 'form-error',
|
||||
]
|
||||
%}
|
||||
{%
|
||||
set description_classes = [
|
||||
'description',
|
||||
description_display == 'invisible' ? 'visually-hidden',
|
||||
]
|
||||
%}
|
||||
<div{{ attributes.addClass(classes) }}>
|
||||
{% if label_display in ['before', 'invisible'] %}
|
||||
{{ label }}
|
||||
{% endif %}
|
||||
{% if prefix is not empty %}
|
||||
<span class="field-prefix">{{ prefix }}</span>
|
||||
{% endif %}
|
||||
{% if description_display == 'before' and description.content %}
|
||||
<div{{ description.attributes }}>
|
||||
{{ description.content }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ children }}
|
||||
{% if suffix is not empty %}
|
||||
<span class="field-suffix">{{ suffix }}</span>
|
||||
{% endif %}
|
||||
{% if label_display == 'after' %}
|
||||
{{ label }}
|
||||
{% endif %}
|
||||
{% if errors %}
|
||||
<div class="form-error-message">
|
||||
{{ errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if description_display in ['after', 'invisible'] and description.content %}
|
||||
<div{{ description.attributes.addClass(description_classes) }}>
|
||||
{{ description.content }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
17
core/modules/system/templates/form.html.twig
Normal file
17
core/modules/system/templates/form.html.twig
Normal file
|
@ -0,0 +1,17 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a 'form' element.
|
||||
*
|
||||
* Available variables
|
||||
* - attributes: A list of HTML attributes for the wrapper element.
|
||||
* - children: The child elements of the form.
|
||||
*
|
||||
* @see template_preprocess_form()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<form{{ attributes }}>
|
||||
{{ children }}
|
||||
</form>
|
49
core/modules/system/templates/html.html.twig
Normal file
49
core/modules/system/templates/html.html.twig
Normal file
|
@ -0,0 +1,49 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for the basic structure of a single Drupal page.
|
||||
*
|
||||
* Variables:
|
||||
* - logged_in: A flag indicating if user is logged in.
|
||||
* - root_path: The root path of the current page (e.g., node, admin, user).
|
||||
* - node_type: The content type for the current node, if the page is a node.
|
||||
* - css: A list of CSS files for the current page.
|
||||
* - head: Markup for the HEAD element (including meta tags, keyword tags, and
|
||||
* so on).
|
||||
* - head_title: List of text elements that make up the head_title variable.
|
||||
* May contain or more of the following:
|
||||
* - title: The title of the page.
|
||||
* - name: The name of the site.
|
||||
* - slogan: The slogan of the site.
|
||||
* - page_top: Initial rendered markup. This should be printed before 'page'.
|
||||
* - page: The rendered page markup.
|
||||
* - page_bottom: Closing rendered markup. This variable should be printed after
|
||||
* 'page'.
|
||||
* - styles: Style tags necessary to import all necessary CSS files in the head.
|
||||
* - scripts: Script tags necessary to load the JavaScript files and settings
|
||||
* in the head.
|
||||
* - db_offline: A flag indicating if the database is offline.
|
||||
*
|
||||
* @see template_preprocess_html()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<!DOCTYPE html>
|
||||
<html{{ html_attributes }}>
|
||||
<head>
|
||||
{{ head }}
|
||||
<title>{{ head_title|safe_join(' | ') }}</title>
|
||||
{{ styles }}
|
||||
{{ scripts }}
|
||||
</head>
|
||||
<body{{ attributes }}>
|
||||
<a href="#main-content" class="visually-hidden focusable">
|
||||
{{ 'Skip to main content'|t }}
|
||||
</a>
|
||||
{{ page_top }}
|
||||
{{ page }}
|
||||
{{ page_bottom }}
|
||||
{{ scripts_bottom }}
|
||||
</body>
|
||||
</html>
|
15
core/modules/system/templates/image.html.twig
Normal file
15
core/modules/system/templates/image.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation of an image.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the img tag.
|
||||
* - style_name: (optional) The name of the image style applied.
|
||||
*
|
||||
* @see template_preprocess_image()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<img{{ attributes }} />
|
20
core/modules/system/templates/indentation.html.twig
Normal file
20
core/modules/system/templates/indentation.html.twig
Normal file
|
@ -0,0 +1,20 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a set of indentation divs.
|
||||
*
|
||||
* These <div> tags are used for drag and drop tables.
|
||||
*
|
||||
* Available variables:
|
||||
* - size: Optional. The number of indentations to create.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<!--
|
||||
THIS FILE IS NOT USED AND IS HERE AS A STARTING POINT FOR CUSTOMIZATION ONLY.
|
||||
See https://api.drupal.org/api/function/theme_indentation/8 for details.
|
||||
After copying this file to your theme's folder and customizing it, remove this
|
||||
HTML comment.
|
||||
-->
|
||||
{% for i in 1..size if size > 0 %}<div class="js-indentation indentation"> </div>{% endfor %}
|
15
core/modules/system/templates/input.html.twig
Normal file
15
core/modules/system/templates/input.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for an 'input' #type form element.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: A list of HTML attributes for the input element.
|
||||
* - children: Optional additional rendered elements.
|
||||
*
|
||||
* @see template_preprocess_input()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<input{{ attributes }} />{{ children }}
|
55
core/modules/system/templates/install-page.html.twig
Normal file
55
core/modules/system/templates/install-page.html.twig
Normal file
|
@ -0,0 +1,55 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a Drupal installation page.
|
||||
*
|
||||
* All available variables are mirrored in page.html.twig.
|
||||
* Some may be blank but they are provided for consistency.
|
||||
*
|
||||
* @see template_preprocess_install_page()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div class="layout-container">
|
||||
|
||||
<header role="banner">
|
||||
{% if site_name or site_slogan %}
|
||||
<div class="name-and-slogan">
|
||||
{% if site_name %}
|
||||
<h1>{{ site_name }}</h1>
|
||||
{% endif %}
|
||||
{% if site_slogan %}
|
||||
<div class="site-slogan">{{ site_slogan }}</div>
|
||||
{% endif %}
|
||||
</div>{# /.name-and-slogan #}
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<main role="main">
|
||||
{% if title %}
|
||||
<h1>{{ title }}</h1>
|
||||
{% endif %}
|
||||
{{ page.highlighted }}
|
||||
{{ page.content }}
|
||||
</main>
|
||||
|
||||
{% if page.sidebar_first %}
|
||||
<aside class="layout-sidebar-first" role="complementary">
|
||||
{{ page.sidebar_first }}
|
||||
</aside>{# /.layout-sidebar-first #}
|
||||
{% endif %}
|
||||
|
||||
{% if page.sidebar_second %}
|
||||
<aside class="layout-sidebar-second" role="complementary">
|
||||
{{ page.sidebar_second }}
|
||||
</aside>{# /.layout-sidebar-second #}
|
||||
{% endif %}
|
||||
|
||||
{% if page.footer %}
|
||||
<footer role="contentinfo">
|
||||
{{ page.footer }}
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
</div>{# /.layout-container #}
|
35
core/modules/system/templates/item-list.html.twig
Normal file
35
core/modules/system/templates/item-list.html.twig
Normal file
|
@ -0,0 +1,35 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for an item list.
|
||||
*
|
||||
* Available variables:
|
||||
* - items: A list of items. Each item contains:
|
||||
* - attributes: HTML attributes to be applied to each list item.
|
||||
* - value: The content of the list element.
|
||||
* - title: The title of the list.
|
||||
* - list_type: The tag for list element ("ul" or "ol").
|
||||
* - attributes: HTML attributes to be applied to the list.
|
||||
* - empty: A message to display when there are no items. Allowed value is a
|
||||
* string or render array.
|
||||
*
|
||||
* @see template_preprocess_item_list()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{%- if items or empty -%}
|
||||
{%- if title is not empty -%}
|
||||
<h3>{{ title }}</h3>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if items -%}
|
||||
<{{ list_type }}{{ attributes }}>
|
||||
{%- for item in items -%}
|
||||
<li{{ item.attributes }}>{{ item.value }}</li>
|
||||
{%- endfor -%}
|
||||
</{{ list_type }}>
|
||||
{%- else -%}
|
||||
{{- empty -}}
|
||||
{%- endif -%}
|
||||
{%- endif %}
|
60
core/modules/system/templates/links.html.twig
Normal file
60
core/modules/system/templates/links.html.twig
Normal file
|
@ -0,0 +1,60 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a set of links.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: Attributes for the UL containing the list of links.
|
||||
* - links: Links to be output.
|
||||
* Each link will have the following elements:
|
||||
* - title: The link text.
|
||||
* - href: The link URL. If omitted, the 'title' is shown as a plain text
|
||||
* item in the links list. If 'href' is supplied, the entire link is passed
|
||||
* to l() as its $options parameter.
|
||||
* - html: (optional) Whether or not 'title' is HTML. If set, the title will
|
||||
* not be passed through \Drupal\Component\Utility\SafeMarkup::checkPlain().
|
||||
* - attributes: (optional) HTML attributes for the anchor, or for the <span>
|
||||
* tag if no 'href' is supplied.
|
||||
* - link_key: The link CSS class.
|
||||
* - heading: (optional) A heading to precede the links.
|
||||
* - text: The heading text.
|
||||
* - level: The heading level (e.g. 'h2', 'h3').
|
||||
* - attributes: (optional) A keyed list of attributes for the heading.
|
||||
* If the heading is a string, it will be used as the text of the heading and
|
||||
* the level will default to 'h2'.
|
||||
*
|
||||
* Headings should be used on navigation menus and any list of links that
|
||||
* consistently appears on multiple pages. To make the heading invisible use
|
||||
* the 'visually-hidden' CSS class. Do not use 'display:none', which
|
||||
* removes it from screen readers and assistive technology. Headings allow
|
||||
* screen reader and keyboard only users to navigate to or skip the links.
|
||||
* See http://juicystudio.com/article/screen-readers-display-none.php and
|
||||
* http://www.w3.org/TR/WCAG-TECHS/H42.html for more information.
|
||||
*
|
||||
* @see template_preprocess_links()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if links -%}
|
||||
{%- if heading -%}
|
||||
{%- if heading.level -%}
|
||||
<{{ heading.level }}{{ heading.attributes }}>{{ heading.text }}</{{ heading.level }}>
|
||||
{%- else -%}
|
||||
<h2{{ heading.attributes }}>{{ heading.text }}</h2>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
<ul{{ attributes }}>
|
||||
{%- for key, item in links -%}
|
||||
<li{{ item.attributes.addClass(key|clean_class) }}>
|
||||
{%- if item.link -%}
|
||||
{{ item.link }}
|
||||
{%- elseif item.text_attributes -%}
|
||||
<span{{ item.text_attributes }}>{{ item.text }}</span>
|
||||
{%- else -%}
|
||||
{{ item.text }}
|
||||
{%- endif -%}
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
{%- endif %}
|
60
core/modules/system/templates/maintenance-page.html.twig
Normal file
60
core/modules/system/templates/maintenance-page.html.twig
Normal file
|
@ -0,0 +1,60 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a single Drupal page while offline.
|
||||
*
|
||||
* All available variables are mirrored in page.html.twig.
|
||||
* Some may be blank but they are provided for consistency.
|
||||
*
|
||||
* @see template_preprocess_maintenance_page()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<header role="banner">
|
||||
{% if logo %}
|
||||
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">
|
||||
<img src="{{ logo }}" alt="{{ 'Home'|t }}"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if site_name or site_slogan %}
|
||||
{% if site_name %}
|
||||
<h1>
|
||||
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
|
||||
</h1>
|
||||
{% endif %}
|
||||
|
||||
{% if site_slogan %}
|
||||
<div>{{ site_slogan }}</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<main role="main">
|
||||
{% if title %}
|
||||
<h1>{{ title }}</h1>
|
||||
{% endif %}
|
||||
|
||||
{{ page.highlighted }}
|
||||
|
||||
{{ page.content }}
|
||||
</main>
|
||||
|
||||
{% if page.sidebar_first %}
|
||||
<aside role="complementary">
|
||||
{{ page.sidebar_first }}
|
||||
</aside>
|
||||
{% endif %}
|
||||
|
||||
{% if page.sidebar_second %}
|
||||
<aside role="complementary">
|
||||
{{ page.sidebar_second }}
|
||||
</aside>
|
||||
{% endif %}
|
||||
|
||||
{% if page.footer %}
|
||||
<footer role="contentinfo">
|
||||
{{ page.footer }}
|
||||
</footer>
|
||||
{% endif %}
|
|
@ -0,0 +1,25 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a list of maintenance tasks to perform.
|
||||
*
|
||||
* Available variables:
|
||||
* - tasks: A list of maintenance tasks to perform. Each item in the list has
|
||||
* the following variables:
|
||||
* - item: The maintenance task.
|
||||
* - attributes: HTML attributes for the maintenance task.
|
||||
* - status: (optional) Text describing the status of the maintenance task,
|
||||
* 'active' or 'done'.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<h2 class="visually-hidden">Installation tasks</h2>
|
||||
<ol class="task-list">
|
||||
{% for task in tasks %}
|
||||
<li{{ task.attributes }}>
|
||||
{{ task.item }}
|
||||
{% if task.status %}<span class="visually-hidden"> ({{ task.status }})</span>{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
22
core/modules/system/templates/mark.html.twig
Normal file
22
core/modules/system/templates/mark.html.twig
Normal file
|
@ -0,0 +1,22 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a marker for new or updated content.
|
||||
*
|
||||
* Available variables:
|
||||
* - status: Number representing the marker status to display. Use the constants
|
||||
* below for comparison:
|
||||
* - MARK_NEW
|
||||
* - MARK_UPDATED
|
||||
* - MARK_READ
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if logged_in %}
|
||||
{% if status is constant('MARK_NEW') %}
|
||||
{{ 'new'|t }}
|
||||
{% elseif status is constant('MARK_UPDATED') %}
|
||||
{{ 'updated'|t }}
|
||||
{% endif %}
|
||||
{% endif %}
|
15
core/modules/system/templates/menu-local-action.html.twig
Normal file
15
core/modules/system/templates/menu-local-action.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a single local action link.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the wrapper element.
|
||||
* - link: A rendered link element.
|
||||
*
|
||||
* @see template_preprocess_menu_local_action()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<li{{ attributes }}>{{ link }}</li>
|
19
core/modules/system/templates/menu-local-task.html.twig
Normal file
19
core/modules/system/templates/menu-local-task.html.twig
Normal file
|
@ -0,0 +1,19 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a local task link.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the wrapper element.
|
||||
* - is_active: Whether the task item is an active tab.
|
||||
* - link: A rendered link element.
|
||||
*
|
||||
* Note: This template renders the content for each task item in
|
||||
* menu-local-tasks.html.twig.
|
||||
*
|
||||
* @see template_preprocess_menu_local_task()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<li{{ attributes }}>{{ link }}</li>
|
25
core/modules/system/templates/menu-local-tasks.html.twig
Normal file
25
core/modules/system/templates/menu-local-tasks.html.twig
Normal file
|
@ -0,0 +1,25 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display primary and secondary local tasks.
|
||||
*
|
||||
* Available variables:
|
||||
* - primary: HTML list items representing primary tasks.
|
||||
* - secondary: HTML list items representing primary tasks.
|
||||
*
|
||||
* Each item in these variables (primary and secondary) can be individually
|
||||
* themed in menu-local-task.html.twig.
|
||||
*
|
||||
* @see template_preprocess_menu_local_tasks()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if primary %}
|
||||
<h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
|
||||
<ul>{{ primary }}</ul>
|
||||
{% endif %}
|
||||
{% if secondary %}
|
||||
<h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
|
||||
<ul>{{ secondary }}</ul>
|
||||
{% endif %}
|
44
core/modules/system/templates/menu.html.twig
Normal file
44
core/modules/system/templates/menu.html.twig
Normal file
|
@ -0,0 +1,44 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a menu.
|
||||
*
|
||||
* Available variables:
|
||||
* - menu_name: The machine name of the menu.
|
||||
* - items: A nested list of menu items. Each menu item contains:
|
||||
* - attributes: HTML attributes for the menu item.
|
||||
* - below: The menu item child items.
|
||||
* - title: The menu link title.
|
||||
* - url: The menu link url, instance of \Drupal\Core\Url
|
||||
* - localized_options: Menu link localized options.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% import _self as menus %}
|
||||
|
||||
{#
|
||||
We call a macro which calls itself to render the full tree.
|
||||
@see http://twig.sensiolabs.org/doc/tags/macro.html
|
||||
#}
|
||||
{{ menus.menu_links(items, attributes, 0) }}
|
||||
|
||||
{% macro menu_links(items, attributes, menu_level) %}
|
||||
{% import _self as menus %}
|
||||
{% if items %}
|
||||
{% if menu_level == 0 %}
|
||||
<ul{{ attributes.addClass('menu') }}>
|
||||
{% else %}
|
||||
<ul class="menu">
|
||||
{% endif %}
|
||||
{% for item in items %}
|
||||
<li{{ item.attributes }}>
|
||||
{{ link(item.title, item.url) }}
|
||||
{% if item.below %}
|
||||
{{ menus.menu_links(item.below, attributes, menu_level + 1) }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
143
core/modules/system/templates/page.html.twig
Normal file
143
core/modules/system/templates/page.html.twig
Normal file
|
@ -0,0 +1,143 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a single page.
|
||||
*
|
||||
* The doctype, html, head and body tags are not in this template. Instead they
|
||||
* can be found in the html.html.twig template in this directory.
|
||||
*
|
||||
* Available variables:
|
||||
*
|
||||
* General utility variables:
|
||||
* - base_path: The base URL path of the Drupal installation. Will usually be
|
||||
* "/" unless you have installed Drupal in a sub-directory.
|
||||
* - is_front: A flag indicating if the current page is the front page.
|
||||
* - logged_in: A flag indicating if the user is registered and signed in.
|
||||
* - is_admin: A flag indicating if the user has permission to access
|
||||
* administration pages.
|
||||
*
|
||||
* Site identity:
|
||||
* - front_page: The URL of the front page. Use this instead of base_path when
|
||||
* linking to the front page. This includes the language domain or prefix.
|
||||
* - logo: The url of the logo image, as defined in theme settings.
|
||||
* - site_name: The name of the site. This is empty when displaying the site
|
||||
* name has been disabled in the theme settings.
|
||||
* - site_slogan: The slogan of the site. This is empty when displaying the site
|
||||
* slogan has been disabled in theme settings.
|
||||
*
|
||||
* Page content (in order of occurrence in the default page.html.twig):
|
||||
* - title_prefix: Additional output populated by modules, intended to be
|
||||
* displayed in front of the main title tag that appears in the template.
|
||||
* - title: The page title, for use in the actual content.
|
||||
* - title_suffix: Additional output populated by modules, intended to be
|
||||
* displayed after the main title tag that appears in the template.
|
||||
* - messages: Status and error messages. Should be displayed prominently.
|
||||
* - tabs: Tabs linking to any sub-pages beneath the current page (e.g., the
|
||||
* view and edit tabs when displaying a node).
|
||||
* - action_links: Actions local to the page, such as "Add menu" on the menu
|
||||
* administration interface.
|
||||
* - node: Fully loaded node, if there is an automatically-loaded node
|
||||
* associated with the page and the node ID is the second argument in the
|
||||
* page's path (e.g. node/12345 and node/12345/revisions, but not
|
||||
* comment/reply/12345).
|
||||
*
|
||||
* Regions:
|
||||
* - page.header: Items for the header region.
|
||||
* - page.primary_menu: Items for the primary menu region.
|
||||
* - page.secondary_menu: Items for the secondary menu region.
|
||||
* - page.highlighted: Items for the highlighted content region.
|
||||
* - page.help: Dynamic help text, mostly for admin pages.
|
||||
* - page.content: The main content of the current page.
|
||||
* - page.sidebar_first: Items for the first sidebar.
|
||||
* - page.sidebar_second: Items for the second sidebar.
|
||||
* - page.footer: Items for the footer region.
|
||||
* - page.breadcrumb: Items for the breadcrumb region.
|
||||
*
|
||||
* @see template_preprocess_page()
|
||||
* @see html.html.twig
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div class="layout-container">
|
||||
|
||||
<header role="banner">
|
||||
{% if logo %}
|
||||
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">
|
||||
<img src="{{ logo }}" alt="{{ 'Home'|t }}"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if site_name or site_slogan %}
|
||||
<div class="name-and-slogan">
|
||||
|
||||
{# Use h1 when the content title is empty #}
|
||||
{% if title %}
|
||||
<strong class="site-name">
|
||||
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
|
||||
</strong>
|
||||
{% else %}
|
||||
<h1 class="site-name">
|
||||
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
|
||||
</h1>
|
||||
{% endif %}
|
||||
|
||||
{% if site_slogan %}
|
||||
<div class="site-slogan">{{ site_slogan }}</div>
|
||||
{% endif %}
|
||||
</div>{# ./name-and-slogan #}
|
||||
{% endif %}
|
||||
|
||||
{{ page.header }}
|
||||
</header>
|
||||
|
||||
{{ page.primary_menu }}
|
||||
{{ page.secondary_menu }}
|
||||
|
||||
{{ page.breadcrumb }}
|
||||
|
||||
{{ page.highlighted }}
|
||||
|
||||
{{ page.help }}
|
||||
|
||||
<main role="main">
|
||||
<a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #}
|
||||
|
||||
<div class="layout-content">
|
||||
|
||||
{{ title_prefix }}
|
||||
{% if title %}
|
||||
<h1>{{ title }}</h1>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
|
||||
{{ tabs }}
|
||||
|
||||
{% if action_links %}
|
||||
<nav class="action-links">{{ action_links }}</nav>
|
||||
{% endif %}
|
||||
|
||||
{{ page.content }}
|
||||
</div>{# /.layout-content #}
|
||||
|
||||
{% if page.sidebar_first %}
|
||||
<aside class="layout-sidebar-first" role="complementary">
|
||||
{{ page.sidebar_first }}
|
||||
</aside>
|
||||
{% endif %}
|
||||
|
||||
{% if page.sidebar_second %}
|
||||
<aside class="layout-sidebar-second" role="complementary">
|
||||
{{ page.sidebar_second }}
|
||||
</aside>
|
||||
{% endif %}
|
||||
|
||||
</main>
|
||||
|
||||
{% if page.footer %}
|
||||
<footer role="contentinfo">
|
||||
{{ page.footer }}
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
</div>{# /.layout-container #}
|
100
core/modules/system/templates/pager.html.twig
Normal file
100
core/modules/system/templates/pager.html.twig
Normal file
|
@ -0,0 +1,100 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a pager.
|
||||
*
|
||||
* Available variables:
|
||||
* - items: List of pager items.
|
||||
* The list is keyed by the following elements:
|
||||
* - first: Item for the first page; not present on the first page of results.
|
||||
* - previous: Item for the previous page; not present on the first page
|
||||
* of results.
|
||||
* - next: Item for the next page; not present on the last page of results.
|
||||
* - last: Item for the last page; not present on the last page of results.
|
||||
* - pages: List of pages, keyed by page number.
|
||||
* Sub-sub elements:
|
||||
* items.first, items.previous, items.next, items.last, and each item inside
|
||||
* items.pages contain the following elements:
|
||||
* - href: URL with appropriate query parameters for the item.
|
||||
* - attributes: A keyed list of HTML attributes for the item.
|
||||
* - text: The visible text used for the item link, such as "‹ previous"
|
||||
* or "next ›".
|
||||
* - current: The page number of the current page.
|
||||
* - ellipses: If there are more pages than the quantity allows, then an
|
||||
* ellipsis before or after the listed pages may be present.
|
||||
* - previous: Present if the currently visible list of pages does not start
|
||||
* at the first page.
|
||||
* - next: Present if the visible list of pages ends before the last page.
|
||||
*
|
||||
* @see template_preprocess_pager()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if items %}
|
||||
<nav class="pager" role="navigation" aria-labelledby="pagination-heading">
|
||||
<h4 id="pagination-heading" class="visually-hidden">{{ 'Pagination'|t }}</h4>
|
||||
<ul class="pager__items js-pager__items">
|
||||
{# Print first item if we are not on the first page. #}
|
||||
{% if items.first %}
|
||||
<li class="pager__item pager__item--first">
|
||||
<a href="{{ items.first.href }}" title="{{ 'Go to first page'|t }}"{{ items.first.attributes|without('href', 'title') }}>
|
||||
<span class="visually-hidden">{{ 'First page'|t }}</span>
|
||||
<span aria-hidden="true">{{ items.first.text|default('« first'|t) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# Print previous item if we are not on the first page. #}
|
||||
{% if items.previous %}
|
||||
<li class="pager__item pager__item--previous">
|
||||
<a href="{{ items.previous.href }}" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel') }}>
|
||||
<span class="visually-hidden">{{ 'Previous page'|t }}</span>
|
||||
<span aria-hidden="true">{{ items.previous.text|default('‹ previous'|t) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# Add an ellipsis if there are further previous pages. #}
|
||||
{% if ellipses.previous %}
|
||||
<li class="pager__item pager__item--ellipsis" role="presentation">…</li>
|
||||
{% endif %}
|
||||
{# Now generate the actual pager piece. #}
|
||||
{% for key, item in items.pages %}
|
||||
<li class="pager__item{{ current == key ? ' is-active' : '' }}">
|
||||
{% if current == key %}
|
||||
{% set title = 'Current page'|t %}
|
||||
{% else %}
|
||||
{% set title = 'Go to page @key'|t({'@key': key}) %}
|
||||
{% endif %}
|
||||
<a href="{{ item.href }}" title="{{ title }}"{{ item.attributes|without('href', 'title') }}>
|
||||
<span class="visually-hidden">
|
||||
{{ current == key ? 'Current page'|t : 'Page'|t }}
|
||||
</span>
|
||||
{{- key -}}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{# Add an ellipsis if there are further next pages. #}
|
||||
{% if ellipses.next %}
|
||||
<li class="pager__item pager__item--ellipsis" role="presentation">…</li>
|
||||
{% endif %}
|
||||
{# Print next item if we are not on the last page. #}
|
||||
{% if items.next %}
|
||||
<li class="pager__item pager__item--next">
|
||||
<a href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}>
|
||||
<span class="visually-hidden">{{ 'Next page'|t }}</span>
|
||||
<span aria-hidden="true">{{ items.next.text|default('next ›'|t) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# Print last item if we are not on the last page. #}
|
||||
{% if items.last %}
|
||||
<li class="pager__item pager__item--last">
|
||||
<a href="{{ items.last.href }}" title="{{ 'Go to last page'|t }}"{{ items.last.attributes|without('href', 'title') }}>
|
||||
<span class="visually-hidden">{{ 'Last page'|t }}</span>
|
||||
<span aria-hidden="true">{{ items.last.text|default('last »'|t) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
23
core/modules/system/templates/progress-bar.html.twig
Normal file
23
core/modules/system/templates/progress-bar.html.twig
Normal file
|
@ -0,0 +1,23 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a progress bar.
|
||||
*
|
||||
* Note that the core Batch API uses this only for non-JavaScript batch jobs.
|
||||
*
|
||||
* Available variables:
|
||||
* - label: The label of the working task.
|
||||
* - percent: The percentage of the progress.
|
||||
* - message: A string containing information to be displayed.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div class="progress" data-drupal-progress>
|
||||
{% if label %}
|
||||
<div class="progress__label">{{ label }}</div>
|
||||
{% endif %}
|
||||
<div class="progress__track"><div class="progress__bar" style="width: {{ percent }}%"></div></div>
|
||||
<div class="progress__percentage">{{ percent }}%</div>
|
||||
<div class="progress__description">{{ message }}</div>
|
||||
</div>
|
15
core/modules/system/templates/radios.html.twig
Normal file
15
core/modules/system/templates/radios.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a 'radios' #type form element.
|
||||
*
|
||||
* Available variables
|
||||
* - attributes: A list of HTML attributes for the wrapper element.
|
||||
* - children: The rendered radios.
|
||||
*
|
||||
* @see template_preprocess_radios()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes.addClass('form-radios') }}>{{ children }}</div>
|
27
core/modules/system/templates/region.html.twig
Normal file
27
core/modules/system/templates/region.html.twig
Normal file
|
@ -0,0 +1,27 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a region.
|
||||
*
|
||||
* Available variables:
|
||||
* - content: The content for this region, typically blocks.
|
||||
* - attributes: HTML attributes for the region div.
|
||||
* - region: The name of the region variable as defined in the theme's
|
||||
* .info.yml file.
|
||||
*
|
||||
* @see template_preprocess_region()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
'region',
|
||||
'region-' ~ region|clean_class,
|
||||
]
|
||||
%}
|
||||
{% if content %}
|
||||
<div{{ attributes.addClass(classes) }}>
|
||||
{{ content }}
|
||||
</div>
|
||||
{% endif %}
|
15
core/modules/system/templates/select.html.twig
Normal file
15
core/modules/system/templates/select.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a select element.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the select tag.
|
||||
* - options: The option element children.
|
||||
*
|
||||
* @see template_preprocess_select()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<select{{ attributes }}>{{ options }}</select>
|
49
core/modules/system/templates/status-messages.html.twig
Normal file
49
core/modules/system/templates/status-messages.html.twig
Normal file
|
@ -0,0 +1,49 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for status messages.
|
||||
*
|
||||
* Displays status, error, and warning messages, grouped by type.
|
||||
*
|
||||
* An invisible heading identifies the messages for assistive technology.
|
||||
* Sighted users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html
|
||||
* for info.
|
||||
*
|
||||
* Add an ARIA label to the contentinfo area so that assistive technology
|
||||
* user agents will better describe this landmark.
|
||||
*
|
||||
* Available variables:
|
||||
* - message_list: List of messages to be displayed, grouped by type.
|
||||
* - status_headings: List of all status types.
|
||||
* - display: (optional) May have a value of 'status' or 'error' when only
|
||||
* displaying messages of that specific type.
|
||||
* - attributes: HTML attributes for the element, including:
|
||||
* - class: HTML classes.
|
||||
*
|
||||
* @see template_preprocess_status_messages()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% for type, messages in message_list %}
|
||||
<div role="contentinfo" aria-label="{{ status_headings[type] }}"{{ attributes|without('role', 'aria-label') }}>
|
||||
{% if type == 'error' %}
|
||||
<div role="alert">
|
||||
{% endif %}
|
||||
{% if status_headings[type] %}
|
||||
<h2 class="visually-hidden">{{ status_headings[type] }}</h2>
|
||||
{% endif %}
|
||||
{% if messages|length > 1 %}
|
||||
<ul>
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{{ messages|first }}
|
||||
{% endif %}
|
||||
{% if type == 'error' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
48
core/modules/system/templates/status-report.html.twig
Normal file
48
core/modules/system/templates/status-report.html.twig
Normal file
|
@ -0,0 +1,48 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for the status report.
|
||||
*
|
||||
* Available variables:
|
||||
* - requirements: Contains multiple requirement instances.
|
||||
* Each requirement contains:
|
||||
* - title: The title of the requirement.
|
||||
* - value: (optional) The requirement's status.
|
||||
* - description: (optional) The requirement's description.
|
||||
* - severity_title: The title of the severity.
|
||||
* - severity_status: Indicates the severity status.
|
||||
*
|
||||
* @see template_preprocess_status_report()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<table class="system-status-report">
|
||||
<thead>
|
||||
<tr class="visually-hidden">
|
||||
<th>{{ 'Status'|t }}</th><th>{{ 'Component'|t }}</th><th>{{ 'Details'|t }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for requirement in requirements %}
|
||||
{% if requirement.severity_status in ['warning', 'error'] %}
|
||||
<tr class="system-status-report__entry color-{{ requirement.severity_status }}">
|
||||
{% else %}
|
||||
<tr class="system-status-report__entry">
|
||||
{% endif %}
|
||||
<td class="system-status-report__status-icon system-status-report__status-icon--{{ requirement.severity_status }}">
|
||||
<div title="{{ requirement.severity_title }}">
|
||||
<span class="visually-hidden">{{ requirement.severity_title }}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="system-status-report__status-title">{{ requirement.title }}</td>
|
||||
<td>
|
||||
{{ requirement.value }}
|
||||
{% if requirement.description %}
|
||||
<div class="description">{{ requirement.description }}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
27
core/modules/system/templates/system-admin-index.html.twig
Normal file
27
core/modules/system/templates/system-admin-index.html.twig
Normal file
|
@ -0,0 +1,27 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for the admin index page.
|
||||
*
|
||||
* Available variables:
|
||||
* - system_compact_link: Themed link to toggle compact view.
|
||||
* - containers: A list of administrative containers keyed by position: left or
|
||||
* right. Each container in the list contains:
|
||||
* - blocks: A list of administrative blocks, rendered
|
||||
* through admin-block.html.twig.
|
||||
*
|
||||
* @see template_preprocess_system_admin_index()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div class="admin clearfix">
|
||||
{{ system_compact_link }}
|
||||
{% for position, blocks in containers %}
|
||||
<div class="{{ position }} clearfix">
|
||||
{% for block in blocks %}
|
||||
{{ block }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
17
core/modules/system/templates/system-config-form.html.twig
Normal file
17
core/modules/system/templates/system-config-form.html.twig
Normal file
|
@ -0,0 +1,17 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a system settings form.
|
||||
*
|
||||
* This template will be used when a system config form specifies 'config_form'
|
||||
* as its #theme callback. Otherwise, by default, system config forms will be
|
||||
* themed by theme_form(). This does not alter the appearance of a form at all,
|
||||
* but is provided as a convenience for themers.
|
||||
*
|
||||
* Available variables:
|
||||
* - form: The confirm form.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{{ form }}
|
76
core/modules/system/templates/system-themes-page.html.twig
Normal file
76
core/modules/system/templates/system-themes-page.html.twig
Normal file
|
@ -0,0 +1,76 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for the Appearance page.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes for the main container.
|
||||
* - theme_groups: A list of theme groups. Each theme group contains:
|
||||
* - attributes: HTML attributes specific to this theme group.
|
||||
* - title: Title for the theme group.
|
||||
* - state: State of the theme group, e.g. installed or uninstalled.
|
||||
* - themes: A list of themes within the theme group. Each theme contains:
|
||||
* - attributes: HTML attributes specific to this theme.
|
||||
* - screenshot: A screenshot representing the theme.
|
||||
* - description: Description of the theme.
|
||||
* - name: Theme name.
|
||||
* - version: The theme's version number.
|
||||
* - is_default: Boolean indicating whether the theme is the default theme
|
||||
* or not.
|
||||
* - is_admin: Boolean indicating whether the theme is the admin theme or
|
||||
* not.
|
||||
* - notes: Identifies what context this theme is being used in, e.g.,
|
||||
* default theme, admin theme.
|
||||
* - incompatible: Text describing any compatibility issues.
|
||||
* - operations: A list of operation links, e.g., Settings, Enable, Disable,
|
||||
* etc. these links should only be displayed if the theme is compatible.
|
||||
*
|
||||
* @see template_preprocess_system_themes_page()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes }}>
|
||||
{% for theme_group in theme_groups %}
|
||||
{%
|
||||
set theme_group_classes = [
|
||||
'system-themes-list',
|
||||
'system-themes-list-' ~ theme_group.state,
|
||||
'clearfix',
|
||||
]
|
||||
%}
|
||||
<div{{ theme_group.attributes.addClass(theme_group_classes) }}>
|
||||
<h2 class="system-themes-list__header">{{ theme_group.title }}</h2>
|
||||
{% for theme in theme_group.themes %}
|
||||
{%
|
||||
set theme_classes = [
|
||||
theme.is_default ? 'theme-default',
|
||||
theme.is_admin ? 'theme-admin',
|
||||
'theme-selector',
|
||||
'clearfix',
|
||||
]
|
||||
%}
|
||||
<div{{ theme.attributes.addClass(theme_classes) }}>
|
||||
{% if theme.screenshot %}
|
||||
{{ theme.screenshot }}
|
||||
{% endif %}
|
||||
<div class="theme-info">
|
||||
<h3 class="theme-info__header">
|
||||
{{- theme.name }} {{ theme.version -}}
|
||||
{% if theme.notes %}
|
||||
({{ theme.notes|safe_join(', ') }})
|
||||
{%- endif -%}
|
||||
</h3>
|
||||
<div class="theme-info__description">{{ theme.description }}</div>
|
||||
{# Display operation links if the theme is compatible. #}
|
||||
{% if theme.incompatible %}
|
||||
<div class="incompatible">{{ theme.incompatible }}</div>
|
||||
{% else %}
|
||||
{{ theme.operations }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
105
core/modules/system/templates/table.html.twig
Normal file
105
core/modules/system/templates/table.html.twig
Normal file
|
@ -0,0 +1,105 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a table.
|
||||
*
|
||||
* Available variables:
|
||||
* - attributes: HTML attributes to apply to the <table> tag.
|
||||
* - caption: A localized string for the <caption> tag.
|
||||
* - colgroups: Column groups. Each group contains the following properties:
|
||||
* - attributes: HTML attributes to apply to the <col> tag.
|
||||
* Note: Drupal currently supports only one table header row, see
|
||||
* https://www.drupal.org/node/893530 and
|
||||
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109.
|
||||
* - header: Table header cells. Each cell contains the following properties:
|
||||
* - tag: The HTML tag name to use; either TH or TD.
|
||||
* - attributes: HTML attributes to apply to the tag.
|
||||
* - content: A localized string for the title of the column.
|
||||
* - field: Field name (required for column sorting).
|
||||
* - sort: Default sort order for this column ("asc" or "desc").
|
||||
* - sticky: A flag indicating whether to use a "sticky" table header.
|
||||
* - rows: Table rows. Each row contains the following properties:
|
||||
* - attributes: HTML attributes to apply to the <tr> tag.
|
||||
* - data: Table cells.
|
||||
* - no_striping: A flag indicating that the row should receive no
|
||||
* 'even / odd' styling. Defaults to FALSE.
|
||||
* - cells: Table cells of the row. Each cell contains the following keys:
|
||||
* - tag: The HTML tag name to use; either TH or TD.
|
||||
* - attributes: Any HTML attributes, such as "colspan", to apply to the
|
||||
* table cell.
|
||||
* - content: The string to display in the table cell.
|
||||
* - active_table_sort: A boolean indicating whether the cell is the active
|
||||
table sort.
|
||||
* - footer: Table footer rows, in the same format as the rows variable.
|
||||
* - empty: The message to display in an extra row if table does not have
|
||||
* any rows.
|
||||
* - no_striping: A boolean indicating that the row should receive no striping.
|
||||
* - header_columns: The number of columns in the header.
|
||||
*
|
||||
* @see template_preprocess_table()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<table{{ attributes }}>
|
||||
{% if caption %}
|
||||
<caption>{{ caption }}</caption>
|
||||
{% endif %}
|
||||
|
||||
{% for colgroup in colgroups %}
|
||||
{% if colgroup.cols %}
|
||||
<colgroup{{ colgroup.attributes }}>
|
||||
{% for col in colgroup.cols %}
|
||||
<col{{ col.attributes }} />
|
||||
{% endfor %}
|
||||
</colgroup>
|
||||
{% else %}
|
||||
<colgroup{{ colgroup.attributes }} />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if header %}
|
||||
<thead>
|
||||
<tr>
|
||||
{% for cell in header %}
|
||||
<{{ cell.tag }}{{ cell.attributes }}>
|
||||
{{- cell.content -}}
|
||||
</{{ cell.tag }}>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
{% endif %}
|
||||
|
||||
{% if rows %}
|
||||
<tbody>
|
||||
{% for row in rows %}
|
||||
<tr{{ row.attributes }}>
|
||||
{% for cell in row.cells %}
|
||||
<{{ cell.tag }}{{ cell.attributes }}>
|
||||
{{- cell.content -}}
|
||||
</{{ cell.tag }}>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% elseif empty %}
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="{{ header_columns }}">{{ empty }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endif %}
|
||||
{% if footer %}
|
||||
<tfoot>
|
||||
{% for row in footer %}
|
||||
<tr{{ row.attributes }}>
|
||||
{% for cell in row.cells %}
|
||||
<{{ cell.tag }}{{ cell.attributes }}>
|
||||
{{- cell.content -}}
|
||||
</{{ cell.tag }}>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tfoot>
|
||||
{% endif %}
|
||||
</table>
|
18
core/modules/system/templates/tablesort-indicator.html.twig
Normal file
18
core/modules/system/templates/tablesort-indicator.html.twig
Normal file
|
@ -0,0 +1,18 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for displaying a tablesort indicator.
|
||||
*
|
||||
* Available variables:
|
||||
* - style: Either 'asc' or 'desc', indicating the sorting direction.
|
||||
*
|
||||
* @see template_preprocess_tablesort_indicator()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if style == 'asc' -%}
|
||||
<img src="{{ arrow_asc }}" width="13" height="13" alt="{{ 'sort ascending'|t }}" title="{{ 'sort ascending'|t }}" />
|
||||
{% else -%}
|
||||
<img src="{{ arrow_desc }}" width="13" height="13" alt="{{ 'sort descending'|t }}" title="{{ 'sort descending'|t }}" />
|
||||
{% endif %}
|
20
core/modules/system/templates/textarea.html.twig
Normal file
20
core/modules/system/templates/textarea.html.twig
Normal file
|
@ -0,0 +1,20 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a 'textarea' #type form element.
|
||||
*
|
||||
* Available variables
|
||||
* - wrapper_attributes: A list of HTML attributes for the wrapper element.
|
||||
* - attributes: A list of HTML attributes for the textarea element.
|
||||
* - resizable: An indicator for whether the textarea is resizable.
|
||||
* - required: An indicator for whether the textarea is required.
|
||||
* - value: The textarea content.
|
||||
*
|
||||
* @see template_preprocess_textarea()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div{{ wrapper_attributes }}>
|
||||
<textarea{{ attributes }}>{{ value }}</textarea>
|
||||
</div>
|
22
core/modules/system/templates/time.html.twig
Normal file
22
core/modules/system/templates/time.html.twig
Normal file
|
@ -0,0 +1,22 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a date / time element.
|
||||
*
|
||||
* Available variables
|
||||
* - timestamp: (optional) A UNIX timestamp for the datetime attribute. If the
|
||||
* datetime cannot be represented as a UNIX timestamp, use a valid datetime
|
||||
* attribute value in attributes.datetime.
|
||||
* - text: (optional) The content to display within the <time> element.
|
||||
* Defaults to a human-readable representation of the timestamp value or the
|
||||
* datetime attribute value using format_date().
|
||||
* - attributes: (optional) HTML attributes to apply to the <time> element.
|
||||
* A datetime attribute in 'attributes' overrides the 'timestamp'. To
|
||||
* create a valid datetime attribute value from a UNIX timestamp, use
|
||||
* format_date() with one of the predefined 'html_*' formats.
|
||||
*
|
||||
* @see template_preprocess_time()
|
||||
* @see http://www.w3.org/TR/html5-author/the-time-element.html#attr-time-datetime
|
||||
*/
|
||||
#}
|
||||
<time{{ attributes }}>{{ text }}</time>
|
15
core/modules/system/templates/vertical-tabs.html.twig
Normal file
15
core/modules/system/templates/vertical-tabs.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for vertical tabs.
|
||||
*
|
||||
* Available variables
|
||||
* - attributes: A list of HTML attributes for the wrapper element.
|
||||
* - children: The rendered checkboxes.
|
||||
*
|
||||
* @see template_preprocess_vertical_tabs()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes.setAttribute('data-vertical-tabs-panes', TRUE) }}>{{ children }}</div>
|
Reference in a new issue