diff --git a/core/modules/block_content/src/Tests/BlockContentTestBase.php b/core/modules/block_content/src/Tests/BlockContentTestBase.php index 4b59eaa..4500fd0 100644 --- a/core/modules/block_content/src/Tests/BlockContentTestBase.php +++ b/core/modules/block_content/src/Tests/BlockContentTestBase.php @@ -60,7 +60,7 @@ protected function setUp() { } $this->adminUser = $this->drupalCreateUser($this->permissions); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/config/src/Tests/ConfigEntityListTest.php b/core/modules/config/src/Tests/ConfigEntityListTest.php index 0987c13..209039a 100644 --- a/core/modules/config/src/Tests/ConfigEntityListTest.php +++ b/core/modules/config/src/Tests/ConfigEntityListTest.php @@ -33,7 +33,7 @@ protected function setUp() { // Delete the override config_test entity since it is not required by this // test. \Drupal::entityManager()->getStorage('config_test')->load('override')->delete(); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/contact/src/Tests/ContactSitewideTest.php b/core/modules/contact/src/Tests/ContactSitewideTest.php index a3cbd6e..9cb6910 100644 --- a/core/modules/contact/src/Tests/ContactSitewideTest.php +++ b/core/modules/contact/src/Tests/ContactSitewideTest.php @@ -39,7 +39,7 @@ class ContactSitewideTest extends WebTestBase { protected function setUp() { parent::setUp(); $this->drupalPlaceBlock('system_breadcrumb_block'); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/field_ui/src/Tests/EntityDisplayModeTest.php b/core/modules/field_ui/src/Tests/EntityDisplayModeTest.php index 6c1a984..62b2768 100644 --- a/core/modules/field_ui/src/Tests/EntityDisplayModeTest.php +++ b/core/modules/field_ui/src/Tests/EntityDisplayModeTest.php @@ -29,7 +29,7 @@ class EntityDisplayModeTest extends WebTestBase { protected function setUp() { parent::setUp(); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/field_ui/src/Tests/ManageFieldsTest.php b/core/modules/field_ui/src/Tests/ManageFieldsTest.php index 9b29f4d..28517fc 100644 --- a/core/modules/field_ui/src/Tests/ManageFieldsTest.php +++ b/core/modules/field_ui/src/Tests/ManageFieldsTest.php @@ -68,7 +68,7 @@ protected function setUp() { parent::setUp(); $this->drupalPlaceBlock('system_breadcrumb_block'); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); $this->drupalPlaceBlock('system_tabs_block'); // Create a test user. diff --git a/core/modules/filter/src/Tests/FilterAdminTest.php b/core/modules/filter/src/Tests/FilterAdminTest.php index 6b60392..897943cf 100644 --- a/core/modules/filter/src/Tests/FilterAdminTest.php +++ b/core/modules/filter/src/Tests/FilterAdminTest.php @@ -105,7 +105,7 @@ protected function setUp() { user_role_grant_permissions('authenticated', array($basic_html_format->getPermissionName())); user_role_grant_permissions('anonymous', array($restricted_html_format->getPermissionName())); $this->drupalLogin($this->adminUser); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/forum/src/Tests/ForumTest.php b/core/modules/forum/src/Tests/ForumTest.php index 8d0348b..e80e9ad 100644 --- a/core/modules/forum/src/Tests/ForumTest.php +++ b/core/modules/forum/src/Tests/ForumTest.php @@ -115,7 +115,7 @@ protected function setUp() { 'access comments', )); $this->drupalPlaceBlock('help_block', array('region' => 'help')); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/language/src/Tests/LanguagePathMonolingualTest.php b/core/modules/language/src/Tests/LanguagePathMonolingualTest.php index 7f590ac..a4c92c0 100644 --- a/core/modules/language/src/Tests/LanguagePathMonolingualTest.php +++ b/core/modules/language/src/Tests/LanguagePathMonolingualTest.php @@ -56,7 +56,7 @@ protected function setUp() { // Set language detection to URL. $edit = array('language_interface[enabled][language-url]' => TRUE); $this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings')); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/language/src/Tests/LanguageTourTest.php b/core/modules/language/src/Tests/LanguageTourTest.php index 492d2c7..91cbdab 100644 --- a/core/modules/language/src/Tests/LanguageTourTest.php +++ b/core/modules/language/src/Tests/LanguageTourTest.php @@ -37,7 +37,7 @@ protected function setUp() { parent::setUp(); $this->adminUser = $this->drupalCreateUser(array('administer languages', 'access tour')); $this->drupalLogin($this->adminUser); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/page_cache/src/Tests/PageCacheTagsIntegrationTest.php b/core/modules/page_cache/src/Tests/PageCacheTagsIntegrationTest.php index 329e63f..2965267 100644 --- a/core/modules/page_cache/src/Tests/PageCacheTagsIntegrationTest.php +++ b/core/modules/page_cache/src/Tests/PageCacheTagsIntegrationTest.php @@ -103,7 +103,7 @@ function testPageCacheTags() { 'config:block.block.bartik_main_menu', 'config:block.block.bartik_account_menu', 'config:block.block.bartik_messages', - 'config:block.block.bartik_action_links', + 'config:block.block.bartik_local_actions', 'config:block.block.bartik_tabs', 'node_view', 'node:' . $node_1->id(), @@ -139,7 +139,7 @@ function testPageCacheTags() { 'config:block.block.bartik_main_menu', 'config:block.block.bartik_account_menu', 'config:block.block.bartik_messages', - 'config:block.block.bartik_action_links', + 'config:block.block.bartik_local_actions', 'config:block.block.bartik_tabs', 'node_view', 'node:' . $node_2->id(), diff --git a/core/modules/shortcut/src/Tests/ShortcutSetsTest.php b/core/modules/shortcut/src/Tests/ShortcutSetsTest.php index 9a70adf..948d0db 100644 --- a/core/modules/shortcut/src/Tests/ShortcutSetsTest.php +++ b/core/modules/shortcut/src/Tests/ShortcutSetsTest.php @@ -30,7 +30,7 @@ class ShortcutSetsTest extends ShortcutTestBase { protected function setUp() { parent::setUp(); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/system/src/Plugin/Block/SystemActionLinksBlock.php b/core/modules/system/src/Plugin/Block/SystemLocalActionsBlock.php similarity index 82% rename from core/modules/system/src/Plugin/Block/SystemActionLinksBlock.php rename to core/modules/system/src/Plugin/Block/SystemLocalActionsBlock.php index 54a8c44..23a65c0 100644 --- a/core/modules/system/src/Plugin/Block/SystemActionLinksBlock.php +++ b/core/modules/system/src/Plugin/Block/SystemLocalActionsBlock.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\system\Plugin\Block\SystemActionLinksBlock. + * Contains \Drupal\system\Plugin\Block\SystemLocalActionsBlock. */ namespace Drupal\system\Plugin\Block; @@ -15,17 +15,17 @@ use Drupal\Core\Routing\RouteMatchInterface; /** - * Provides a block to display the action links. + * Provides a block to display the local actions. * * @Block( - * id = "system_action_links_block", - * admin_label = @Translation("Action links") + * id = "system_local_actions_block", + * admin_label = @Translation("Primary admin actions") * ) */ -class SystemActionLinksBlock extends BlockBase implements ContainerFactoryPluginInterface { +class SystemLocalActionsBlock extends BlockBase implements ContainerFactoryPluginInterface { /** - * The local action manger. + * The local action manager. * * @var \Drupal\Core\Menu\LocalActionManagerInterface */ @@ -85,12 +85,12 @@ public function build() { $build = []; $links = menu_local_tasks(); $route_name = $this->routeMatch->getRouteName(); - $action_links = $this->localActionManager->getActionsForRoute($route_name) + $links['actions']; - if (empty($action_links)) { + $local_actions = $this->localActionManager->getActionsForRoute($route_name) + $links['actions']; + if (empty($local_actions)) { return []; } - $build['action_links'] = $action_links; + $build['local_actions'] = $local_actions; return $build; } @@ -101,7 +101,7 @@ public function build() { public function buildConfigurationForm(array $form, FormStateInterface $form_state) { $form = parent::buildConfigurationForm($form, $form_state); - // The "Local actions" block is never cacheable because hooks creating local + // The "Primary admin actions" block is never cacheable because hooks creating local // actions don't provide cacheability metadata. // @todo Remove after https://www.drupal.org/node/2511516 has landed. $form['cache']['#disabled'] = TRUE; diff --git a/core/modules/system/src/Tests/Menu/LocalActionTest.php b/core/modules/system/src/Tests/Menu/LocalActionTest.php index 0fd12b1..bd1c593 100644 --- a/core/modules/system/src/Tests/Menu/LocalActionTest.php +++ b/core/modules/system/src/Tests/Menu/LocalActionTest.php @@ -30,7 +30,7 @@ class LocalActionTest extends WebTestBase { protected function setUp() { parent::setUp(); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/system/src/Tests/System/DateTimeTest.php b/core/modules/system/src/Tests/System/DateTimeTest.php index 4a5d9ee..9817fc6 100644 --- a/core/modules/system/src/Tests/System/DateTimeTest.php +++ b/core/modules/system/src/Tests/System/DateTimeTest.php @@ -29,7 +29,7 @@ protected function setUp() { // Create admin user and log in admin user. $this->drupalLogin ($this->drupalCreateUser(array('administer site configuration'))); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 4970e2f..028190a 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -805,8 +805,8 @@ function system_preprocess_block(&$variables) { } break; - case 'system_action_links_block': - $variables['content'] = $variables['content']['action_links']; + case 'system_local_actions_block': + $variables['content'] = $variables['content']['local_actions']; break; case 'system_tabs_block': diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php index 2696a9e..1ef3e47 100644 --- a/core/modules/taxonomy/src/Tests/TermTest.php +++ b/core/modules/taxonomy/src/Tests/TermTest.php @@ -48,7 +48,7 @@ class TermTest extends TaxonomyTestBase { protected function setUp() { parent::setUp(); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); $this->drupalPlaceBlock('system_tabs_block'); $this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'bypass node access'])); diff --git a/core/modules/taxonomy/src/Tests/VocabularyUiTest.php b/core/modules/taxonomy/src/Tests/VocabularyUiTest.php index 5f99c04..69eba32 100644 --- a/core/modules/taxonomy/src/Tests/VocabularyUiTest.php +++ b/core/modules/taxonomy/src/Tests/VocabularyUiTest.php @@ -29,7 +29,7 @@ protected function setUp() { parent::setUp(); $this->drupalLogin($this->drupalCreateUser(['administer taxonomy'])); $this->vocabulary = $this->createVocabulary(); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/tour/src/Tests/TourTest.php b/core/modules/tour/src/Tests/TourTest.php index 232aece..582e6d4 100644 --- a/core/modules/tour/src/Tests/TourTest.php +++ b/core/modules/tour/src/Tests/TourTest.php @@ -47,7 +47,7 @@ class TourTest extends TourTestBasic { protected function setUp() { parent::setUp(); - $this->drupalPlaceBlock('system_action_links_block', [ + $this->drupalPlaceBlock('system_local_actions_block', [ 'theme' => 'seven', 'region' => 'content' ]); diff --git a/core/modules/tracker/src/Tests/TrackerTest.php b/core/modules/tracker/src/Tests/TrackerTest.php index 3c23a5a..5776c10 100644 --- a/core/modules/tracker/src/Tests/TrackerTest.php +++ b/core/modules/tracker/src/Tests/TrackerTest.php @@ -55,7 +55,7 @@ protected function setUp() { $this->otherUser = $this->drupalCreateUser($permissions); $this->addDefaultCommentField('node', 'page'); $this->drupalPlaceBlock('system_tabs_block', ['id' => 'page_tabs_block']); - $this->drupalPlaceBlock('system_action_links_block', ['id' => 'page_actions_block']); + $this->drupalPlaceBlock('system_local_actions_block', ['id' => 'page_actions_block']); } /** diff --git a/core/modules/update/src/Tests/UpdateCoreTest.php b/core/modules/update/src/Tests/UpdateCoreTest.php index 91d46fb..3222340 100644 --- a/core/modules/update/src/Tests/UpdateCoreTest.php +++ b/core/modules/update/src/Tests/UpdateCoreTest.php @@ -28,7 +28,7 @@ protected function setUp() { parent::setUp(); $admin_user = $this->drupalCreateUser(array('administer site configuration', 'administer modules', 'administer themes')); $this->drupalLogin($admin_user); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } /** diff --git a/core/modules/views/src/Tests/Wizard/WizardTestBase.php b/core/modules/views/src/Tests/Wizard/WizardTestBase.php index c0b421a..85f79e8 100644 --- a/core/modules/views/src/Tests/Wizard/WizardTestBase.php +++ b/core/modules/views/src/Tests/Wizard/WizardTestBase.php @@ -27,7 +27,7 @@ protected function setUp() { // Create and log in a user with administer views permission. $views_admin = $this->drupalCreateUser(array('administer views', 'administer blocks', 'bypass node access', 'access user profiles', 'view all revisions')); $this->drupalLogin($views_admin); - $this->drupalPlaceBlock('system_action_links_block'); + $this->drupalPlaceBlock('system_local_actions_block'); } } diff --git a/core/profiles/minimal/config/install/block.block.stark_action_links.yml b/core/profiles/minimal/config/install/block.block.stark_local_actions.yml similarity index 60% rename from core/profiles/minimal/config/install/block.block.stark_action_links.yml rename to core/profiles/minimal/config/install/block.block.stark_local_actions.yml index cbe47ce..aed4cad 100644 --- a/core/profiles/minimal/config/install/block.block.stark_action_links.yml +++ b/core/profiles/minimal/config/install/block.block.stark_local_actions.yml @@ -1,13 +1,13 @@ -id: stark_action_links +id: stark_local_actions theme: stark weight: -10 status: true langcode: en region: content -plugin: system_action_links_block +plugin: system_local_actions_block settings: - id: system_action_links_block - label: Action links + id: system_local_actions_block + label: Primary admin actions provider: system label_display: '0' dependencies: diff --git a/core/profiles/standard/config/install/block.block.bartik_action_links.yml b/core/profiles/standard/config/install/block.block.bartik_local_actions.yml similarity index 61% rename from core/profiles/standard/config/install/block.block.bartik_action_links.yml rename to core/profiles/standard/config/install/block.block.bartik_local_actions.yml index a6a6cc9..42aef3f 100644 --- a/core/profiles/standard/config/install/block.block.bartik_action_links.yml +++ b/core/profiles/standard/config/install/block.block.bartik_local_actions.yml @@ -1,13 +1,13 @@ -id: bartik_action_links +id: bartik_local_actions theme: bartik weight: -20 status: true langcode: en region: content -plugin: system_action_links_block +plugin: system_local_actions_block settings: - id: system_action_links_block - label: Action links + id: system_local_actions_block + label: Primary admin actions provider: system label_display: '0' dependencies: diff --git a/core/profiles/standard/config/install/block.block.seven_action_links.yml b/core/profiles/standard/config/install/block.block.seven_local_actions.yml similarity index 60% rename from core/profiles/standard/config/install/block.block.seven_action_links.yml rename to core/profiles/standard/config/install/block.block.seven_local_actions.yml index baf0cba..9577c20 100644 --- a/core/profiles/standard/config/install/block.block.seven_action_links.yml +++ b/core/profiles/standard/config/install/block.block.seven_local_actions.yml @@ -1,13 +1,13 @@ -id: seven_action_links +id: seven_local_actions theme: seven weight: -10 status: true langcode: en region: content -plugin: system_action_links_block +plugin: system_local_actions_block settings: - id: system_action_links_block - label: Action links + id: system_local_actions_block + label: Primary admin actions provider: system label_display: '0' dependencies: diff --git a/core/profiles/standard/config/install/block.block.seven_page_primary_tabs.yml b/core/profiles/standard/config/install/block.block.seven_page_primary_tabs.yml index 9743478..078f15b 100644 --- a/core/profiles/standard/config/install/block.block.seven_page_primary_tabs.yml +++ b/core/profiles/standard/config/install/block.block.seven_page_primary_tabs.yml @@ -3,7 +3,7 @@ theme: seven weight: 0 status: true langcode: en -region: primary_tabs +region: header plugin: system_tabs_block settings: id: system_tabs_block diff --git a/core/profiles/standard/config/install/block.block.seven_page_seconadry_tabs.yml b/core/profiles/standard/config/install/block.block.seven_page_seconadry_tabs.yml index 9bf8e3a..a7e2350 100644 --- a/core/profiles/standard/config/install/block.block.seven_page_seconadry_tabs.yml +++ b/core/profiles/standard/config/install/block.block.seven_page_seconadry_tabs.yml @@ -3,7 +3,7 @@ theme: seven weight: 0 status: true langcode: en -region: secondary_tabs +region: pre_content plugin: system_tabs_block settings: id: system_tabs_block diff --git a/core/themes/bartik/bartik.libraries.yml b/core/themes/bartik/bartik.libraries.yml index 009a67f..41cb460 100644 --- a/core/themes/bartik/bartik.libraries.yml +++ b/core/themes/bartik/bartik.libraries.yml @@ -19,7 +19,7 @@ global-styling: css/components/form.css: {} css/components/forum.css: {} css/components/header.css: {} - css/components/region-help.css: {} + css/components/help.css: {} css/components/item-list.css: {} css/components/list-group.css: {} css/components/node-preview.css: {} diff --git a/core/themes/bartik/css/components/region-help.css b/core/themes/bartik/css/components/help.css similarity index 66% rename from core/themes/bartik/css/components/region-help.css rename to core/themes/bartik/css/components/help.css index 3c16b0d..c606992 100644 --- a/core/themes/bartik/css/components/region-help.css +++ b/core/themes/bartik/css/components/help.css @@ -1,9 +1,9 @@ /** * @file - * Styles for the help region. + * Styles for the help block. */ -.region-help { +.block-help { border: 1px solid #d3d7d9; padding: 0 1.5em; margin-bottom: 30px; diff --git a/core/themes/classy/templates/block/block--system-action-links-block.html.twig b/core/themes/classy/templates/block/block--system-local-actions-block.html.twig similarity index 74% rename from core/themes/classy/templates/block/block--system-action-links-block.html.twig rename to core/themes/classy/templates/block/block--system-local-actions-block.html.twig index ce6b16f..2a0f5c4 100644 --- a/core/themes/classy/templates/block/block--system-action-links-block.html.twig +++ b/core/themes/classy/templates/block/block--system-local-actions-block.html.twig @@ -2,7 +2,7 @@ {# /** * @file - * Theme override for action links. + * Theme override for local actions (primary admin actions.) */ #} {% block content %} diff --git a/core/themes/seven/seven.info.yml b/core/themes/seven/seven.info.yml index 2698275..1427896 100644 --- a/core/themes/seven/seven.info.yml +++ b/core/themes/seven/seven.info.yml @@ -14,14 +14,14 @@ stylesheets-remove: quickedit_stylesheets: - css/components/quickedit.css regions: - content: Content + header: 'Header' + pre_content: 'Pre-content' + breadcrumb: Breadcrumb highlighted: Highlighted help: Help + content: Content page_top: 'Page top' page_bottom: 'Page bottom' sidebar_first: 'First sidebar' - breadcrumb: Breadcrumb - primary_tabs: 'Primary tabs' - secondary_tabs: 'Secondary tabs' regions_hidden: - sidebar_first diff --git a/core/themes/seven/templates/page.html.twig b/core/themes/seven/templates/page.html.twig index 4fd1568..ac26a51 100644 --- a/core/themes/seven/templates/page.html.twig +++ b/core/themes/seven/templates/page.html.twig @@ -38,16 +38,12 @@ * comment/reply/12345). * * Regions: - * - page.primary_tabs: Items for the primary tabs region. - * - page.secondary_tabs: Items for the secondary tabs region. - * - page.page_top: Items for the header region. + * - page.header: Items for the header region. + * - page.pre_content: Items for the pre-content region. + * - page.breadcrumb: Items for the breadcrumb region. * - page.highlighted: Items for the highlighted region. * - page.help: Dynamic help text, mostly for admin pages. * - page.content: The main content of the current page. - * - page.sidebar_first: Items for the first sidebar. - * - page.sidebar_second: Items for the second sidebar. - * - page.page_bottom: Items for the footer region. - * - page.breadcrumb: Items for the breadcrumb region. * * @see template_preprocess_page() * @see seven_preprocess_page() @@ -61,12 +57,12 @@