Issue #2830196 by Lendude: Click sorting EntityOperations field leads to an Exception being thrown
parent
f08a8c8318
commit
6fe12176c4
|
@ -165,4 +165,11 @@ class EntityOperations extends FieldPluginBase {
|
|||
return $this->view;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function clickSortable() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ class FieldEntityOperationsTest extends HandlerTestBase {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = array('node', 'language');
|
||||
public static $modules = array('node', 'language', 'views_ui');
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
|
@ -83,6 +83,11 @@ class FieldEntityOperationsTest extends HandlerTestBase {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Test that we can't enable click sorting on the operation field.
|
||||
$this->drupalGet('admin/structure/views/nojs/display/test_entity_operations/page_2/style_options');
|
||||
$this->assertField('style_options[info][title][sortable]');
|
||||
$this->assertNoField('style_options[info][operations][sortable]');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -123,3 +123,46 @@ display:
|
|||
position: null
|
||||
display_options:
|
||||
path: test-entity-operations
|
||||
page_2:
|
||||
display_plugin: page
|
||||
id: page_2
|
||||
display_title: 'Page 2'
|
||||
position: null
|
||||
display_options:
|
||||
path: test-entity-operations-table
|
||||
style:
|
||||
type: table
|
||||
options:
|
||||
grouping: { }
|
||||
row_class: ''
|
||||
default_row_class: true
|
||||
override: true
|
||||
sticky: false
|
||||
caption: ''
|
||||
summary: ''
|
||||
description: ''
|
||||
columns:
|
||||
title: title
|
||||
operations: operations
|
||||
info:
|
||||
title:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
operations:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
default: '-1'
|
||||
empty_table: false
|
||||
row:
|
||||
type: fields
|
||||
options: { }
|
||||
display_extenders: { }
|
||||
defaults:
|
||||
style: false
|
||||
row: false
|
||||
|
|
Loading…
Reference in New Issue