Compare commits
9 Commits
0e15cad446
...
786c200609
Author | SHA1 | Date | |
---|---|---|---|
786c200609 | |||
7f3123b61a | |||
![]() |
d9e0ae6c44 | ||
fb54d608a6 | |||
94296d4a4d | |||
1a3aab9f36 | |||
![]() |
14b3a54a99 | ||
0045f87815 | |||
![]() |
9ba671cfd0 |
@ -170,22 +170,6 @@ class ActionController extends BaseController
|
|||||||
$this->environmentService = $environmentService;
|
$this->environmentService = $environmentService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* propertyMapper
|
|
||||||
*
|
|
||||||
* @var PropertyMapper
|
|
||||||
*/
|
|
||||||
protected $propertyMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param
|
|
||||||
*/
|
|
||||||
public function injectPropertyMapper(
|
|
||||||
PropertyMapper $propertyMapper
|
|
||||||
) {
|
|
||||||
$this->propertyMapper = $propertyMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* propertyMappingConfigurationBuilder
|
* propertyMappingConfigurationBuilder
|
||||||
*
|
*
|
||||||
@ -776,11 +760,36 @@ class ActionController extends BaseController
|
|||||||
}
|
}
|
||||||
if ($this->pageType) {
|
if ($this->pageType) {
|
||||||
if (is_array($this->responseStatus)) {
|
if (is_array($this->responseStatus)) {
|
||||||
$this->response->setStatus(
|
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||||
array_key_first($this->responseStatus)
|
$response = $this
|
||||||
);
|
->responseFactory
|
||||||
|
->createResponse()
|
||||||
|
->withHeader(
|
||||||
|
'Content-Type',
|
||||||
|
'application/json; charset=utf-8'
|
||||||
|
)
|
||||||
|
->withStatus(
|
||||||
|
array_key_first($this->responseStatus),
|
||||||
|
''
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$this->response->setStatus(
|
||||||
|
array_key_first($this->responseStatus)
|
||||||
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->response->setStatus($this->responseStatus);
|
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||||
|
$response = $this
|
||||||
|
->responseFactory
|
||||||
|
->createResponse()
|
||||||
|
->withHeader(
|
||||||
|
'Content-Type',
|
||||||
|
'application/json; charset=utf-8'
|
||||||
|
)
|
||||||
|
->withStatus($this->responseStatus, '');
|
||||||
|
} else {
|
||||||
|
$this->response->setStatus($this->responseStatus);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($this->pageType == $this->ajaxPageType) {
|
if ($this->pageType == $this->ajaxPageType) {
|
||||||
if ($this->environmentService->isEnvironmentInBackendMode()) {
|
if ($this->environmentService->isEnvironmentInBackendMode()) {
|
||||||
|
@ -41,9 +41,14 @@ class TranslationController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionCont
|
|||||||
$languageFactory = GeneralUtility::makeInstance(
|
$languageFactory = GeneralUtility::makeInstance(
|
||||||
LocalizationFactory::class
|
LocalizationFactory::class
|
||||||
);
|
);
|
||||||
|
$language = $this->request->getAttribute('language');
|
||||||
|
$locale = $language->getLocale();
|
||||||
|
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||||
|
// $locale, '$locale', 3, true, false
|
||||||
|
//);
|
||||||
$langfileContent = $languageFactory->getParsedData(
|
$langfileContent = $languageFactory->getParsedData(
|
||||||
$langfilePath,
|
$langfilePath,
|
||||||
$GLOBALS['LANG']->lang
|
$locale
|
||||||
);
|
);
|
||||||
$langfileResult = [];
|
$langfileResult = [];
|
||||||
foreach (reset($langfileContent) as $key => $row) {
|
foreach (reset($langfileContent) as $key => $row) {
|
||||||
|
@ -102,11 +102,17 @@ trait DependencyInjectionTrait
|
|||||||
$frameworkConfiguration['persistence']['storagePid']
|
$frameworkConfiguration['persistence']['storagePid']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->reflectionService = GeneralUtility::makeInstance(
|
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||||
ReflectionService::class, GeneralUtility::makeInstance(
|
$this->reflectionService = GeneralUtility::makeInstance(
|
||||||
CacheManager::class
|
ReflectionService::class
|
||||||
)
|
);
|
||||||
);
|
} else {
|
||||||
|
$this->reflectionService = GeneralUtility::makeInstance(
|
||||||
|
ReflectionService::class, GeneralUtility::makeInstance(
|
||||||
|
CacheManager::class
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
$classInfo = $this->reflectionService->getClassSchema(
|
$classInfo = $this->reflectionService->getClassSchema(
|
||||||
get_class($this)
|
get_class($this)
|
||||||
);
|
);
|
||||||
|
@ -66,7 +66,7 @@ class TranslationViewHelper extends AbstractViewHelper
|
|||||||
$translation = LocalizationUtility::translate(
|
$translation = LocalizationUtility::translate(
|
||||||
$arguments['key'],
|
$arguments['key'],
|
||||||
$arguments['extensionKey'],
|
$arguments['extensionKey'],
|
||||||
$arguments['arguments']
|
(array) $arguments['arguments']
|
||||||
);
|
);
|
||||||
if ($translation) {
|
if ($translation) {
|
||||||
return $translation;
|
return $translation;
|
||||||
|
14
Configuration/TCA/Overrides/tt_content.php
Normal file
14
Configuration/TCA/Overrides/tt_content.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
defined('TYPO3') || die();
|
||||||
|
|
||||||
|
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||||
|
'TemplatesAide',
|
||||||
|
'Dummy',
|
||||||
|
'dummy'
|
||||||
|
);
|
||||||
|
|
||||||
|
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||||
|
'TemplatesAide',
|
||||||
|
'Translationplugin',
|
||||||
|
'translation'
|
||||||
|
);
|
@ -18,6 +18,16 @@
|
|||||||
<f:variable name="buttonBackgroundcolor" value="#8ABF6F" />
|
<f:variable name="buttonBackgroundcolor" value="#8ABF6F" />
|
||||||
</f:else>
|
</f:else>
|
||||||
</f:if>
|
</f:if>
|
||||||
|
<f:if condition="{styleH1}">
|
||||||
|
<f:else>
|
||||||
|
<f:variable name="styleH1" value="" />
|
||||||
|
</f:else>
|
||||||
|
</f:if>
|
||||||
|
<f:if condition="{styleButton}">
|
||||||
|
<f:else>
|
||||||
|
<f:variable name="styleButton" value="padding: 10px 15px; border-radius: 3px;" />
|
||||||
|
</f:else>
|
||||||
|
</f:if>
|
||||||
<f:variable name="widthPadded" value="{width - padding - padding}" />
|
<f:variable name="widthPadded" value="{width - padding - padding}" />
|
||||||
<f:variable name="widthTableColumn" value="{widthPadded / 2}" />
|
<f:variable name="widthTableColumn" value="{widthPadded / 2}" />
|
||||||
|
|
||||||
@ -81,7 +91,7 @@
|
|||||||
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1.4;text-align:{align};color:#000000;">
|
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1.4;text-align:{align};color:#000000;">
|
||||||
<f:switch expression="{row.type}">
|
<f:switch expression="{row.type}">
|
||||||
<f:case value="headline">
|
<f:case value="headline">
|
||||||
<h1>{row.data -> f:format.nl2br() -> f:format.raw()}</h1>
|
<h1 style="{styleH1}">{row.data -> f:format.nl2br() -> f:format.raw()}</h1>
|
||||||
</f:case>
|
</f:case>
|
||||||
<f:case value="headline2">
|
<f:case value="headline2">
|
||||||
<h2>{row.data -> f:format.nl2br() -> f:format.raw()}</h2>
|
<h2>{row.data -> f:format.nl2br() -> f:format.raw()}</h2>
|
||||||
@ -103,7 +113,7 @@
|
|||||||
<span style="display: inline-block;" class="buttonwrapper">
|
<span style="display: inline-block;" class="buttonwrapper">
|
||||||
<f:variable name="rowData">{row.data -> v:format.json.decode()}</f:variable>
|
<f:variable name="rowData">{row.data -> v:format.json.decode()}</f:variable>
|
||||||
<a style="display: inline-block; color: {buttonColor}" target="_blank" href="{rowData.0}">
|
<a style="display: inline-block; color: {buttonColor}" target="_blank" href="{rowData.0}">
|
||||||
<span style="display: inline-block; padding: 10px 15px; border-radius: 3px; background-color: {buttonBackgroundcolor};">
|
<span style="display: inline-block; background-color: {buttonBackgroundcolor}; {styleButton}">
|
||||||
{rowData.1}
|
{rowData.1}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
#options.pageTree.showPageIdWithTitle = 1
|
|
||||||
options.pageTree.showNavTitle = 1
|
|
||||||
|
|
||||||
options {
|
options {
|
||||||
folderTree {
|
folderTree {
|
||||||
uploadFieldsInLinkBrowser = 0
|
uploadFieldsInLinkBrowser = 0
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"typo3/cms-core": "8.7.0 - 10.99.99",
|
"typo3/cms-core": "8.7.0 - 11.99.99",
|
||||||
"sarhan/php-flatten": "^4.0"
|
"sarhan/php-flatten": "^4.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -23,7 +23,6 @@ $EM_CONF[$_EXTKEY] = [
|
|||||||
'version' => '0.0.1',
|
'version' => '0.0.1',
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
'depends' => [
|
'depends' => [
|
||||||
'typo3' => '8.7.0-10.99.99',
|
|
||||||
],
|
],
|
||||||
'conflicts' => [],
|
'conflicts' => [],
|
||||||
'suggests' => [],
|
'suggests' => [],
|
||||||
|
@ -1,36 +1,59 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('TYPO3_MODE') || die('Access denied.');
|
defined('TYPO3_MODE') || die('Access denied.');
|
||||||
|
|
||||||
|
|
||||||
|
(static function() {
|
||||||
|
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
call_user_func(
|
call_user_func(
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
|
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||||
|
|
||||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||||
'Cjel.TemplatesAide',
|
'TemplatesAide',
|
||||||
'Dummy',
|
'Translationplugin',
|
||||||
[
|
[
|
||||||
'Dummy' => 'list',
|
\Cjel\TemplatesAide\Controller\TranslationController::class => 'translations'
|
||||||
'Translation' => 'translations'
|
],
|
||||||
],
|
// non-cacheable actions
|
||||||
// non-cacheable actions
|
[
|
||||||
[
|
\Cjel\TemplatesAide\Controller\TranslationController::class => ''
|
||||||
'Dummy' => '',
|
]
|
||||||
'Translation' => ''
|
);
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
} else {
|
||||||
'Cjel.TemplatesAide',
|
|
||||||
'Translationplugin',
|
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||||
[
|
'Cjel.TemplatesAide',
|
||||||
'Translation' => 'translations'
|
'Dummy',
|
||||||
],
|
[
|
||||||
// non-cacheable actions
|
'Dummy' => 'list',
|
||||||
[
|
'Translation' => 'translations'
|
||||||
'Dummy' => '',
|
],
|
||||||
'Translation' => ''
|
// non-cacheable actions
|
||||||
]
|
[
|
||||||
);
|
'Dummy' => '',
|
||||||
|
'Translation' => ''
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||||
|
'Cjel.TemplatesAide',
|
||||||
|
'Translationplugin',
|
||||||
|
[
|
||||||
|
'Translation' => 'translations'
|
||||||
|
],
|
||||||
|
// non-cacheable actions
|
||||||
|
[
|
||||||
|
'Dummy' => '',
|
||||||
|
'Translation' => ''
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// wizards
|
// wizards
|
||||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
|
||||||
@ -119,4 +142,4 @@ call_user_func(
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -39,14 +39,25 @@ call_user_func(
|
|||||||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][] =
|
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][] =
|
||||||
\Cjel\TemplatesAide\Hooks\WizardItems::class;
|
\Cjel\TemplatesAide\Hooks\WizardItems::class;
|
||||||
|
|
||||||
if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->isDevelopment()) {
|
|
||||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
|
||||||
'EXT:templates_aide/Resources/Public/Css/backend/dev';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->__toString() === 'Production/Stage') {
|
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
if (\TYPO3\CMS\Core\Core\Environment::getContext()->isDevelopment()) {
|
||||||
'EXT:templates_aide/Resources/Public/Css/backend/production-stage';
|
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||||
|
'EXT:templates_aide/Resources/Public/Css/backend/dev';
|
||||||
|
}
|
||||||
|
if(\TYPO3\CMS\Core\Core\Environment::getContext()->__toString() === 'Production/Stage') {
|
||||||
|
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||||
|
'EXT:templates_aide/Resources/Public/Css/backend/production-stage';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->isDevelopment()) {
|
||||||
|
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||||
|
'EXT:templates_aide/Resources/Public/Css/backend/dev';
|
||||||
|
}
|
||||||
|
if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->__toString() === 'Production/Stage') {
|
||||||
|
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||||
|
'EXT:templates_aide/Resources/Public/Css/backend/production-stage';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['templates_aide_default'] =
|
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['templates_aide_default'] =
|
||||||
@ -83,4 +94,4 @@ $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = str_replace(
|
|||||||
'recursiveDelete',
|
'recursiveDelete',
|
||||||
'recursiveDelete,disableDragModal',
|
'recursiveDelete,disableDragModal',
|
||||||
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'],
|
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'],
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user