diff --git a/CHANGELOG.md b/CHANGELOG.md
index 90256ec..78f0838 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
## x.y.z
### Added
+- Add a FE editor (#864)
- Add automerging of green Dependabot PRs (#756)
### Changed
diff --git a/Classes/Controller/FrontEndEditorController.php b/Classes/Controller/FrontEndEditorController.php
new file mode 100644
index 0000000..f71cbbc
--- /dev/null
+++ b/Classes/Controller/FrontEndEditorController.php
@@ -0,0 +1,44 @@
+context = $context;
+ $this->teaRepository = $teaRepository;
+ }
+
+ public function indexAction(): ResponseInterface
+ {
+ $userUid = $this->getUidOfLoggedInUser();
+ if ($userUid > 0) {
+ $this->view->assign('teas', $this->teaRepository->findByOwnerUid($userUid));
+ }
+
+ return $this->htmlResponse();
+ }
+
+ /**
+ * @return int<0, max>
+ */
+ private function getUidOfLoggedInUser(): int
+ {
+ return $this->context->getPropertyFromAspect('frontend.user', 'id');
+ }
+}
diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php
index cd25ffb..638d902 100644
--- a/Configuration/TCA/Overrides/tt_content.php
+++ b/Configuration/TCA/Overrides/tt_content.php
@@ -23,9 +23,17 @@ call_user_func(
'EXT:tea/Resources/Public/Icons/Extension.svg'
);
+ \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
+ 'Tea',
+ 'TeaFrontEndEditor',
+ 'LLL:EXT:tea/Resources/Private/Language/locallang.xlf:plugin.tea_frontend_editor',
+ 'EXT:tea/Resources/Public/Icons/Extension.svg'
+ );
+
// This removes the default controls from the plugin.
$controlsToRemove = 'recursive,select_key,pages';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['tea_teaindex'] = $controlsToRemove;
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['tea_teashow'] = $controlsToRemove;
+ $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['tea_teafrontendeditor'] = $controlsToRemove;
}
);
diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf
index 5f0491b..9875a07 100644
--- a/Resources/Private/Language/de.locallang.xlf
+++ b/Resources/Private/Language/de.locallang.xlf
@@ -11,6 +11,10 @@
Tee-Einzelansicht
+
+
+ Frontend-Editor für Tee
+
Unsere Auswahl an erlesenen Tees
@@ -23,6 +27,22 @@
Titel
+
+
+ Meine Tees
+
+
+
+ Du hast noch keine Tees angelegt.
+
+
+
+ UID
+
+
+
+ Titel
+