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
pull/29/head
Daniel Siepmann 2 years ago
parent 1b304945c0
commit 1088a580a0
  1. 2
      Configuration/TCA/tx_thuecat_import_configuration.php
  2. 5
      Configuration/TypoScript/Default/Setup.typoscript
  3. 3
      Resources/Private/Templates/Backend/Overview/Index.html
  4. 6
      ext_localconf.php

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

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

@ -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>

@ -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);

Loading…
Cancel
Save