diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php index 0d071ec..5c2f213 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php @@ -54,10 +54,7 @@ public function buildHeader() { $row = parent::buildHeader(); // Override defaults. $row['label'] = $this->entityInfo['label']; - $row['id'] = array( - 'data' => $row['id'], - 'class' => array(RESPONSIVE_PRIORITY_MEDIUM), - ); + unset($row['id']); if (empty($this->weightKey)) { return $row; } @@ -86,9 +83,7 @@ public function buildRow(EntityInterface $entity) { '#markup' => check_plain($row['label']), )); } - $row['id'] = array('data' => array( - '#markup' => check_plain($row['id']), - )); + unset($row['id']); if (empty($this->weightKey)) { return $row; } diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php index 1113b31..831bd2d 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php @@ -73,10 +73,6 @@ function testList() { $entity_info = entity_get_info('config_test'); $expected_items = array( 'label' => $entity_info['label'], - 'id' => array( - 'data' => 'Machine name', - 'class' => array(RESPONSIVE_PRIORITY_MEDIUM), - ), 'operations' => 'Operations', ); $actual_items = $controller->buildHeader(); @@ -90,9 +86,6 @@ function testList() { '#href' => $uri['path'], '#options' => $uri['options'], )), - 'id' => array('data' => array( - '#markup' => 'default', - )), 'operations' => array( 'data' => $controller->buildOperations($entity), ), @@ -120,26 +113,25 @@ function testListUI() { // Test the table header. $elements = $this->xpath('//div[@id="content"]//table/thead/tr/th'); - $this->assertEqual(count($elements), 3, 'Correct number of table header cells found.'); + $this->assertEqual(count($elements), 2, 'Correct number of table header cells found.'); // Test the contents of each th cell. $entity_info = entity_get_info('config_test'); - $expected_items = array($entity_info['label'], 'Machine name', 'Operations'); + $expected_items = array($entity_info['label'], 'Operations'); foreach ($elements as $key => $element) { $this->assertIdentical((string) $element[0], $expected_items[$key]); } // Check the number of table row cells. $elements = $this->xpath('//div[@id="content"]//table/tbody/tr[@class="odd"]/td'); - $this->assertEqual(count($elements), 3, 'Correct number of table row cells found.'); + $this->assertEqual(count($elements), 2, 'Correct number of table row cells found.'); // Check the contents of each row cell. The first cell contains the label, // the second contains the machine name, and the third contains the // operations list. $title = $elements[0]->children(); $this->assertIdentical((string) $title, 'Default'); - $this->assertIdentical((string) $elements[1], 'default'); - $this->assertTrue($elements[2]->children()->xpath('//ul'), 'Operations list found.'); + $this->assertTrue($elements[1]->children()->xpath('//ul'), 'Operations list found.'); // Add a new entity using the operations link. $this->assertLink('Add test configuration'); @@ -152,7 +144,6 @@ function testListUI() { // text of the label and machine name appears in the list (versus elsewhere // on the page). $this->assertFieldByXpath('//td/a', 'Antelope', "Label found for added 'Antelope' entity."); - $this->assertFieldByXpath('//td', 'antelope', "Machine name found for added 'Antelope' entity."); // Edit the entity using the operations link. $this->assertLink('Edit'); @@ -166,7 +157,6 @@ function testListUI() { // text of the label and machine name appears in the list (versus elsewhere // on the page). $this->assertFieldByXpath('//td/a', 'Albatross', "Label found for updated 'Albatross' entity."); - $this->assertFieldByXpath('//td', 'albatross', "Machine name found for updated 'Albatross' entity."); // Delete the added entity using the operations link. $this->assertLink('Delete'); @@ -178,7 +168,6 @@ function testListUI() { // Verify that the text of the label and machine name does not appear in // the list (though it may appear elsewhere on the page). $this->assertNoFieldByXpath('//td', 'Albatross', "No label found for deleted 'Albatross' entity."); - $this->assertNoFieldByXpath('//td', 'albatross', "No machine name found for deleted 'Albatross' entity."); // Delete the original entity using the operations link. $this->clickLink('Delete'); @@ -189,7 +178,6 @@ function testListUI() { // Verify that the text of the label and machine name does not appear in // the list (though it may appear elsewhere on the page). $this->assertNoFieldByXpath('//td', 'Default', "No label found for deleted 'Default' entity."); - $this->assertNoFieldByXpath('//td', 'default', "No machine name found for deleted 'Default' entity."); // Confirm that the empty text is displayed. $this->assertText('There is no Test configuration yet.'); diff --git a/core/modules/contact/lib/Drupal/contact/CategoryListController.php b/core/modules/contact/lib/Drupal/contact/CategoryListController.php index 26a3703..b96d5dd 100644 --- a/core/modules/contact/lib/Drupal/contact/CategoryListController.php +++ b/core/modules/contact/lib/Drupal/contact/CategoryListController.php @@ -45,7 +45,7 @@ public function buildHeader() { // The two array_slice work together to put additional columns after the // first ones. // @todo Simplify this http://drupal.org/node/1876718 - return array_slice($row, 0, 2, TRUE) + array( + return array_slice($row, 0, 1, TRUE) + array( 'default' => t('Default'), 'recipients' => t('Recipients'), ) + array_slice($row, 0, NULL, TRUE); diff --git a/core/modules/menu/lib/Drupal/menu/MenuListController.php b/core/modules/menu/lib/Drupal/menu/MenuListController.php index 369d645..88bafbd 100644 --- a/core/modules/menu/lib/Drupal/menu/MenuListController.php +++ b/core/modules/menu/lib/Drupal/menu/MenuListController.php @@ -21,7 +21,7 @@ public function buildHeader() { $row = parent::buildHeader(); // Add description column after first too. // @todo Simplify this http://drupal.org/node/1876718 - return array_slice($row, 0, 2, TRUE) + array( + return array_slice($row, 0, 1, TRUE) + array( 'description' => array( 'data' => t('Description'), 'class' => array(RESPONSIVE_PRIORITY_MEDIUM),