diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 0505615..7ba8a0b 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -11,7 +11,6 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Drupal\Core\Datetime\DrupalDateTime; -use Drupal\Core\Template\Attribute; use Drupal\system\Form\ModulesInstallConfirmForm; use Drupal\system\Form\ModulesUninstallConfirmForm; @@ -1402,7 +1401,7 @@ function template_preprocess_admin_block(&$variables) { function template_preprocess_admin_block_content(&$variables) { if (!empty($variables['content'])) { $compact = system_admin_compact_mode(); - $variables['attributes'] = new Attribute(array('class' => array('admin-list'))); + $variables['attributes'] = array('class' => array('admin-list')); if ($compact) { $variables['attributes']['class'][] = 'compact'; } @@ -1685,8 +1684,6 @@ function template_preprocess_system_themes_page(&$variables) { $groups = array(); $theme_groups = $variables['theme_groups']; - // Top level attributes. - $variables['attributes'] = !empty($variables['attributes']) ? new Attribute($variables['attributes']) : new Attribute(); // We have a default class variable that we don't want here. // @see http://drupal.org/node/1938430 unset($variables['attributes']['class']); @@ -1702,7 +1699,7 @@ function template_preprocess_system_themes_page(&$variables) { $theme_group['state'] = $state; $theme_group['title'] = $title; $theme_group['themes'] = array(); - $theme_group['attributes'] = new Attribute(array('class' => array('system-themes-list', 'system-themes-list-' . $state, 'clearfix'))); + $theme_group['attributes'] = array('class' => array('system-themes-list', 'system-themes-list-' . $state, 'clearfix')); foreach ($theme_groups[$state] as $theme) { $current_theme = array(); @@ -1724,7 +1721,7 @@ function template_preprocess_system_themes_page(&$variables) { // Style theme info $theme->classes[] = 'theme-selector'; $theme->classes[] = 'clearfix'; - $current_theme['attributes'] = new Attribute(array('class' => $theme->classes)); + $current_theme['attributes'] = array('class' => $theme->classes); $current_theme['name'] = $theme->info['name']; $current_theme['version'] = isset($theme->info['version']) ? $theme->info['version'] : ''; $current_theme['notes'] = count($theme->notes) ? '(' . join(', ', $theme->notes) . ')' : ''; @@ -1749,7 +1746,7 @@ function template_preprocess_system_themes_page(&$variables) { $current_theme['compatibility'] = array( '#theme' => 'links', '#links' => $theme->operations, - '#attributes' => new Attribute(array('class' => array('operations', 'clearfix'))), + '#attributes' => array('class' => array('operations', 'clearfix')), ); } $theme_group['themes'][] = $current_theme; diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 9d4fdd7..187b690 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -140,9 +140,9 @@ function system_theme() { return array_merge(drupal_common_theme(), array( 'system_themes_page' => array( 'variables' => array( - 'theme_groups' => array(), - 'theme_group_titles' => array(), - 'admin_theme_options' => array(), + 'theme_groups' => NULL, + 'theme_group_titles' => NULL, + 'admin_theme_options' => NULL, ), 'file' => 'system.admin.inc', 'template' => 'system-themes-page', @@ -162,36 +162,36 @@ function system_theme() { 'file' => 'system.admin.inc', ), 'status_report' => array( - 'variables' => array('requirements' => array()), + 'variables' => array('requirements' => NULL), 'file' => 'system.admin.inc', 'template' => 'status-report' ), 'admin_page' => array( - 'variables' => array('blocks' => array()), + 'variables' => array('blocks' => NULL), 'file' => 'system.admin.inc', 'template' => 'admin-page', ), 'admin_block' => array( - 'variables' => array('block' => array()), + 'variables' => array('block' => NULL), 'file' => 'system.admin.inc', 'template' => 'admin-block', ), 'admin_block_content' => array( - 'variables' => array('content' => array()), + 'variables' => array('content' => NULL), 'file' => 'system.admin.inc', 'template' => 'admin-block-content', ), 'system_admin_index' => array( - 'variables' => array('menu_items' => array()), + 'variables' => array('menu_items' => NULL), 'file' => 'system.admin.inc', 'template' => 'system-admin-index', ), 'system_powered_by' => array( - 'variables' => array(), + 'variables' => NULL, 'template' => 'system-powered-by', ), 'system_compact_link' => array( - 'variables' => array(), + 'variables' => NULL, 'template' => 'system-compact-link', ), 'system_date_format_localize_form' => array( @@ -3523,19 +3523,6 @@ function system_timezone($abbreviation = '', $offset = -1, $is_daylight_saving_t } /** - * Prepares variables for the Powered by Drupal template. - * - * Default template: system-powered-by.html.twig. - * - * This doesn't do anything extra to prepare the template, but is given simply - * for example purposes. - * - * @ingroup themeable - */ -function template_preprocess_system_powered_by(&$variables) { -} - -/** * Prepare variables for system compact link templates. * * Default template: system-compact-link.html.twig. diff --git a/core/modules/system/templates/admin-block-content.html.twig b/core/modules/system/templates/admin-block-content.html.twig index 80c0526..1900082 100644 --- a/core/modules/system/templates/admin-block-content.html.twig +++ b/core/modules/system/templates/admin-block-content.html.twig @@ -4,7 +4,7 @@ * Default theme implementation for the content of an administrative block. * * Available variables: - * - content: An array containing information about the block. Each element + * - 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', 'href', and 'localized_options', which are * passed to l(). A 'description' key may also be provided. @@ -18,12 +18,12 @@ */ #} {% if content %} - - {% for item in content %} -
{{ item.link }}
- {% if item.description %} -
{{ item.description }}
- {% endif %} - {% endfor %} - + + {% for item in content %} +
{{ item.link }}
+ {% if item.description %} +
{{ item.description }}
+ {% endif %} + {% endfor %} + {% endif %} diff --git a/core/modules/system/templates/admin-block.html.twig b/core/modules/system/templates/admin-block.html.twig index 986b959..8e9bc96 100644 --- a/core/modules/system/templates/admin-block.html.twig +++ b/core/modules/system/templates/admin-block.html.twig @@ -18,9 +18,14 @@ */ #} {% if block.show %} -
- {% if block.title %}

{{ block.title }}

{% endif %} - {% if block.content %}
{{ block.content }}
- {% elseif block.description %}
{{ block.description }}
{% endif %} -
+
+ {% if block.title %} +

{{ block.title }}

+ {% endif %} + {% if block.content %} +
{{ block.content }}
+ {% elseif block.description %} +
{{ block.description }}
+ {% endif %} +
{% endif %} diff --git a/core/modules/system/templates/admin-page.html.twig b/core/modules/system/templates/admin-page.html.twig index ab16d6e..f86b283 100644 --- a/core/modules/system/templates/admin-page.html.twig +++ b/core/modules/system/templates/admin-page.html.twig @@ -5,7 +5,8 @@ * * Available variables: * - system_compact_link: Themed link to toggle compact view. - * - containers: An array of administrative blocks keyed by position: left or right. + * - containers: An list of administrative blocks keyed by position: left or + * right. * * @see template_preprocess() * @see template_preprocess_admin_page() diff --git a/core/modules/system/templates/status-report.html.twig b/core/modules/system/templates/status-report.html.twig index f8b74d6..a95e3cf 100644 --- a/core/modules/system/templates/status-report.html.twig +++ b/core/modules/system/templates/status-report.html.twig @@ -4,7 +4,7 @@ * * Available variables: * - requirements: contains multiple requirement instances. Each requirement - * has .title, .value and .description. + * has .title, .value and .description. * - severity: The severity of error. Contains .title and .class. * * @see template_preprocess() diff --git a/core/modules/system/templates/system-admin-index.html.twig b/core/modules/system/templates/system-admin-index.html.twig index 54cf0e2..5c2dc24 100644 --- a/core/modules/system/templates/system-admin-index.html.twig +++ b/core/modules/system/templates/system-admin-index.html.twig @@ -12,7 +12,6 @@ * * @ingroup themeable */ - @todo: remove this file once http://drupal.org/node/1842232 is resolved. #}
{{ system_compact_link }} diff --git a/core/modules/system/templates/system-modules-details.html.twig b/core/modules/system/templates/system-modules-details.html.twig index 6321b28..0f946c4 100644 --- a/core/modules/system/templates/system-modules-details.html.twig +++ b/core/modules/system/templates/system-modules-details.html.twig @@ -4,7 +4,7 @@ * Default theme implementation to display the modules form. * * Available variables: - * - content: file form element html. + * - content: File form element html. * * @see template_preprocess() * @see template_preprocess_system_modules_details() diff --git a/core/modules/system/templates/system-themes-page.html.twig b/core/modules/system/templates/system-themes-page.html.twig index c20544a..0035809 100644 --- a/core/modules/system/templates/system-themes-page.html.twig +++ b/core/modules/system/templates/system-themes-page.html.twig @@ -10,22 +10,22 @@ * Each theme_groups[group] contains an array of theme groups. * * Each group in theme_groups[group] contains: - * - group.attributes: Element attributes specific to this group. - * - group.title: Title for the theme group. - * - group.state: State of the theme group. - * - group.themes: An array of themes within that group. + * - attributes: Element attributes specific to this group. + * - title: Title for the theme group. + * - state: State of the theme group. + * - themes: An array of themes within that group. * * Each group.themes[theme] contains an array of themes. * * Each theme in group.themes[theme] contains: - * - theme.attributes: Element attributes specific to this theme. - * - theme.screenshot: Render of theme screenshot. - * - theme.description: Description of the theme. - * - theme.name: Name of theme. - * - theme.version: Verions number of theme. - * - theme.notes: Identifies what context this theme is being used. + * - attributes: Element attributes specific to this theme. + * - screenshot: Render of theme screenshot. + * - description: Description of the theme. + * - name: Name of theme. + * - version: Verions number of theme. + * - notes: Identifies what context this theme is being used. * eg. (default theme, admin theme) - * - theme.compatibility: Description of any incompatibility issues, + * - compatibility: Description of any incompatibility issues, * if the theme is compatible, provides a list of links. * * @see template_preprocess()