diff --git a/core/modules/system/lib/Drupal/system/Controller/SystemInfoController.php b/core/modules/system/lib/Drupal/system/Controller/SystemInfoController.php index af48c1f..7f7e1f8 100644 --- a/core/modules/system/lib/Drupal/system/Controller/SystemInfoController.php +++ b/core/modules/system/lib/Drupal/system/Controller/SystemInfoController.php @@ -53,7 +53,10 @@ public function __construct(SystemManager $systemManager) { public function status() { $requirements = $this->systemManager->listRequirements(); $this->systemManager->fixAnonymousUid(); - return theme('status_report', array('requirements' => $requirements)); + return array( + '#theme' => 'status_report', + '#requirements' => $requirements, + ); } /** diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 1cfea0c..37d5b8f 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -11,6 +11,7 @@ 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; @@ -47,10 +48,11 @@ function system_admin_config_page() { unset($item['localized_options']['attributes']['title']); } $block = $item; - $block['content'] = ''; - $block['content'] .= theme('admin_block_content', array('content' => system_admin_menu_block($item))); - if (!empty($block['content'])) { - $block['show'] = TRUE; + if ($content = system_admin_menu_block($item)) { + $block['content'] = array( + '#theme' => 'admin_block_content', + '#content' => $content, + ); } // Prepare for sorting as in function _menu_tree_check_access(). @@ -61,7 +63,10 @@ function system_admin_config_page() { } if ($blocks) { ksort($blocks); - return theme('admin_page', array('blocks' => $blocks)); + return array( + '#theme' => 'admin_page', + '#blocks' => $blocks, + ); } else { return t('You do not have any administrative items.'); @@ -82,12 +87,17 @@ function system_admin_config_page() { function system_admin_menu_block_page() { $item = menu_get_item(); if ($content = system_admin_menu_block($item)) { - $output = theme('admin_block_content', array('content' => $content)); + $build = array( + '#theme' => 'admin_block_content', + '#content' => $content, + ); } else { - $output = t('You do not have any administrative items.'); + $build = array( + '#markup' => t('You do not have any administrative items.'), + ); } - return $output; + return $build; } /** @@ -216,8 +226,12 @@ function system_themes_page() { uasort($theme_groups['enabled'], 'system_sort_themes'); drupal_alter('system_themes_page', $theme_groups); - $admin_form = drupal_get_form('system_themes_admin_form', $admin_theme_options); - return theme('system_themes_page', array('theme_groups' => $theme_groups, 'theme_group_titles' => $theme_group_titles)) . drupal_render($admin_form); + return array( + '#theme' => 'system_themes_page', + '#theme_groups' => $theme_groups, + '#theme_group_titles' => $theme_group_titles, + '#admin_theme_options' => $admin_theme_options, + ); } /** @@ -992,9 +1006,12 @@ function _system_modules_build_row($info, $extra) { } else { $form['enable'] = array( - '#markup' => theme('image', array('uri' => 'core/misc/watchdog-error.png', 'alt' => $status_short, 'title' => $status_short)), + '#theme' => 'image', + '#uri' => 'core/misc/watchdog-error.png', + '#alt' => $status_short, + '#title' => $status_short, ); - $form['description']['#markup'] .= theme('system_modules_incompatible', array('message' => $status_long)); + $form['description']['#markup'] .= '
' . $status_long . '
'; } // Build operation links. @@ -1272,45 +1289,9 @@ function system_batch_page() { } /** - * Returns HTML for an administrative block for display. - * - * @param $variables - * An associative array containing: - * - block: An array containing information about the block: - * - show: A Boolean whether to output the block. Defaults to FALSE. - * - title: The block's title. - * - content: (optional) Formatted content for the block. - * - description: (optional) Description of the block. Only output if - * 'content' is not set. + * Prepares variables for administrative content block template. * - * @ingroup themeable - */ -function theme_admin_block($variables) { - $block = $variables['block']; - $output = ''; - - // Don't display the block if it has no content to display. - if (empty($block['show'])) { - return $output; - } - - $output .= '
'; - if (!empty($block['title'])) { - $output .= '

' . $block['title'] . '

'; - } - if (!empty($block['content'])) { - $output .= '
' . $block['content'] . '
'; - } - else { - $output .= '
' . $block['description'] . '
'; - } - $output .= '
'; - - return $output; -} - -/** - * Returns HTML for the content of an administrative block. + * Default template: admin-block-content.html.twig. * * @param $variables * An associative array containing: @@ -1321,29 +1302,29 @@ function theme_admin_block($variables) { * * @ingroup themeable */ -function theme_admin_block_content($variables) { - $content = $variables['content']; - $output = ''; - - if (!empty($content)) { - $class = 'admin-list'; - if ($compact = system_admin_compact_mode()) { - $class .= ' compact'; +function template_preprocess_admin_block_content(&$variables) { + if (!empty($variables['content'])) { + $compact = system_admin_compact_mode(); + $variables['attributes'] = array('class' => array('admin-list')); + if ($compact) { + $variables['attributes']['class'][] = 'compact'; } - $output .= '
'; - foreach ($content as $item) { - $output .= '
' . l($item['title'], $item['href'], $item['localized_options']) . '
'; + foreach ($variables['content'] as $key => $item) { + $variables['content'][$key]['link'] = l($item['title'], $item['href'], $item['localized_options']); if (!$compact && isset($item['description'])) { - $output .= '
' . filter_xss_admin($item['description']) . '
'; + $variables['content'][$key]['description'] = filter_xss_admin($item['description']); + } + else { + $variables['content'][$key]['description'] = FALSE; } } - $output .= '
'; } - return $output; } /** - * Returns HTML for an administrative page. + * Prepares variables for administrative index page templates. + * + * Default template: admin-page.html.twig. * * @param $variables * An associative array containing: @@ -1354,100 +1335,86 @@ function theme_admin_block_content($variables) { * * @ingroup themeable */ -function theme_admin_page($variables) { - $blocks = $variables['blocks']; - +function template_preprocess_admin_page(&$variables) { + $variables['system_compact_link'] = array( + '#theme' => 'system_compact_link', + ); + $variables['containers'] = array(); $stripe = 0; - $container = array(); - - foreach ($blocks as $block) { - if ($block_output = theme('admin_block', array('block' => $block))) { + foreach ($variables['blocks'] as $Block) { + $block = (array) $Block; + if ($block['show'] = !empty($block['content'])) { if (empty($block['position'])) { // perform automatic striping. $block['position'] = ++$stripe % 2 ? 'left' : 'right'; } - if (!isset($container[$block['position']])) { - $container[$block['position']] = ''; + if (!isset($variables['containers'][$block['position']])) { + $variables['containers'][$block['position']] = array('blocks' => array()); } - $container[$block['position']] .= $block_output; + $variables['containers'][$block['position']]['blocks'][] = array( + '#theme' => 'admin_block', + '#block' => $block, + ); } } - - $output = '
'; - $output .= theme('system_compact_link'); - - foreach ($container as $id => $data) { - $output .= '
'; - $output .= $data; - $output .= '
'; - } - $output .= '
'; - return $output; } /** - * Returns HTML for the output of the admin index page. + * Prepares variables for admin index template. + * + * Default template: system-admin-index.html.twig. * * @param $variables * An associative array containing: * - menu_items: An array of modules to be displayed. * + * @todo Remove this once http://drupal.org/node/1842232 is resolved. + * * @ingroup themeable */ -function theme_system_admin_index($variables) { - $menu_items = $variables['menu_items']; - +function template_preprocess_system_admin_index(&$variables) { + $variables['system_compact_link'] = array( + '#theme' => 'system_compact_link' + ); + $variables['containers'] = array(); $stripe = 0; - $container = array('left' => '', 'right' => ''); - $flip = array('left' => 'right', 'right' => 'left'); - $position = 'left'; - // Iterate over all modules. - foreach ($menu_items as $module => $block) { + foreach ($variables['menu_items'] as $module => $block) { list($description, $items) = $block; - + $position = ++$stripe % 2 ? 'left' : 'right'; // Output links. if (count($items)) { - $block = array(); - $block['title'] = $module; - $block['content'] = theme('admin_block_content', array('content' => $items)); - $block['description'] = t($description); - $block['show'] = TRUE; - - if ($block_output = theme('admin_block', array('block' => $block))) { - if (!isset($block['position'])) { - // Perform automatic striping. - $block['position'] = $position; - $position = $flip[$position]; - } - $container[$block['position']] .= $block_output; - } + $variables['containers'][$position]['blocks'][] = array( + '#theme' => 'admin_block', + '#block' => array( + 'position' => $position, + 'title' => $module, + 'show' => TRUE, + 'content' => array( + '#theme' => 'admin_block_content', + '#content' => $items, + ), + 'description' => t($description), + ), + ); } } - - $output = '
'; - $output .= theme('system_compact_link'); - foreach ($container as $id => $data) { - $output .= '
'; - $output .= $data; - $output .= '
'; - } - $output .= '
'; - - return $output; } /** - * Returns HTML for the status report. + * Prepares variables for status report template. + * + * Default template: status-report.html.twig. * * @param $variables * An associative array containing: * - requirements: An array of requirements. + * Properties used: severity.title, severity.class, + * requirement.title, requirement.value, requirement.description * * @ingroup themeable */ -function theme_status_report($variables) { - $requirements = $variables['requirements']; +function template_preprocess_status_report(&$variables) { $severities = array( REQUIREMENT_INFO => array( 'title' => t('Info'), @@ -1466,11 +1433,8 @@ function theme_status_report($variables) { 'class' => 'error', ), ); - $output = ''; - $output .= ''; - $output .= ''; - foreach ($requirements as $requirement) { + foreach ($variables['requirements'] as $i => $requirement) { if (empty($requirement['#type'])) { // Always use the explicit requirement severity, if defined. Otherwise, // default to REQUIREMENT_OK in the installer to visually confirm that @@ -1486,22 +1450,10 @@ function theme_status_report($variables) { $severity = $severities[REQUIREMENT_INFO]; } - $severity['icon'] = '
' . $severity['title'] . '
'; - - // Output table rows. - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $variables['requirements'][$i]['severity_class'] = $severity['class']; + $variables['requirements'][$i]['severity_title'] = $severity['title']; } } - - $output .= '
' . t('Status') . '' . t('Component') . '' . t('Details') . '
' . $severity['icon'] . '' . $requirement['title'] . '' . $requirement['value']; - if (!empty($requirement['description'])) { - $output .= '
' . $requirement['description'] . '
'; - } - $output .= '
'; - return $output; } /** @@ -1573,19 +1525,6 @@ function theme_system_modules_details($variables) { } /** - * Returns HTML for a message about incompatible modules. - * - * @param $variables - * An associative array containing: - * - message: The form array representing the currently disabled modules. - * - * @ingroup themeable - */ -function theme_system_modules_incompatible($variables) { - return '
' . $variables['message'] . '
'; -} - -/** * Returns HTML for a table of currently disabled modules. * * @param $variables @@ -1635,7 +1574,9 @@ function theme_system_modules_uninstall($variables) { } /** - * Returns HTML for the Appearance page. + * Prepares variables for the appearance page template. + * + * Default template: system-themes-page.html.twig. * * @param $variables * An associative array containing: @@ -1643,10 +1584,10 @@ function theme_system_modules_uninstall($variables) { * * @ingroup themeable */ -function theme_system_themes_page($variables) { +function template_preprocess_system_themes_page(&$variables) { + $groups = array(); $theme_groups = $variables['theme_groups']; - - $output = '
'; + $variables['attributes']['id'] = 'system-themes-page'; foreach ($variables['theme_group_titles'] as $state => $title) { if (!count($theme_groups[$state])) { @@ -1654,48 +1595,68 @@ function theme_system_themes_page($variables) { continue; } // Start new theme group. - $output .= '

'. $title .'

'; + $theme_group = array(); + $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'))); - foreach ($theme_groups[$state] as $theme) { - // Theme the screenshot. - $screenshot = $theme->screenshot ? theme('image', $theme->screenshot) : '
' . t('no screenshot') . '
'; + foreach ($theme_groups[$state] as $theme) { + $current_theme = array(); + + // Screenshot depicting the theme. + if ($theme->screenshot) { + $current_theme['screenshot'] = array( + '#theme' => 'image', + '#uri' => $theme->screenshot['uri'], + '#alt' => $theme->screenshot['alt'], + '#title' => $theme->screenshot['title'], + '#attributes' => $theme->screenshot['attributes'], + ); + } // Localize the theme description. - $description = t($theme->info['description']); + $current_theme['description'] = t($theme->info['description']); // Style theme info - $notes = count($theme->notes) ? ' (' . join(', ', $theme->notes) . ')' : ''; $theme->classes[] = 'theme-selector'; $theme->classes[] = 'clearfix'; - $output .= '
' . $screenshot . '

' . $theme->info['name'] . ' ' . (isset($theme->info['version']) ? $theme->info['version'] : '') . $notes . '

' . $description . '
'; + $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'])) . '
'; + $current_theme['compatibility'] = t('This theme requires the theme engine @theme_engine to operate correctly.', array('@theme_engine' => $theme->info['engine'])); } else { - $output .= theme('links', array('links' => $theme->operations, 'attributes' => array('class' => array('operations', 'clearfix')))); + $current_theme['compatibility'] = array( + '#theme' => 'links', + '#links' => $theme->operations, + '#attributes' => array('class' => array('operations', 'clearfix')), + ); } - $output .= '
'; + $theme_group['themes'][] = $current_theme; } - $output .= '
'; + $groups[] = $theme_group; } - $output .= '
'; + $variables['theme_groups'] = $groups; + $variables['admin_form'] = drupal_get_form('system_themes_admin_form', $variables['admin_theme_options']); - return $output; } /** @@ -1706,7 +1667,7 @@ function system_date_time_formats() { array('data' => t('Machine name'), 'field' => 'machine_name'), array('data' => t('Name'), 'field' => 'name'), array('data' => t('Pattern'), 'field' => 'pattern'), - array('data' => t('Operations')) + array('data' => t('Operations')), ); $rows = array(); @@ -1791,7 +1752,11 @@ function system_date_format_language_overview_page() { $rows[] = $row; } - return theme('table', array('header' => $header, 'rows' => $rows)); + return array( + '#theme' => 'table', + '#header' => $header, + '#rows' => $rows + ); } /** diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 6a1f766..d8785c0 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -8,8 +8,8 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Cache\Cache; use Drupal\Core\Language\Language; -use Drupal\Core\Utility\ModuleInfo; use Drupal\Core\TypedData\Primitive; +use Drupal\Core\Utility\ModuleInfo; use Drupal\system\Plugin\Block\SystemMenuBlock; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; @@ -139,8 +139,13 @@ function system_help($path, $arg) { function system_theme() { return array_merge(drupal_common_theme(), array( 'system_themes_page' => array( - 'variables' => array('theme_groups' => NULL), + 'variables' => array( + 'theme_groups' => array(), + 'theme_group_titles' => array(), + 'admin_theme_options' => array(), + ), 'file' => 'system.admin.inc', + 'template' => 'system-themes-page', ), 'system_config_form' => array( 'render element' => 'form', @@ -152,46 +157,49 @@ function system_theme() { 'render element' => 'form', 'file' => 'system.admin.inc', ), - 'system_modules_incompatible' => array( - 'variables' => array('message' => NULL), - 'file' => 'system.admin.inc', - ), 'system_modules_uninstall' => array( 'render element' => 'form', 'file' => 'system.admin.inc', ), 'status_report' => array( - 'render element' => 'requirements', + 'variables' => array('requirements' => NULL), 'file' => 'system.admin.inc', + 'template' => 'status-report' ), 'admin_page' => array( 'variables' => array('blocks' => NULL), 'file' => 'system.admin.inc', + 'template' => 'admin-page', ), 'admin_block' => array( 'variables' => array('block' => NULL), 'file' => 'system.admin.inc', + 'template' => 'admin-block', ), 'admin_block_content' => array( 'variables' => array('content' => NULL), 'file' => 'system.admin.inc', + 'template' => 'admin-block-content', ), 'system_admin_index' => array( 'variables' => array('menu_items' => NULL), 'file' => 'system.admin.inc', + 'template' => 'system-admin-index', ), 'system_powered_by' => array( 'variables' => array(), + 'template' => 'system-powered-by', ), 'system_compact_link' => array( 'variables' => array(), + 'template' => 'system-compact-link', ), 'system_date_format_localize_form' => array( 'render element' => 'form', ), 'system_plugin_ui_form' => array( - 'template' => 'system-plugin-ui-form', 'render element' => 'form', + 'template' => 'system-plugin-ui-form', ), )); } @@ -2633,7 +2641,7 @@ function system_preprocess_block(&$variables) { * @param array $variables * An associative array containing: * - form: The plugin form elements. -*/ + */ function template_preprocess_system_plugin_ui_form(&$variables) { drupal_add_css(drupal_get_path('module', 'system') . '/css/system.plugin.ui.css'); } @@ -3513,30 +3521,25 @@ function system_timezone($abbreviation = '', $offset = -1, $is_daylight_saving_t } /** - * Returns HTML for the Powered by Drupal text. + * Prepare variables for system compact link templates. * - * @ingroup themeable - */ -function theme_system_powered_by() { - return '' . t('Powered by Drupal', array('@poweredby' => 'http://drupal.org')) . ''; -} - -/** - * Returns HTML for a link to show or hide inline help descriptions. + * Default template: system-compact-link.html.twig. * * @ingroup themeable */ -function theme_system_compact_link() { - $output = ''; - - return $output; } /** @@ -3785,6 +3788,7 @@ function theme_system_config_form($variables) { * A string containing an HTML-formatted form. * * @ingroup themeable + * @todo Move this out of system.module and back into theme.inc. */ function theme_exposed_filters($variables) { $form = $variables['form']; 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..1900082 --- /dev/null +++ b/core/modules/system/templates/admin-block-content.html.twig @@ -0,0 +1,29 @@ +{# +/** + * @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: Remaining HTML attributes to be aded to the element. + * - is_compact_mode: It defines if compact mode is used. + * + * @see template_preprocess() + * @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..8e9bc96 --- /dev/null +++ b/core/modules/system/templates/admin-block.html.twig @@ -0,0 +1,31 @@ +{# +/** + * @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() + * @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..c3c42f0 --- /dev/null +++ b/core/modules/system/templates/admin-page.html.twig @@ -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. + * + * @see template_preprocess() + * @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/status-report.html.twig b/core/modules/system/templates/status-report.html.twig new file mode 100644 index 0000000..57b279d --- /dev/null +++ b/core/modules/system/templates/status-report.html.twig @@ -0,0 +1,46 @@ +{# +/** + * Default theme implementation for the status report. + * + * Available variables: + * - requirements: Contains multiple requirement instances. + * Each requirement contains: + * - title: @todo. + * - value: @todo. + * - description: @todo. + * - severity: The severity of error. + * Contains: + * - title: @todo. + * - class: @todo. + * + * @see template_preprocess() + * @see template_preprocess_status_report() + * + * @ingroup themeable + */ +#} + + + + + + + + {% for requirement in requirements %} + + + + + + {% endfor %} + +
{{ 'Status'|t }}{{ 'Component'|t }}{{ 'Details'|t }}
+
+ {{ requirement.severity_title }} +
+
{{ requirement.title }} + {{ requirement.value }} + {% if requirement.description %} +
{{ requirement.description }}
+ {% endif %} +
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..d60f11a --- /dev/null +++ b/core/modules/system/templates/system-admin-index.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @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() + * @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..a18efda --- /dev/null +++ b/core/modules/system/templates/system-compact-link.html.twig @@ -0,0 +1,13 @@ +{# +/** + * @file + * Default theme implementation for a link to show or hide inline help + * descriptions. + * + * @see template_preprocess() + * @see template_preprocess_system_compact_link() + * + * @ingroup themeable + */ +#} + 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..0f946c4 --- /dev/null +++ b/core/modules/system/templates/system-modules-details.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Default theme implementation to display the modules form. + * + * Available variables: + * - content: File form element html. + * + * @see template_preprocess() + * @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..fa7dd32 --- /dev/null +++ b/core/modules/system/templates/system-powered-by.html.twig @@ -0,0 +1,12 @@ +{# +/** + * @file + * Default theme implementation for the Powered by Drupal text. + * + * @see template_preprocess() + * @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..23fc836 --- /dev/null +++ b/core/modules/system/templates/system-themes-page.html.twig @@ -0,0 +1,60 @@ +{# +/** + * @file + * Default theme implementation for the Appearance page. + * + * Available variables: + * - attributes: HTML element attributes. + * - theme_groups: An array of theme groups. + * + * Each theme_groups[group] contains an array 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: An array of themes within that group. + * + * Each group.themes[theme] contains an array 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() + * @see template_preprocess_system_themes_page() + * + * @ingroup themeable + */ +#} + + {% for theme_group in theme_groups %} + +

{{ theme_group.title }}

+ {% for theme in theme_group.themes %} + + {% if theme.screenshot %} + {{ theme.screenshot }} + {% else %} +
+
{{ "no screenshot"|t }}
+
+ {% endif %} +
+

{{ theme.name }} {{ theme.version }} {{ theme.notes }}

+
{{ theme.description }}
+ {{ theme.compatibility }} +
+ + {% endfor %} + + {% endfor %} + +{{ admin_form }}