Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Make records timeable and hidable #989

Merged
merged 11 commits into from
Nov 27, 2023
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
78 changes: 77 additions & 1 deletion Configuration/TCA/tx_tea_domain_model_product_tea.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
'searchFields' => 'title, description',
'enablecolumns' => [
'fe_group' => 'fe_group',
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'transOrigPointerField' => 'l18n_parent',
'transOrigDiffSourceField' => 'l18n_diffsource',
Expand All @@ -24,16 +27,67 @@
'--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' => [
lukaszuznanski marked this conversation as resolved.
Show resolved Hide resolved
'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',
Expand Down Expand Up @@ -192,6 +246,28 @@
]
),
];
$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',
Expand Down
4 changes: 4 additions & 0 deletions Resources/Private/Language/de.locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -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>
3 changes: 3 additions & 0 deletions Resources/Private/Language/locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -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>