mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-12-22 13:46:11 +01:00

[FEATURE] Make records timeable and hidable (#989)

Resolves: #553
This commit is contained in:
Łukasz Uznański 2023-11-27 13:31:13 +01:00 committed by GitHub
parent 5958d6d117
commit 53b0abd977
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 85 additions and 1 deletions

View file

@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
## x.y.z
### Added
- Make records timeable and hideable (#989)
- Add support for PHP 8.3 (#965)
- Add an FE editor (#864, #872, #874, #876)
- Add automerging of green Dependabot PRs (#756)

View file

@ -12,6 +12,9 @@ $tca = [
'searchFields' => 'title, description',
'enablecolumns' => [
'fe_group' => 'fe_group',
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'transOrigPointerField' => 'l18n_parent',
'transOrigDiffSourceField' => 'l18n_diffsource',
@ -24,16 +27,67 @@ $tca = [
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
title, description, image, owner,
--div--;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.tabs.access,
--palette--;;hidden,
--palette--;;access,',
],
],
'palettes' => [
'hidden' => [
'showitem' => '
hidden;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.hidden
',
],
'access' => [
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.palettes.access',
'showitem' => 'fe_group',
'showitem' => '
starttime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel,
endtime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel,
--linebreak--,
fe_group;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:fe_group_formlabel,
',
],
],
'columns' => [
'hidden' => [
'exclude' => true,
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.hidden',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
'items' => [
[
'label' => '',
'invertStateDisplay' => true,
],
],
],
],
'starttime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'datetime',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038),
],
],
'l10n_mode' => 'exclude',
'l10n_display' => 'defaultAsReadonly',
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'datetime',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038),
],
],
'l10n_mode' => 'exclude',
'l10n_display' => 'defaultAsReadonly',
],
'sys_language_uid' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
@ -192,6 +246,28 @@ if ($typo3Version->getMajorVersion() < 12) {
]
),
];
$tca['columns']['hidden']['config'] = [
'type' => 'check',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.hidden',
'items' => [
[
0 => '',
'invertStateDisplay' => true,
],
],
];
$tca['columns']['starttime']['config'] = [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
];
$tca['columns']['endtime']['config'] = [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
];
$tca['columns']['fe_group']['config']['items'] = [
[
0 => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hide_at_login',

View file

@ -31,6 +31,10 @@
<source>Usergroup Access Rights</source>
<target>Zugriffsrechte für Benutzergruppen</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.hidden">
<source>Visible</source>
<target>Sichtbar</target>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -24,6 +24,9 @@
<trans-unit id="tx_tea_domain_model_product_tea.fe_group">
<source>Usergroup Access Rights</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.hidden">
<source>Visible</source>
</trans-unit>
</body>
</file>
</xliff>