[!!!][TASK] Always use "Localization view" in list module 33/54633/8
authorBenni Mack <benni@typo3.org>
Tue, 14 Nov 2017 06:30:01 +0000 (07:30 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 16 Nov 2017 21:04:17 +0000 (22:04 +0100)
When working with localizations in a system,
the option "Localization view" in the list module is
a pre-requisite for all editors, for all installations
without languages, the checkbox is not necessary.

To streamline this behaviour, the option is removed
and the functionality is enabled BY DEFAULT.

Resolves: #82991
Releases: master
Change-Id: I2005413405d009935e3b7d7d046e4aac284ee013
Reviewed-on: https://review.typo3.org/54633
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-82991-RecordListLocalizationViewIsAlwaysEnabled.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/Inline1nCest.php
typo3/sysext/recordlist/Classes/Browser/DatabaseBrowser.php
typo3/sysext/recordlist/Classes/RecordList.php
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/sys_action/Classes/ActionTask.php

index 056c03e..0f242a4 100644 (file)
@@ -196,13 +196,6 @@ class PageLayoutView implements LoggerAwareInterface
     public $showLimit = 0;
 
     /**
-     * Whether to show localization view or not
-     *
-     * @var bool
-     */
-    public $localizationView = false;
-
-    /**
      * Shared module configuration, used by localization features
      *
      * @var array
@@ -3034,11 +3027,7 @@ class PageLayoutView implements LoggerAwareInterface
                 HttpUtility::redirect($returnUrl);
             }
         }
-
-        // Initialize languages:
-        if ($this->localizationView) {
-            $this->initializeLanguages();
-        }
+        $this->initializeLanguages();
     }
 
     /**
index 99aeadf..6c82217 100644 (file)
@@ -896,7 +896,6 @@ return [
         'defaultPageTSconfig' => '
             mod.web_list.enableDisplayBigControlPanel=selectable
             mod.web_list.enableClipBoard=selectable
-            mod.web_list.enableLocalizationView=selectable
             mod.web_list.tableDisplayOrder {
                 be_users.after = be_groups
                 sys_filemounts.after = be_users
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-82991-RecordListLocalizationViewIsAlwaysEnabled.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82991-RecordListLocalizationViewIsAlwaysEnabled.rst
new file mode 100644 (file)
index 0000000..600060a
--- /dev/null
@@ -0,0 +1,33 @@
+.. include:: ../../Includes.txt
+
+====================================================================
+Breaking: #82991 - Record list "Localization View" is always enabled
+====================================================================
+
+See :issue:`82991`
+
+Description
+===========
+
+The option / checkbox "Localization View" in TYPO3's List module was removed, as the functionality is now
+always enabled.
+
+
+Impact
+======
+
+The PageTSconfig option ``mod.web_list.enableLocalizationView`` has no effect anymore.
+
+
+Affected Installations
+======================
+
+Any multi-language installation using the TSconfig option above to e.g. disable the localization view.
+
+
+Migration
+=========
+
+Remove the TSconfig option.
+
+.. index:: TSConfig, NotScanned
\ No newline at end of file
index af2e41e..03422b7 100644 (file)
@@ -87,11 +87,11 @@ class Inline1nCest
         $I->click('a[title="Close"]');
         $I->wait(3);
 
-        $I->executeJS('$(\'a[data-table="pages_language_overlay"] .icon-actions-view-list-collapse\').click();');
+        $I->executeJS('$(\'a[data-table="pages"] .icon-actions-view-list-collapse\').click();');
         $I->wait(1);
 
         $I->see('lipsum', '#recordlist-tx_styleguide_inline_1n_child > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(2) > tr:nth-child(1) > td:nth-child(2) > a');
-        $I->see('Fo Bar', '#recordlist-tx_styleguide_inline_1n_child > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(2) > tr:nth-child(3) > td:nth-child(2) > a');
+        $I->see('Fo Bar', '#recordlist-tx_styleguide_inline_1n_child > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(2) > tr:nth-child(5) > td:nth-child(2) > a');
     }
 
     /**
@@ -107,7 +107,7 @@ class Inline1nCest
         $I->click('a[title="Close"]');
         $I->wait(3);
 
-        $I->executeJS('$(\'a[data-table="pages_language_overlay"] .icon-actions-view-list-collapse\').click();');
+        $I->executeJS('$(\'a[data-table="pages"] .icon-actions-view-list-collapse\').click();');
         $I->wait(1);
 
         $I->wantTo('Check new sorting');
index 6f409e3..175f14e 100644 (file)
@@ -238,7 +238,6 @@ class DatabaseBrowser extends AbstractElementBrowser implements ElementBrowserIn
         $dbList->setOverrideUrlParameters($this->getUrlParameters([]));
         $dbList->thisScript = $this->thisScript;
         $dbList->thumbs = false;
-        $dbList->localizationView = true;
         $dbList->setIsEditable(false);
         $dbList->calcPerms = $backendUser->calcPerms($pageInfo);
         $dbList->noControlPanels = true;
index 85b77ff..246e6cd 100644 (file)
@@ -248,7 +248,6 @@ class RecordList
         $this->MOD_MENU = [
             'bigControlPanel' => '',
             'clipBoard' => '',
-            'localization' => ''
         ];
         // Loading module configuration:
         $this->modTSconfig = BackendUtility::getModTSconfig($this->id, 'mod.' . $this->moduleName);
@@ -309,12 +308,6 @@ class RecordList
                 $this->MOD_SETTINGS['clipBoard'] = true;
             }
         }
-        // Set predefined value for LocalizationView:
-        if ($this->modTSconfig['properties']['enableLocalizationView'] === 'activated') {
-            $this->MOD_SETTINGS['localization'] = true;
-        } elseif ($this->modTSconfig['properties']['enableLocalizationView'] === 'deactivated') {
-            $this->MOD_SETTINGS['localization'] = false;
-        }
 
         // Initialize the dblist object:
         /** @var $dblist RecordList\DatabaseRecordList */
@@ -324,7 +317,6 @@ class RecordList
         $dblist->thumbs = $backendUser->uc['thumbnailsByDefault'];
         $dblist->returnUrl = $this->returnUrl;
         $dblist->allFields = $this->MOD_SETTINGS['bigControlPanel'] || $this->table ? 1 : 0;
-        $dblist->localizationView = $this->MOD_SETTINGS['localization'];
         $dblist->showClipboard = 1;
         $dblist->disableSingleTableView = $this->modTSconfig['properties']['disableSingleTableView'];
         $dblist->listOnlyInSingleTableMode = $this->modTSconfig['properties']['listOnlyInSingleTableView'];
@@ -336,7 +328,7 @@ class RecordList
         $dblist->newWizards = $this->modTSconfig['properties']['newWizards'] ? 1 : 0;
         $dblist->pageRow = $this->pageinfo;
         $dblist->counter++;
-        $dblist->MOD_MENU = ['bigControlPanel' => '', 'clipBoard' => '', 'localization' => ''];
+        $dblist->MOD_MENU = ['bigControlPanel' => '', 'clipBoard' => ''];
         $dblist->modTSconfig = $this->modTSconfig;
         $clickTitleMode = trim($this->modTSconfig['properties']['clickTitleMode']);
         $dblist->clickTitleMode = $clickTitleMode === '' ? 'edit' : $clickTitleMode;
@@ -504,7 +496,7 @@ class RecordList
             $this->body .= '
 
                                        <!--
-                                               Listing options for extended view, clipboard and localization view
+                                               Listing options for extended view and clipboard view
                                        -->
                                        <div class="typo3-listOptions">
                                                <form action="" method="post">';
@@ -531,16 +523,6 @@ class RecordList
                 }
             }
 
-            // Add "localization view" checkbox:
-            if ($this->modTSconfig['properties']['enableLocalizationView'] === 'selectable') {
-                $this->body .= '<div class="checkbox">' .
-                    '<label for="checkLocalization">' .
-                    BackendUtility::getFuncCheck($this->id, 'SET[localization]', $this->MOD_SETTINGS['localization'], '', $this->table ? '&table=' . $this->table : '', 'id="checkLocalization"') .
-                    BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_options', htmlspecialchars($lang->getLL('localization'))) .
-                    '</label>' .
-                    '</div>';
-            }
-
             $this->body .= '
                                                </form>
                                        </div>';
index 7d249d0..7fb641d 100644 (file)
@@ -101,14 +101,6 @@ class AbstractDatabaseRecordList extends AbstractRecordList
     public $allFields = 0;
 
     /**
-     * Whether to show localization view or not
-     *
-     * @var bool
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10
-     */
-    public $localizationView = false;
-
-    /**
      * If set, csvList is outputted.
      *
      * @var bool
@@ -470,11 +462,7 @@ class AbstractDatabaseRecordList extends AbstractRecordList
                 HttpUtility::redirect($returnUrl);
             }
         }
-
-        // Initialize languages:
-        if ($this->localizationView) {
-            $this->initializeLanguages();
-        }
+        $this->initializeLanguages();
     }
 
     /**
index f77fa8c..8330a7e 100644 (file)
@@ -140,13 +140,6 @@ class DatabaseRecordList
     public $pageRow = [];
 
     /**
-     * Whether to show localization view or not
-     *
-     * @var bool
-     */
-    public $localizationView = false;
-
-    /**
      * Shared module configuration, used by localization features
      *
      * @var array
@@ -943,7 +936,7 @@ class DatabaseRecordList
             $this->fieldArray[] = '_PATH_';
         }
         // Localization
-        if ($this->localizationView && $l10nEnabled) {
+        if ($l10nEnabled) {
             $this->fieldArray[] = '_LOCALIZATION_';
             $this->fieldArray[] = '_LOCALIZATION_b';
             // Only restrict to the default language if no search request is in place
@@ -1168,10 +1161,10 @@ class DatabaseRecordList
                         $cc++;
                         $this->translations = false;
                         $rowOutput .= $this->renderListRow($table, $row, $cc, $titleCol, $thumbsCol);
-                        // If localization view is enabled and no search happened it means that the selected
+                        // If no search happened it means that the selected
                         // records are either default or All language and here we will not select translations
                         // which point to the main record:
-                        if ($this->localizationView && $l10nEnabled && $this->searchString === '') {
+                        if ($l10nEnabled && $this->searchString === '') {
                             // For each available translation, render the record:
                             if (is_array($this->translations)) {
                                 foreach ($this->translations as $lRow) {
@@ -1850,7 +1843,7 @@ class DatabaseRecordList
         ];
         // Enables to hide the move elements for localized records - doesn't make much sense to perform these options for them
         // For page translations these icons should never be shown
-        $isL10nOverlay = ($this->localizationView || $table === 'pages') && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] != 0;
+        $isL10nOverlay = $table === 'pages' && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] != 0;
         // If the listed table is 'pages' we have to request the permission settings for each page:
         $localCalcPerms = 0;
         if ($table === 'pages') {
@@ -2161,7 +2154,7 @@ class DatabaseRecordList
         $cells['pasteAfter'] = ($cells['pasteInto'] = $this->spaceIcon);
         // Enables to hide the copy, cut and paste icons for localized records - doesn't make much sense to perform these options for them
         // For page translations these icons should never be shown
-        $isL10nOverlay = ($this->localizationView || $table === 'pages') && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] != 0;
+        $isL10nOverlay = $table === 'pages' && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] != 0;
         // Return blank, if disabled:
         // Whether a numeric clipboard pad is active or the normal pad we will see different content of the panel:
         // For the "Normal" pad:
@@ -2854,11 +2847,7 @@ class DatabaseRecordList
                 HttpUtility::redirect($returnUrl);
             }
         }
-
-        // Initialize languages:
-        if ($this->localizationView) {
-            $this->initializeLanguages();
-        }
+        $this->initializeLanguages();
     }
 
     /**
index f771a00..372590a 100644 (file)
@@ -899,12 +899,11 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface
             $dblist->thumbs = $this->getBackendUser()->uc['thumbnailsByDefault'];
             $dblist->returnUrl = $this->taskObject->returnUrl;
             $dblist->allFields = 1;
-            $dblist->localizationView = 1;
             $dblist->showClipboard = 0;
             $dblist->disableSingleTableView = 1;
             $dblist->pageRow = $this->pageinfo;
             $dblist->counter++;
-            $dblist->MOD_MENU = ['bigControlPanel' => '', 'clipBoard' => '', 'localization' => ''];
+            $dblist->MOD_MENU = ['bigControlPanel' => '', 'clipBoard' => ''];
             $dblist->modTSconfig = $this->taskObject->modTSconfig;
             $dblist->dontShowClipControlPanels = (!$this->taskObject->MOD_SETTINGS['bigControlPanel'] && $dblist->clipObj->current === 'normal' && !$this->modTSconfig['properties']['showClipControlPanelsDespiteOfCMlayers']);
             // Initialize the listing object, dblist, for rendering the list: