diff --git a/core/modules/views/src/Plugin/views/field/EntityOperations.php b/core/modules/views/src/Plugin/views/field/EntityOperations.php index 974d3fbd845ddb229b33b8a154a046289e07c614..f2a3ba997cd2bae9e15805e90ede954e840c9cf2 100644 --- a/core/modules/views/src/Plugin/views/field/EntityOperations.php +++ b/core/modules/views/src/Plugin/views/field/EntityOperations.php @@ -165,4 +165,11 @@ protected function getView() { return $this->view; } + /** + * {@inheritdoc} + */ + public function clickSortable() { + return FALSE; + } + } diff --git a/core/modules/views/src/Tests/Handler/FieldEntityOperationsTest.php b/core/modules/views/src/Tests/Handler/FieldEntityOperationsTest.php index d5adcb409e3ef5b34925a945a61047375e7b3b62..e76d54e34b2fd6b483773885c7a9040de26d357d 100644 --- a/core/modules/views/src/Tests/Handler/FieldEntityOperationsTest.php +++ b/core/modules/views/src/Tests/Handler/FieldEntityOperationsTest.php @@ -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 @@ public function testEntityOperations() { } } } + + // 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]'); } } diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_entity_operations.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_entity_operations.yml index 8276613a3494556d3db742a86bae7d67f44f37e2..bb84119f071636eccdcc248efa81e8262c5e396d 100644 --- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_entity_operations.yml +++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_entity_operations.yml @@ -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