Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -14,10 +14,11 @@
* @ingroup themeable
*/
#}
<div class="clearfix">
{{ system_compact_link }}
{% for container in containers %}
<div class="layout-column half">
<div class="layout-column layout-column--half">
{% for block in container.blocks %}
{{ block }}
{% endfor %}

View file

@ -17,12 +17,12 @@
#}
{% block content %}
{% if site_logo %}
<a href="{{ url('<front>') }}" title="{{ 'Home'|t }}" rel="home">
<a href="{{ path('<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>
<a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
{% endif %}
{{ site_slogan }}
{% endblock %}

View file

@ -5,6 +5,7 @@
*
* Available variables
* - attributes: A list of HTML attributes for the details element.
* - errors: (optional) Any errors for this details element, may not be set.
* - 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.
@ -20,6 +21,12 @@
<summary{{ summary_attributes }}>{{ title }}</summary>
{%- endif -%}
{% if errors %}
<div>
{{ errors }}
</div>
{% endif %}
{{ description }}
{{ children }}
{{ value }}

View file

@ -11,7 +11,9 @@
*
* Available variables when there are multiple fields.
* - table: Table of field items.
* - description: Description text for the form element.
* - description: The description element containing the following properties:
* - content: The description content of the form element.
* - attributes: HTML attributes to apply to the description container.
* - button: "Add another item" button.
*
* @see template_preprocess_field_multiple_value_form()
@ -20,10 +22,10 @@
*/
#}
{% if multiple %}
<div class="form-item">
<div class="js-form-item form-item">
{{ table }}
{% if description %}
<div class="description">{{ description }}</div>
{% if description.content %}
<div{{ description.attributes.addClass('description') }} >{{ description.content }}</div>
{% endif %}
{% if button %}
<div class="clearfix">{{ button }}</div>

View file

@ -24,6 +24,7 @@
#}
{%
set classes = [
'js-form-item',
'form-item',
'js-form-wrapper',
'form-wrapper',

View file

@ -48,9 +48,11 @@
#}
{%
set classes = [
'js-form-item',
'form-item',
'js-form-type-' ~ type|clean_class,
'form-item-' ~ name|clean_class,
'js-form-item-' ~ name|clean_class,
title_display not in ['after', 'before'] ? 'form-no-label',
disabled == 'disabled' ? 'form-disabled',
errors ? 'form-item--error',

View file

@ -7,9 +7,6 @@
* - 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.
@ -19,11 +16,9 @@
* - page: The rendered page markup.
* - page_bottom: Closing rendered markup. This variable should be printed after
* 'page'.
* - styles: HTML necessary to import all necessary CSS files in <head>.
* - scripts: HTML necessary to load JavaScript files and settings in <head>.
* - scripts_bottom: HTML necessary to load JavaScript files before closing
* <body> tag.
* - db_offline: A flag indicating if the database is offline.
* - placeholder_token: The token for generating head, css, js and js-bottom
* placeholders.
*
* @see template_preprocess_html()
*
@ -33,10 +28,10 @@
<!DOCTYPE html>
<html{{ html_attributes }}>
<head>
{{ head }}
<head-placeholder token="{{ placeholder_token|raw }}">
<title>{{ head_title|safe_join(' | ') }}</title>
{{ styles }}
{{ scripts }}
<css-placeholder token="{{ placeholder_token|raw }}">
<js-placeholder token="{{ placeholder_token|raw }}">
</head>
<body{{ attributes }}>
<a href="#main-content" class="visually-hidden focusable">
@ -45,6 +40,6 @@
{{ page_top }}
{{ page }}
{{ page_bottom }}
{{ scripts_bottom }}
<js-bottom-placeholder token="{{ placeholder_token|raw }}">
</body>
</html>

View file

@ -11,10 +11,4 @@
* @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">&nbsp;</div>{% endfor %}

View file

@ -9,6 +9,7 @@
* - value: The content of the list element.
* - title: The title of the list.
* - list_type: The tag for list element ("ul" or "ol").
* - wrapper_attributes: HTML attributes to be applied to the list wrapper.
* - 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.
@ -21,9 +22,9 @@
*/
#}
{% if context.list_style %}
{% set attributes = attributes.addClass('item-list__' ~ context.list_style) %}
{%- set attributes = attributes.addClass('item-list__' ~ context.list_style) %}
{% endif %}
{%- if items or empty -%}
{% if items or empty %}
{%- if title is not empty -%}
<h3>{{ title }}</h3>
{%- endif -%}

View file

@ -14,7 +14,7 @@
* @ingroup themeable
*/
#}
<h2 class="visually-hidden">Installation tasks</h2>
<h2 class="visually-hidden">{{ 'Installation tasks'|t }}</h2>
<ol class="task-list">
{% for task in tasks %}
<li{{ task.attributes }}>

View file

@ -15,8 +15,8 @@
#}
{% if logged_in %}
{% if status is constant('MARK_NEW') %}
{{ 'new'|t }}
{{ 'New'|t }}
{% elseif status is constant('MARK_UPDATED') %}
{{ 'updated'|t }}
{{ 'Updated'|t }}
{% endif %}
{% endif %}

View file

@ -11,6 +11,11 @@
* - title: The menu link title.
* - url: The menu link url, instance of \Drupal\Core\Url
* - localized_options: Menu link localized options.
* - is_expanded: TRUE if the link has visible children within the current
* menu tree.
* - is_collapsed: TRUE if the link has children within the current menu tree
* that are not currently visible.
* - in_active_trail: TRUE if the link is in the active trail.
*
* @ingroup themeable
*/
@ -27,18 +32,18 @@
{% import _self as menus %}
{% if items %}
{% if menu_level == 0 %}
<ul{{ attributes.addClass('menu') }}>
<ul{{ attributes }}>
{% else %}
<ul class="menu">
<ul>
{% 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 %}
{% 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 %}

View file

@ -0,0 +1,23 @@
{#
/**
* @file
* Default theme implementation for page titles.
*
* Available variables:
* - title_attributes: HTML attributes for the page title 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: 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.
*
* @see template_preprocess_page_title()
*
* @ingroup themeable
*/
#}
{{ title_prefix }}
{% if title %}
<h1{{ title_attributes }}>{{ title }}</h1>
{% endif %}
{{ title_suffix }}

View file

@ -26,11 +26,6 @@
* 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.
* - 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
@ -58,32 +53,6 @@
<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>
@ -100,12 +69,6 @@
<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 }}
{{ page.content }}
</div>{# /.layout-content #}

View file

@ -17,8 +17,8 @@
* 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 ".
* - 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.
@ -40,7 +40,7 @@
<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>
<span aria-hidden="true">{{ items.first.text|default(First'|t) }}</span>
</a>
</li>
{% endif %}
@ -49,7 +49,7 @@
<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>
<span aria-hidden="true">{{ items.previous.text|default(' Previous'|t) }}</span>
</a>
</li>
{% endif %}
@ -82,7 +82,7 @@
<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>
<span aria-hidden="true">{{ items.next.text|default('Next '|t) }}</span>
</a>
</li>
{% endif %}
@ -91,7 +91,7 @@
<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>
<span aria-hidden="true">{{ items.last.text|default('Last »'|t) }}</span>
</a>
</li>
{% endif %}

View file

@ -12,4 +12,4 @@
* @ingroup themeable
*/
#}
<div{{ attributes.addClass('form-radios') }}>{{ children }}</div>
<div{{ attributes }}>{{ children }}</div>

View file

@ -14,14 +14,8 @@
* @ingroup themeable
*/
#}
{%
set classes = [
'region',
'region-' ~ region|clean_class,
]
%}
{% if content %}
<div{{ attributes.addClass(classes) }}>
<div{{ attributes }}>
{{ content }}
</div>
{% endif %}

View file

@ -18,29 +18,23 @@
*/
#}
<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 %}
<tr class="system-status-report__entry color-{{ requirement.severity_status }}">
{% 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>
<tr class="system-status-report__entry system-status-report__entry--{{ requirement.severity_status }} color-{{ requirement.severity_status }}">
{% if requirement.severity_status in ['warning', 'error'] %}
<th class="system-status-report__status-title system-status-report__status-icon system-status-report__status-icon--{{ requirement.severity_status }}">
<span class="visually-hidden">{{ requirement.severity_title }}</span>
{% else %}
<th class="system-status-report__status-title">
{% endif %}
{{ requirement.title }}
</th>
<td>
{{ requirement.value }}
{% if requirement.description %}
<div class="description">{{ requirement.description }}</div>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>

View file

@ -0,0 +1,76 @@
{#
/**
* @file
* Default theme implementation for the modules listing page.
*
* Displays a list of all packages in a project.
*
* Available variables:
* - modules: Contains multiple module instances. Each module contains:
* - attributes: Attributes on the row.
* - checkbox: A checkbox for enabling the module.
* - name: The human-readable name of the module.
* - id: A unique identifier for interacting with the details element.
* - enable_id: A unique identifier for interacting with the checkbox element.
* - description: The description of the module.
* - machine_name: The module's machine name.
* - version: Information about the module version.
* - requires: A list of modules that this module requires.
* - required_by: A list of modules that require this module.
* - links: A list of administration links provided by the module.
*
* @see template_preprocess_system_modules_details()
*
* @ingroup themeable
*/
#}
<table class="responsive-enabled" data-striping="1">
<thead>
<tr>
<th class="checkbox visually-hidden">{{ 'Installed'|t }}</th>
<th class="name visually-hidden">{{ 'Name'|t }}</th>
<th class="description visually-hidden priority-low">{{ 'Description'|t }}</th>
</tr>
</thead>
<tbody>
{% for module in modules %}
{% set zebra = cycle(['odd', 'even'], loop.index0) %}
<tr{{ module.attributes.addClass(zebra) }}>
<td class="checkbox">
{{ module.checkbox }}
</td>
<td class="module">
<label id="{{ module.id }}" for="{{ module.enable_id }}" class="module-name table-filter-text-source">{{ module.name }}</label>
</td>
<td class="description expand priority-low">
<details class="js-form-wrapper form-wrapper" id="{{ module.enable_id }}-description">
<summary aria-controls="{{ module.enable_id }}-description" role="button" aria-expanded="false"><span class="text module-description">{{ module.description }}</span></summary>
<div class="details-wrapper">
<div class="details-description">
<div class="requirements">
<div class="admin-requirements">{{ 'Machine name: <span dir="ltr" class="table-filter-text-source">@machine-name</span>'|t({'@machine-name': module.machine_name }) }}</div>
{% if module.version %}
<div class="admin-requirements">{{ 'Version: @module-version'|t({'@module-version': module.version }) }}</div>
{% endif %}
{% if module.requires %}
<div class="admin-requirements">{{ 'Requires: @module-list'|t({'@module-list': module.requires }) }}</div>
{% endif %}
{% if module.required_by %}
<div class="admin-requirements">{{ 'Required by: @module-list'|t({'@module-list': module.required_by }) }}</div>
{% endif %}
</div>
{% if module.links %}
<div class="links">
{% for link_type in ['help', 'permissions', 'configure'] %}
{{ module.links[link_type] }}
{% endfor %}
</div>
{% endif %}
</div>
</div>
</details>
</td>
</tr>
{% endfor %}
</tbody>
</table>

View file

@ -0,0 +1,75 @@
{#
/**
* @file
* Default theme implementation for the modules uninstall page.
*
* Available variables:
* - form: The modules uninstall form.
* - modules: Contains multiple module instances. Each module contains:
* - attributes: Attributes on the row.
* - module_name: The name of the module.
* - checkbox: A checkbox for uninstalling the module.
* - checkbox_id: A unique identifier for interacting with the checkbox
* element.
* - name: The human-readable name of the module.
* - description: The description of the module.
* - disabled_reasons: (optional) A list of reasons why this module cannot be
* uninstalled.
*
* @see template_preprocess_system_modules_uninstall()
*
* @ingroup themeable
*/
#}
{{ form.filters }}
<table class="responsive-enabled" data-striping="1">
<thead>
<tr>
<th>{{ 'Uninstall'|t }}</th>
<th>{{ 'Name'|t }}</th>
<th>{{ 'Description'|t }}</th>
</tr>
</thead>
<tbody>
{% for module in modules %}
{% set zebra = cycle(['odd', 'even'], loop.index0) -%}
<tr{{ module.attributes.addClass(zebra) }}>
<td align="center">
{{- module.checkbox -}}
</td>
<td>
<label for="{{ module.checkbox_id }}" class="module-name table-filter-text-source">{{ module.name }}</label>
</td>
<td class="description">
<span class="text module-description">{{ module.description }}</span>
{% if module.reasons_count > 0 %}
<div class="admin-requirements">
{%- trans -%}
The following reason prevents {{ module.module_name }} from being uninstalled:
{%- plural module.reasons_count -%}
The following reasons prevent {{ module.module_name }} from being uninstalled:
{%- endtrans %}
<div class="item-list">
<ul>
{%- for reason in module.validation_reasons -%}
<li>{{ reason }}</li>
{%- endfor -%}
{%- if module.required_by -%}
<li>{{ 'Required by: @module-list'|t({'@module-list': module.required_by|safe_join(', ') }) }}</li>
{%- endif -%}
</ul>
</div>
</div>
{% endif %}
</td>
</tr>
{% else %}
<tr class="odd">
<td colspan="3" class="empty message">{{ 'No modules are available to uninstall.'|t }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ form|without('filters', 'modules', 'uninstall') }}

View file

@ -11,8 +11,18 @@
* @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 %}
{%
set classes = [
'tablesort',
'tablesort--' ~ style,
]
%}
<span{{ attributes.addClass(classes) }}>
<span class="visually-hidden">
{% if style == 'asc' -%}
{{ 'Sort ascending'|t }}
{% else -%}
{{ 'Sort descending'|t }}
{% endif %}
</span>
</span>