diff --git a/Classes/ViewHelpers/Backend/ControlViewHelper.php b/Classes/ViewHelpers/Backend/ControlViewHelper.php index 4c3a3ebbf5db7c1a9ab09931098dffb323bc63b4..048fd39a4b905c6e9bebec6ce5080f70361a4c6c 100644 --- a/Classes/ViewHelpers/Backend/ControlViewHelper.php +++ b/Classes/ViewHelpers/Backend/ControlViewHelper.php @@ -77,6 +77,46 @@ class ControlViewHelper extends AbstractViewHelper { $languageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Localization\LanguageService::class); $languageService->includeLLFile('EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf'); + // DatabaseRecordList has a $prevPrevUid, which might track back a page. We wont do that, 1st+last record are always + // not sortable in one direction + $uidPrev = false; + $uidNext = false; + $iterator = $this->arguments['iter']; + if (!$iterator['isFirst'] && $iterator['index'] !== 1){ + $uidPrev = '-'.$this->arguments['allItems'][$iterator['index'] - 2]['uid']; + } + if ($iterator['index'] === 1){ + $uidPrev = $row['pid']; + } + if (!$iterator['isLast']){ + $uidNext = '-'.$this->arguments['allItems'][$iterator['index'] + 1]['uid']; + } + + $newCurrentTableArr = [ + 'prev' => [ + $row['uid'] => $uidPrev + ], + 'next' => [ + $row['uid'] => $uidNext + ] + ]; + if (!$uidPrev) { + $newCurrentTableArr = [ + 'next' => [ + $row['uid'] => $uidNext + ] + ]; + } + if (!$uidNext) { + $newCurrentTableArr = [ + 'prev' => [ + $row['uid'] => $uidPrev + ] + ]; + } + $databaseRecordList->id = $row['pid']; + $databaseRecordList->currentTable = $newCurrentTableArr; + return $databaseRecordList->makeControl($table, $row); } } diff --git a/Configuration/TCA/tx_sgjobs_domain_model_company.php b/Configuration/TCA/tx_sgjobs_domain_model_company.php index 66dc4db09597785249864ca9117ed0cd0af569f4..8c07630354b080ecd113ecba8857392f2d1ba437 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_company.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_company.php @@ -95,14 +95,6 @@ $columns = [ 'type' => 'passthrough', ], ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], 'pid' => [ 'exclude' => 0, 'label' => 'PID', diff --git a/Configuration/TCA/tx_sgjobs_domain_model_contact.php b/Configuration/TCA/tx_sgjobs_domain_model_contact.php index 77067bd9722a128403a240ae45e03ab974bc1089..35c15a11014e8c08fd25e6a80364d07543733d95 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_contact.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_contact.php @@ -97,14 +97,6 @@ $columns = [ 'type' => 'passthrough', ], ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], 'pid' => [ 'exclude' => FALSE, 'label' => 'PID', diff --git a/Configuration/TCA/tx_sgjobs_domain_model_department.php b/Configuration/TCA/tx_sgjobs_domain_model_department.php index 7590e661940e83cd8bd398e7d873442633a18d3d..37dec1798bb3f224e4538cb8cb8f089cf6e7aa06 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_department.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_department.php @@ -95,14 +95,6 @@ $columns = [ 'type' => 'passthrough', ], ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], 'pid' => [ 'exclude' => FALSE, 'label' => 'PID', diff --git a/Configuration/TCA/tx_sgjobs_domain_model_experience_level.php b/Configuration/TCA/tx_sgjobs_domain_model_experience_level.php index 1d03860c95c8abfe646e920fa1556c776825e2bc..45b7a5dc9e46cf11acefa6f0d572eec5704afa49 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_experience_level.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_experience_level.php @@ -95,14 +95,6 @@ $columns = [ 'type' => 'passthrough', ], ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], 'pid' => [ 'exclude' => FALSE, 'label' => 'PID', diff --git a/Configuration/TCA/tx_sgjobs_domain_model_job.php b/Configuration/TCA/tx_sgjobs_domain_model_job.php index 1bc54225b4603c387fa36216c6c768ee1170cba7..59ee86edba512b028a8a12035f5d2b196400114c 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_job.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_job.php @@ -127,14 +127,6 @@ $columns = [ 'renderType' => 'languageVisibility' ] ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], 'pid' => [ 'exclude' => FALSE, 'label' => 'PID', diff --git a/Configuration/TCA/tx_sgjobs_domain_model_job_application.php b/Configuration/TCA/tx_sgjobs_domain_model_job_application.php index 618b47448c3230012caf03cf8f49eef1eacbc1d9..1e70873a6ff69a0b2a01e4de0994e3f51c355c42 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_job_application.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_job_application.php @@ -97,14 +97,6 @@ $columns = [ 'type' => 'passthrough', ], ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], 'pid' => [ 'exclude' => FALSE, 'label' => 'PID', diff --git a/Resources/Private/Backend/Templates/Index.html b/Resources/Private/Backend/Templates/Index.html index 7e54c75896eaa1cde4d1881610a58e7751ce7cd6..5de8e2871edd907ae0a39288f7a5c5e34ae2a67f 100644 --- a/Resources/Private/Backend/Templates/Index.html +++ b/Resources/Private/Backend/Templates/Index.html @@ -39,7 +39,7 @@ </tr> </thead> <tbody> - <f:for each="{paginator.paginatedItems}" as="job"> + <f:for each="{paginator.paginatedItems}" as="job" iteration="iter"> <tr data-uid="{job.uid}"> <td nowrap="nowrap" class="col-icon"> <f:format.raw><sg:backend.icon table="tx_sgjobs_domain_model_job" row="{job}" /></f:format.raw> @@ -50,7 +50,7 @@ </be:link.editRecord> </td> <td nowrap="nowrap" class="col-control"> - <f:format.raw><sg:backend.control table="tx_sgjobs_domain_model_job" row="{job}" /></f:format.raw> + <f:format.raw><sg:backend.control table="tx_sgjobs_domain_model_job" row="{job}" allItems="{paginator.paginatedItems}" iter="{iter}" /></f:format.raw> </td> </tr> </f:for>