From c915fc2d5087d912e81e4ed81f15ed8958719577 Mon Sep 17 00:00:00 2001 From: Philipp Dieter Date: Sat, 1 Dec 2018 00:27:26 +0100 Subject: [PATCH] [TASK] Add some typoscript --- Configuration/TypoScript/constants.ts | 17 +++++ Configuration/TypoScript/setup.ts | 65 ++++++++++++++++++++ ExtensionBuilder.json | 15 ++++- Resources/Private/Language/locallang.xlf | 2 +- Resources/Private/Language/locallang_db.xlf | 8 ++- Resources/Private/Layouts/Default.html | 5 ++ Resources/Private/Templates/Dummy/List.html | 36 +++++++++++ Resources/Private/TypoScript/Setup/lib.ts | 8 +++ Resources/Private/TypoScript/setup.ts | 1 + Resources/Public/Icons/user_plugin_dummy.svg | 1 + ext_emconf.php | 2 +- ext_localconf.php | 49 +++++++++++++++ ext_tables.php | 8 ++- 13 files changed, 211 insertions(+), 6 deletions(-) create mode 100644 Configuration/TypoScript/constants.ts create mode 100644 Configuration/TypoScript/setup.ts create mode 100644 Resources/Private/Layouts/Default.html create mode 100644 Resources/Private/Templates/Dummy/List.html create mode 100644 Resources/Private/TypoScript/Setup/lib.ts create mode 100644 Resources/Private/TypoScript/setup.ts create mode 100644 Resources/Public/Icons/user_plugin_dummy.svg create mode 100644 ext_localconf.php diff --git a/Configuration/TypoScript/constants.ts b/Configuration/TypoScript/constants.ts new file mode 100644 index 0000000..239c941 --- /dev/null +++ b/Configuration/TypoScript/constants.ts @@ -0,0 +1,17 @@ + +plugin.tx_templatesaide_dummy { + view { + # cat=plugin.tx_templatesaide_dummy/file; type=string; label=Path to template root (FE) + templateRootPath = EXT:templates_aide/Resources/Private/Templates/ + # cat=plugin.tx_templatesaide_dummy/file; type=string; label=Path to template partials (FE) + partialRootPath = EXT:templates_aide/Resources/Private/Partials/ + # cat=plugin.tx_templatesaide_dummy/file; type=string; label=Path to template layouts (FE) + layoutRootPath = EXT:templates_aide/Resources/Private/Layouts/ + } + persistence { + # cat=plugin.tx_templatesaide_dummy//a; type=string; label=Default storage PID + storagePid = + } +} + +## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder \ No newline at end of file diff --git a/Configuration/TypoScript/setup.ts b/Configuration/TypoScript/setup.ts new file mode 100644 index 0000000..f728db5 --- /dev/null +++ b/Configuration/TypoScript/setup.ts @@ -0,0 +1,65 @@ + +plugin.tx_templatesaide_dummy { + view { + templateRootPaths.0 = EXT:templates_aide/Resources/Private/Templates/ + templateRootPaths.1 = {$plugin.tx_templatesaide_dummy.view.templateRootPath} + partialRootPaths.0 = EXT:templates_aide/Resources/Private/Partials/ + partialRootPaths.1 = {$plugin.tx_templatesaide_dummy.view.partialRootPath} + layoutRootPaths.0 = EXT:templates_aide/Resources/Private/Layouts/ + layoutRootPaths.1 = {$plugin.tx_templatesaide_dummy.view.layoutRootPath} + } + persistence { + storagePid = {$plugin.tx_templatesaide_dummy.persistence.storagePid} + #recursive = 1 + } + features { + #skipDefaultArguments = 1 + # if set to 1, the enable fields are ignored in BE context + ignoreAllEnableFieldsInBe = 0 + # Should be on by default, but can be disabled if all action in the plugin are uncached + requireCHashArgumentForActionArguments = 1 + } + mvc { + #callDefaultActionIfActionCantBeResolved = 1 + } +} + +# these classes are only used in auto-generated templates +plugin.tx_templatesaide._CSS_DEFAULT_STYLE ( + textarea.f3-form-error { + background-color:#FF9F9F; + border: 1px #FF0000 solid; + } + + input.f3-form-error { + background-color:#FF9F9F; + border: 1px #FF0000 solid; + } + + .tx-templates-aide table { + border-collapse:separate; + border-spacing:10px; + } + + .tx-templates-aide table th { + font-weight:bold; + } + + .tx-templates-aide table td { + vertical-align:top; + } + + .typo3-messages .message-error { + color:red; + } + + .typo3-messages .message-ok { + color:green; + } +) + +## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder + +plugin.tx_templatesaide._CSS_DEFAULT_STYLE > + + diff --git a/ExtensionBuilder.json b/ExtensionBuilder.json index 9c34adb..8294ddd 100644 --- a/ExtensionBuilder.json +++ b/ExtensionBuilder.json @@ -68,12 +68,23 @@ "role": "Developer" } ], - "plugins": [], + "plugins": [ + { + "actions": { + "controllerActionCombinations": "", + "noncacheableActions": "", + "switchableActions": "" + }, + "description": "", + "key": "dummy", + "name": "dummy" + } + ], "vendorName": "Cjel" }, "wires": [], "log": { - "last_modified": "2018-11-29 03:46", + "last_modified": "2018-11-30 10:40", "extension_builder_version": "8.10.2", "be_user": "Philipp Dieter (1)" } diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index d95400d..4f1cc31 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -1,6 +1,6 @@ - +
diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index d95400d..aec7b30 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -1,11 +1,17 @@ - +
Dummy + + dummy + + + + \ No newline at end of file diff --git a/Resources/Private/Layouts/Default.html b/Resources/Private/Layouts/Default.html new file mode 100644 index 0000000..90e05ce --- /dev/null +++ b/Resources/Private/Layouts/Default.html @@ -0,0 +1,5 @@ + +
+ +
+ \ No newline at end of file diff --git a/Resources/Private/Templates/Dummy/List.html b/Resources/Private/Templates/Dummy/List.html new file mode 100644 index 0000000..ac6751d --- /dev/null +++ b/Resources/Private/Templates/Dummy/List.html @@ -0,0 +1,36 @@ + + + + This Template is responsible for creating a table of domain objects. + + If you modify this template, do not forget to change the overwrite settings + in /Configuration/ExtensionBuilder/settings.yaml: + Resources: + Private: + Templates: + List.html: keep + + Otherwise your changes will be overwritten the next time you save the extension in the extension builder + + +

Listing for Dummy

+ + + + + + + + + + + + + + + +
EditDelete
+ + New Dummy +
+ \ No newline at end of file diff --git a/Resources/Private/TypoScript/Setup/lib.ts b/Resources/Private/TypoScript/Setup/lib.ts new file mode 100644 index 0000000..1c0707d --- /dev/null +++ b/Resources/Private/TypoScript/Setup/lib.ts @@ -0,0 +1,8 @@ +lib.rootpid = TEXT +lib.rootpid.data = leveluid : 0 + +lib.currentLevel = TEXT +lib.currentLevel.data = level:1 + +lib.currentPid = TEXT +lib.currentPid.data = TSFE:id diff --git a/Resources/Private/TypoScript/setup.ts b/Resources/Private/TypoScript/setup.ts new file mode 100644 index 0000000..dfed507 --- /dev/null +++ b/Resources/Private/TypoScript/setup.ts @@ -0,0 +1 @@ + diff --git a/Resources/Public/Icons/user_plugin_dummy.svg b/Resources/Public/Icons/user_plugin_dummy.svg new file mode 100644 index 0000000..17e1eb1 --- /dev/null +++ b/Resources/Public/Icons/user_plugin_dummy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ext_emconf.php b/ext_emconf.php index f581f77..5c0551a 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -3,7 +3,7 @@ /*************************************************************** * Extension Manager/Repository config file for ext: "templates_aide" * - * Auto generated by Extension Builder 2018-11-29 + * Auto generated by Extension Builder 2018-11-30 * * Manual updates: * Only the data in the array - anything else is removed by next write. diff --git a/ext_localconf.php b/ext_localconf.php new file mode 100644 index 0000000..8817685 --- /dev/null +++ b/ext_localconf.php @@ -0,0 +1,49 @@ + 'list' + ], + // non-cacheable actions + [ + 'Dummy' => '' + ] + ); + + // wizards + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig( + 'mod { + wizards.newContentElement.wizardItems.plugins { + elements { + dummy { + iconIdentifier = templates_aide-plugin-dummy + title = LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templates_aide_dummy.name + description = LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templates_aide_dummy.description + tt_content_defValues { + CType = list + list_type = templatesaide_dummy + } + } + } + show = * + } + }' + ); + $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); + + $iconRegistry->registerIcon( + 'templates_aide-plugin-dummy', + \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, + ['source' => 'EXT:templates_aide/Resources/Public/Icons/user_plugin_dummy.svg'] + ); + + } +); +## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder \ No newline at end of file diff --git a/ext_tables.php b/ext_tables.php index 0f6cece..ded8e98 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -5,6 +5,12 @@ call_user_func( function() { + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( + 'Cjel.TemplatesAide', + 'Dummy', + 'dummy' + ); + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('templates_aide', 'Configuration/TypoScript', 'Templates Aide'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_templatesaide_domain_model_dummy', 'EXT:templates_aide/Resources/Private/Language/locallang_csh_tx_templatesaide_domain_model_dummy.xlf'); @@ -37,4 +43,4 @@ call_user_func( $pageRenderer->loadRequireJsModule('TYPO3/CMS/TemplatesAide/NewContentElementWizardPreview'); } -); +); \ No newline at end of file