diff --git a/Classes/ViewHelpers/Backend/EditRecordUrlViewHelper.php b/Classes/ViewHelpers/Backend/EditRecordUrlViewHelper.php new file mode 100755 index 00000000..43b9ee45 --- /dev/null +++ b/Classes/ViewHelpers/Backend/EditRecordUrlViewHelper.php @@ -0,0 +1,86 @@ + $this->buildParameters($entity), 'returnUrl' => $returnUrl], + $this->buildRenderChildrenClosure(), + $this->renderingContext + ); + } + + /** + * @param array $arguments + * @param \Closure $renderChildrenClosure + * @param RenderingContextInterface $renderingContext + * @return string + */ + public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) + { + $parameters = GeneralUtility::explodeUrl2Array($arguments['parameters']); + $parameters['returnUrl'] = $arguments['returnUrl']; + + return BackendUtility::getModuleUrl('record_edit', $parameters); + } + + + + protected function buildParameters(AbstractEntity $entity) + { + + $className = get_class($entity); + + $classToTableMap = [ + 'Tx_Yag_Domain_Model_Gallery' => 'tx_yag_domain_model_gallery', + 'Tx_Yag_Domain_Model_Album' => 'tx_yag_domain_model_album', + 'Tx_Yag_Domain_Model_Item' => 'tx_yag_domain_model_item', + ]; + + $tableName = $classToTableMap[$className]; + + $parameters = sprintf('edit[%s][%s]=edit', $tableName, $entity->getUid()); + + return $parameters; + } +} \ No newline at end of file diff --git a/Resources/Private/Partials/Album/AlbumAdminEdit.html b/Resources/Private/Partials/Album/AlbumAdminEdit.html index fb62e829..ecb02e4b 100755 --- a/Resources/Private/Partials/Album/AlbumAdminEdit.html +++ b/Resources/Private/Partials/Album/AlbumAdminEdit.html @@ -1,4 +1,5 @@ {namespace yag=Tx_Yag_ViewHelpers} +{namespace yagns=DL\Yag\ViewHelpers} {namespace extlist=Tx_PtExtlist_ViewHelpers} {namespace ptx=Tx_PtExtbase_ViewHelpers} {namespace rbac=Tx_Rbac_ViewHelpers} @@ -48,7 +49,7 @@
- + diff --git a/Resources/Private/Partials/Album/FormFields.html b/Resources/Private/Partials/Album/FormFields.html index 4df9344f..ebce8c97 100755 --- a/Resources/Private/Partials/Album/FormFields.html +++ b/Resources/Private/Partials/Album/FormFields.html @@ -1,70 +1,73 @@ -{namespace yag=Tx_Yag_ViewHelpers} +{namespace yag=DL\Yag\ViewHelpers} {namespace ptx=Tx_PtExtbase_ViewHelpers} {namespace extlist=Tx_PtExtlist_ViewHelpers} {namespace core=TYPO3\CMS\Core\ViewHelpers}
- -
-
- -
-
+ +
+
+ +
+
- -
-
- -
-
+ +
+
+ +
+
-
-
-
diff --git a/Resources/Private/Partials/Image/FormFields.html b/Resources/Private/Partials/Image/FormFields.html index 7ba171d1..ed6ef2a7 100755 --- a/Resources/Private/Partials/Image/FormFields.html +++ b/Resources/Private/Partials/Image/FormFields.html @@ -1,4 +1,5 @@ {namespace yag=Tx_Yag_ViewHelpers} +{namespace yagns=DL\Yag\ViewHelpers} {namespace ptx=Tx_PtExtbase_ViewHelpers} {namespace extlist=Tx_PtExtlist_ViewHelpers} {namespace core=TYPO3\CMS\Core\ViewHelpers} @@ -32,8 +33,12 @@
- - + + + + + +
diff --git a/Resources/Private/Partials/Image/ImageAdminEdit.html b/Resources/Private/Partials/Image/ImageAdminEdit.html index b9aa845e..7bd1d6a7 100755 --- a/Resources/Private/Partials/Image/ImageAdminEdit.html +++ b/Resources/Private/Partials/Image/ImageAdminEdit.html @@ -1,4 +1,5 @@ {namespace yag=Tx_Yag_ViewHelpers} +{namespace yagns=DL\Yag\ViewHelpers} {namespace ptx=Tx_PtExtbase_ViewHelpers} {namespace extlist=Tx_PtExtlist_ViewHelpers} {namespace core=TYPO3\CMS\Core\ViewHelpers} @@ -44,7 +45,7 @@
- + diff --git a/Resources/Private/Templates/Themes/Backend/Gallery/Partials/IndexTabGallerySettings.html b/Resources/Private/Templates/Themes/Backend/Gallery/Partials/IndexTabGallerySettings.html index 78c10602..06cac969 100644 --- a/Resources/Private/Templates/Themes/Backend/Gallery/Partials/IndexTabGallerySettings.html +++ b/Resources/Private/Templates/Themes/Backend/Gallery/Partials/IndexTabGallerySettings.html @@ -1,4 +1,4 @@ -{namespace yag=Tx_Yag_ViewHelpers} +{namespace yag=DL\Yag\ViewHelpers} {namespace extlist=Tx_PtExtlist_ViewHelpers} {namespace ptx=Tx_PtExtbase_ViewHelpers} {namespace core=TYPO3\CMS\Core\ViewHelpers} @@ -23,9 +23,8 @@

\ No newline at end of file