diff --git a/core/modules/block/src/Tests/BlockTest.php b/core/modules/block/src/Tests/BlockTest.php index 843af6db262a78d12b293c05dc2a0337db569762..bd360f680afc7ded89e8a6f6ea1e2eab7c69fd04 100644 --- a/core/modules/block/src/Tests/BlockTest.php +++ b/core/modules/block/src/Tests/BlockTest.php @@ -410,6 +410,22 @@ public function testBlockCacheTags() { $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS'); } + /** + * Tests that a link exists to block layout from the appearance form. + */ + public function testThemeAdminLink() { + $this->drupalPlaceBlock('help_block', ['region' => 'help']); + $theme_admin = $this->drupalCreateUser([ + 'administer blocks', + 'administer themes', + 'access administration pages', + ]); + $this->drupalLogin($theme_admin); + $this->drupalGet('admin/appearance'); + $this->assertText('You can place blocks for each theme on the block layout page'); + $this->assertLinkByHref('admin/structure/block'); + } + /** * Tests that uninstalling a theme removes its block configuration. */ diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 923e722027b5af55da4ba4c9216cd529cda290c4..c12a2d4b979872b09e2ac4b7acd0c064b552effa 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -105,6 +105,9 @@ function system_help($route_name, RouteMatchInterface $route_match) { case 'system.themes_page': $output = '

' . t('Set and configure the default theme for your website. Alternative themes are available.', array('!themes' => 'https://www.drupal.org/project/themes')) . '

'; + if (\Drupal::moduleHandler()->moduleExists('block')) { + $output .= '

' . t('You can place blocks for each theme on the block layout page.', array('@blocks' => \Drupal::url('block.admin_display'))) . '

'; + } return $output; case 'system.theme_settings_theme':