Update to Drupal 8.0.1. For more information, see https://www.drupal.org/node/2627402
This commit is contained in:
parent
013aaaf2ff
commit
1a0e9d9fac
153 changed files with 1268 additions and 670 deletions
|
@ -85,11 +85,12 @@ class FieldUiTable extends Table {
|
|||
if ($depth = count($parents[$name])) {
|
||||
$children = Element::children($row);
|
||||
$cell = current($children);
|
||||
$row[$cell]['#prefix'] = [
|
||||
$indentation = [
|
||||
'#theme' => 'indentation',
|
||||
'#size' => $depth,
|
||||
'#suffix' => isset($row[$cell]['#prefix']) ? $row[$cell]['#prefix'] : '',
|
||||
];
|
||||
$row[$cell]['#prefix'] = \Drupal::service('renderer')->render($indentation);
|
||||
}
|
||||
|
||||
// Add row id and associate JS settings.
|
||||
|
|
45
core/modules/field_ui/src/Tests/FieldUIIndentationTest.php
Normal file
45
core/modules/field_ui/src/Tests/FieldUIIndentationTest.php
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\field_ui\Tests\FieldUIIndentationTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\field_ui\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
/**
|
||||
* Tests indentation on Field UI.
|
||||
*
|
||||
* @group field_ui
|
||||
*/
|
||||
class FieldUIIndentationTest extends WebTestBase {
|
||||
|
||||
/**
|
||||
* Modules to install.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = array('node', 'field_ui', 'field_ui_test');
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
// Create a test user.
|
||||
$admin_user = $this->drupalCreateUser(array('access content', 'administer content types', 'administer node display'));
|
||||
$this->drupalLogin($admin_user);
|
||||
|
||||
// Create Basic page node type.
|
||||
$this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
|
||||
|
||||
}
|
||||
|
||||
function testIndentation() {
|
||||
$this->drupalGet('admin/structure/types/manage/page/display');
|
||||
$this->assertRaw('js-indentation indentation');
|
||||
}
|
||||
}
|
Reference in a new issue