';
-
- return $output;
}
/**
- * Returns HTML for the status report.
+ * Prepares variables for status report template.
+ *
+ * Default template: status-report.html.twig.
*
* This theme function is dependent on install.inc being loaded, because
* that's where the constants are defined.
@@ -485,8 +416,7 @@ function theme_system_admin_index($variables) {
*
* @ingroup themeable
*/
-function theme_status_report($variables) {
- $requirements = $variables['requirements'];
+function template_preprocess_status_report(&$variables) {
$severities = array(
REQUIREMENT_INFO => array(
'title' => t('Info'),
@@ -505,11 +435,8 @@ function theme_status_report($variables) {
'class' => 'error',
),
);
- $output = '
';
- $output .= '
' . t('Status') . '
' . t('Component') . '
' . t('Details') . '
';
- $output .= '
';
- foreach ($requirements as $requirement) {
+ foreach ($variables['requirements'] as $i => $requirement) {
// Always use the explicit requirement severity, if defined. Otherwise,
// default to REQUIREMENT_OK in the installer to visually confirm that
// installation requirements are met. And default to REQUIREMENT_INFO to
@@ -523,29 +450,10 @@ function theme_status_report($variables) {
else {
$severity = $severities[REQUIREMENT_INFO];
}
- // hook_requirements does not require value to be set. Set to null if not:
- if (isset($requirement['value'])) {
- $value = $requirement['value'];
- }
- else {
- $value = NULL;
- }
- $severity['icon'] = '
';
+ $current_theme['attributes'] = new Attribute(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) . ')' : '';
// Make sure to provide feedback on compatibility.
if (!empty($theme->incompatible_core)) {
- $output .= '
' . t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => \Drupal::CORE_COMPATIBILITY)) . '
';
+ $current_theme['compatibility'] = t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => \Drupal::CORE_COMPATIBILITY));
}
elseif (!empty($theme->incompatible_php)) {
if (substr_count($theme->info['php'], '.') < 2) {
$theme->info['php'] .= '.*';
}
- $output .= '
' . t('This theme requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $theme->info['php'], '!php_version' => phpversion())) . '
';
+ $current_theme['compatibility'] = t('This theme requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $theme->info['php'], '!php_version' => phpversion()));
}
elseif (!empty($theme->incompatible_base)) {
- $output .= '
' . t('This theme requires the base theme @base_theme to operate correctly.', array('@base_theme' => $theme->info['base theme'])) . '
';
+ $current_theme['compatibility'] = t('This theme requires the base theme @base_theme to operate correctly.', array('@base_theme' => $theme->info['base theme']));
}
elseif (!empty($theme->incompatible_engine)) {
- $output .= '
' . t('This theme requires the theme engine @theme_engine to operate correctly.', array('@theme_engine' => $theme->info['engine'])) . '
';
-
- return $output;
}
/**
diff --git a/core/modules/system/templates/admin-block-content.html.twig b/core/modules/system/templates/admin-block-content.html.twig
new file mode 100644
index 0000000..d3fbd5a
--- /dev/null
+++ b/core/modules/system/templates/admin-block-content.html.twig
@@ -0,0 +1,28 @@
+{#
+/**
+ * @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', 'href', and 'localized_options', which are
+ * passed to l(). A 'description' key may also be provided.
+ * - attributes: HTML attributes to be aded to the element.
+ * - is_compact_mode: It defines if compact mode is used.
+ *
+ * @see template_preprocess_admin_block_content()
+ *
+ * @ingroup themeable
+ */
+#}
+{% if content %}
+
+ {% 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
new file mode 100644
index 0000000..36c8d43
--- /dev/null
+++ b/core/modules/system/templates/admin-block.html.twig
@@ -0,0 +1,30 @@
+{#
+/**
+ * @file
+ * Default theme implementation for an administrative block.
+ *
+ * Available variables:
+ * - block: An array of information about the block, including:
+ * - show: A boolean 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).
+ *
+ * @see template_preprocess_admin_block()
+ *
+ * @ingroup themeable
+ */
+#}
+{% if block.show %}
+
+ {% 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
new file mode 100644
index 0000000..5a7d9b1
--- /dev/null
+++ b/core/modules/system/templates/admin-page.html.twig
@@ -0,0 +1,27 @@
+{#
+/**
+ * @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
+ */
+#}
+
+ {{ system_compact_link }}
+ {% for position, container in containers %}
+
+ {% for block in container.blocks %}
+ {{ block }}
+ {% endfor %}
+
+ {% endfor %}
+
diff --git a/core/modules/system/templates/datetime.html.twig b/core/modules/system/templates/datetime.html.twig
index 25ef788..be24df5 100644
--- a/core/modules/system/templates/datetime.html.twig
+++ b/core/modules/system/templates/datetime.html.twig
@@ -25,5 +25,4 @@
* @see http://www.w3.org/TR/html5-author/the-time-element.html#attr-time-datetime
*/
#}
-{# @todo Revisit once http://drupal.org/node/1825952 is resolved. #}
diff --git a/core/modules/system/templates/status-report.html.twig b/core/modules/system/templates/status-report.html.twig
new file mode 100644
index 0000000..d01f163
--- /dev/null
+++ b/core/modules/system/templates/status-report.html.twig
@@ -0,0 +1,43 @@
+{#
+/**
+ * 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_class: The HTML class of the severity.
+ *
+ * @see template_preprocess_status_report()
+ *
+ * @ingroup themeable
+ */
+#}
+
+
+
+
{{ 'Status'|t }}
{{ 'Component'|t }}
{{ 'Details'|t }}
+
+
+
+ {% for requirement in requirements %}
+
+
+
+ {{ requirement.severity_title }}
+
+
+
{{ requirement.title }}
+
+ {{ requirement.value }}
+ {% if requirement.description %}
+
{{ requirement.description }}
+ {% endif %}
+
+
+ {% endfor %}
+
+
diff --git a/core/modules/system/templates/system-admin-index.html.twig b/core/modules/system/templates/system-admin-index.html.twig
new file mode 100644
index 0000000..9b3282f
--- /dev/null
+++ b/core/modules/system/templates/system-admin-index.html.twig
@@ -0,0 +1,24 @@
+{#
+/**
+ * @file
+ * Default theme implementation for the admin index page.
+ *
+ * Available variables:
+ * - system_compact_link: Themed link to toggle compact view.
+ * - container: Container for admin blocks.
+ *
+ * @see template_preprocess_system_admin_index()
+ *
+ * @ingroup themeable
+ */
+#}
+
+ {{ system_compact_link }}
+ {% for position, container in containers %}
+
+ {% for block in container.blocks %}
+ {{ block }}
+ {% endfor %}
+
+ {% endfor %}
+
diff --git a/core/modules/system/templates/system-compact-link.html.twig b/core/modules/system/templates/system-compact-link.html.twig
new file mode 100644
index 0000000..2c021a5
--- /dev/null
+++ b/core/modules/system/templates/system-compact-link.html.twig
@@ -0,0 +1,12 @@
+{#
+/**
+ * @file
+ * Default theme implementation for a link to show or hide inline help
+ * descriptions.
+ *
+ * @see template_preprocess_system_compact_link()
+ *
+ * @ingroup themeable
+ */
+#}
+
{{ link }}
diff --git a/core/modules/system/templates/system-modules-details.html.twig b/core/modules/system/templates/system-modules-details.html.twig
new file mode 100644
index 0000000..966c03e
--- /dev/null
+++ b/core/modules/system/templates/system-modules-details.html.twig
@@ -0,0 +1,14 @@
+{#
+/**
+ * @file
+ * Default theme implementation to display the modules form.
+ *
+ * Available variables:
+ * - content: File form element html.
+ *
+ * @see template_preprocess_system_modules_details()
+ *
+ * @ingroup themeable
+ */
+#}
+{{ content }}
diff --git a/core/modules/system/templates/system-powered-by.html.twig b/core/modules/system/templates/system-powered-by.html.twig
new file mode 100644
index 0000000..4223684
--- /dev/null
+++ b/core/modules/system/templates/system-powered-by.html.twig
@@ -0,0 +1,11 @@
+{#
+/**
+ * @file
+ * Default theme implementation for the Powered by Drupal text.
+ *
+ * @see template_preprocess_system_powered_by()
+ *
+ * @ingroup themeable
+ */
+#}
+{{ 'Powered by Drupal'|t }}
diff --git a/core/modules/system/templates/system-themes-page.html.twig b/core/modules/system/templates/system-themes-page.html.twig
new file mode 100644
index 0000000..d931ce2
--- /dev/null
+++ b/core/modules/system/templates/system-themes-page.html.twig
@@ -0,0 +1,59 @@
+{#
+/**
+ * @file
+ * Default theme implementation for the Appearance page.
+ *
+ * Available variables:
+ * - attributes: HTML element attributes.
+ * - theme_groups: A list of theme groups.
+ *
+ * Each theme_groups[group] contains a list of theme groups.
+ *
+ * Each group in theme_groups[group] contains:
+ * - attributes: Element attributes specific to this group.
+ * - title: Title for the theme group.
+ * - state: State of the theme group.
+ * - themes: A list of themes within that group.
+ *
+ * Each group.themes[theme] contains a a list of themes.
+ *
+ * Each theme in group.themes[theme] contains:
+ * - 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)
+ * - compatibility: Description of any incompatibility issues,
+ * if the theme is compatible, provides a list of links.
+ *
+ * @see template_preprocess_system_themes_page()
+ *
+ * @ingroup themeable
+ */
+#}
+