Issue #2513556 by dcmul, mohit_aghera, cilefen, subhojit777, hussainweb, Bojhan, eliza411, ivanstegic, LewisNyman, lunk_rat, nickrosencrans, stpaultim, Mark LaCroix, webchick: Add a link to the Block Layout page on the Appearance page
parent
1588637417
commit
46d59d6c8a
|
@ -410,6 +410,22 @@ class BlockTest extends BlockTestBase {
|
|||
$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.
|
||||
*/
|
||||
|
|
|
@ -105,6 +105,9 @@ function system_help($route_name, RouteMatchInterface $route_match) {
|
|||
|
||||
case 'system.themes_page':
|
||||
$output = '<p>' . t('Set and configure the default theme for your website. Alternative <a href="!themes">themes</a> are available.', array('!themes' => 'https://www.drupal.org/project/themes')) . '</p>';
|
||||
if (\Drupal::moduleHandler()->moduleExists('block')) {
|
||||
$output .= '<p>' . t('You can place blocks for each theme on the <a href="@blocks">block layout</a> page.', array('@blocks' => \Drupal::url('block.admin_display'))) . '</p>';
|
||||
}
|
||||
return $output;
|
||||
|
||||
case 'system.theme_settings_theme':
|
||||
|
|
Loading…
Reference in New Issue