Allow editor to create and edit import configuration

Import Configuration can now be stored on folders, beside the site root.
That way editors can create and edit records.
The default storage pid for new records can be defined via TypoScript.

Resolves: #24
This commit is contained in:
Daniel Siepmann 2021-06-01 09:44:14 +02:00
parent 1b304945c0
commit 1088a580a0
4 changed files with 14 additions and 2 deletions

View file

@ -20,7 +20,7 @@ return (static function (string $extensionKey, string $tableName) {
'disabled' => 'disable',
],
'searchFields' => 'title',
'rootLevel' => 1,
'rootLevel' => -1,
],
'columns' => [
'title' => [

View file

@ -1,5 +1,10 @@
module {
tx_thuecat {
settings {
newRecordPid {
tx_thuecat_import_configuration = 0
}
}
view {
templateRootPaths {
0 = EXT:thuecat/Resources/Private/Templates/

View file

@ -11,6 +11,7 @@
{f:translate(id: 'module.importConfigurations.headline')}
<f:link.newRecord
table="tx_thuecat_import_configuration"
pid="{settings.newRecordPid.tx_thuecat_import_configuration}"
title="{f:translate(id: 'module.importConfigurations.actions.new')}"
>
{f:icon(identifier: 'actions-document-add')}
@ -28,7 +29,7 @@
{f:translate(
id: 'module.importConfigurations.missing.text',
arguments: {
0: "{f:uri.newRecord(table: 'tx_thuecat_import_configuration')}"
0: "{f:uri.newRecord(table: 'tx_thuecat_import_configuration', pid: settings.newRecordPid.tx_thuecat_import_configuration)}"
}
) -> f:format.raw()}
</f:be.infobox>

View file

@ -3,3 +3,9 @@
defined('TYPO3') or die();
\WerkraumMedia\ThueCat\Extension::registerConfig();
(static function (string $extensionKey) {
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
'@import "EXT:' . $extensionKey . '/Configuration/TypoScript/Default/Setup.typoscript"'
);
})(\WerkraumMedia\ThueCat\Extension::EXTENSION_KEY);