Issue #2086447 by tim.plunkett, damiankloip: Remove 'View:' prefix from views block derivative admin labels.

8.0.x
webchick 2013-09-14 00:03:49 -07:00
parent b9a4a7ceb7
commit 6360399987
5 changed files with 10 additions and 10 deletions

View File

@ -69,7 +69,7 @@ class DisplayBlockTest extends ViewTestBase {
':id' => 'edit-views-test-data',
':li_class' => 'views-block' . drupal_html_class($edit['id']) . '-block-1',
':href' => url('admin/structure/block/add/views_block:' . $edit['id'] . '-block_1/stark'),
':text' => 'View: ' . $edit['label'],
':text' => $edit['label'],
);
$this->drupalGet('admin/structure/block');
$elements = $this->xpath('//details[@id=:id]//li[contains(@class, :li_class)]/a[contains(@href, :href) and text()=:text]', $arguments);
@ -105,7 +105,7 @@ class DisplayBlockTest extends ViewTestBase {
':id' => 'edit-views-test-data',
':li_class' => 'views-block' . drupal_html_class($edit['id']) . '-block-2',
':href' => url('admin/structure/block/add/views_block:' . $edit['id'] . '-block_2/stark'),
':text' => 'View: ' . $edit['label'],
':text' => $edit['label'],
);
$elements = $this->xpath('//details[@id=:id]//li[contains(@class, :li_class)]/a[contains(@href, :href) and text()=:text]', $arguments);
$this->assertTrue(!empty($elements), 'The first cloned test block remains in the original category.');
@ -114,7 +114,7 @@ class DisplayBlockTest extends ViewTestBase {
':id' => $category_id,
':li_class' => 'views-block' . drupal_html_class($edit['id']) . '-block-3',
':href' => url('admin/structure/block/add/views_block:' . $edit['id'] . '-block_3/stark'),
':text' => 'View: ' . $edit['label'],
':text' => $edit['label'],
);
$elements = $this->xpath('//details[@id=:id]//li[contains(@class, :li_class)]/a[contains(@href, :href) and text()=:text]', $arguments);
$this->assertTrue(!empty($elements), 'The second cloned test block appears in the custom category.');

View File

@ -93,10 +93,10 @@ class ViewsBlock implements ContainerDerivativeInterface {
if (empty($desc)) {
if ($display->display['display_title'] == $display->definition['title']) {
$desc = t('View: !view', array('!view' => $view->label()));
$desc = t('!view', array('!view' => $view->label()));
}
else {
$desc = t('View: !view: !display', array('!view' => $view->label(), '!display' => $display->display['display_title']));
$desc = t('!view: !display', array('!view' => $view->label(), '!display' => $display->display['display_title']));
}
}
$this->derivatives[$delta] = array(

View File

@ -45,7 +45,7 @@ class BasicTest extends WizardTestBase {
// This view should not have a block.
$this->drupalGet('admin/structure/block');
$this->assertNoText('View: ' . $view1['label']);
$this->assertNoText($view1['label']);
// Create two nodes.
$node1 = $this->drupalCreateNode(array('type' => 'page'));
@ -123,7 +123,7 @@ class BasicTest extends WizardTestBase {
// Confirm that the block is available in the block administration UI.
$this->drupalGet('admin/structure/block/list/' . \Drupal::config('system.theme')->get('default'));
$this->assertText('View: ' . $view3['label']);
$this->assertText($view3['label']);
// Place the block.
$this->drupalPlaceBlock("views_block:{$view3['id']}-block_1");

View File

@ -76,7 +76,7 @@ class ItemsPerPageTest extends WizardTestBase {
// Confirm that the block is listed in the block administration UI.
$this->drupalGet('admin/structure/block/list/' . \Drupal::config('system.theme')->get('default'));
$this->assertText('View: ' . $view['label']);
$this->assertText($view['label']);
// Place the block, visit a page that displays the block, and check that the
// nodes we expect appear in the correct order.

View File

@ -55,7 +55,7 @@ class OverrideDisplaysTest extends UITestBase {
// Confirm that the view block is available in the block administration UI.
$this->drupalGet('admin/structure/block/list/' . \Drupal::config('system.theme')->get('default'));
$this->assertText('View: ' . $view['label']);
$this->assertText($view['label']);
// Place the block.
$this->drupalPlaceBlock("views_block:{$view['id']}-block_1");
@ -113,7 +113,7 @@ class OverrideDisplaysTest extends UITestBase {
// Confirm that the block is available in the block administration UI.
$this->drupalGet('admin/structure/block/list/' . \Drupal::config('system.theme')->get('default'));
$this->assertText('View: ' . $view['label']);
$this->assertText($view['label']);
// Put the block into the first sidebar region, and make sure it will not
// display on the view's page display (since we will be searching for the