Skip to content
Snippets Groups Projects
Commit 36fa7ed9 authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

[TASK] Add sorting to BE module

parent 5fda1626
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......@@ -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',
......
......@@ -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',
......
......@@ -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',
......
......@@ -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',
......
......@@ -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',
......
......@@ -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',
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment