From ee36c1bfd408fbc099a5092ed8165141743e35a1 Mon Sep 17 00:00:00 2001 From: Benjamin Giesbrecht Date: Thu, 9 Feb 2023 10:11:25 +0000 Subject: [PATCH 1/8] gray badge --- .../Backend/PageLayout/Grid/ColumnHeader.html | 28 ++++++------ .../Partials/Backend/PageLayout/Record.html | 11 ++++- Resources/Public/Css/backend.css | 45 ++++++++++--------- 3 files changed, 49 insertions(+), 35 deletions(-) diff --git a/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html b/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html index ea815f5..a52c4a0 100644 --- a/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html +++ b/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html @@ -6,19 +6,21 @@ -
- - - - {maxitems} - - - {maxitems} - - - {maxitems} - - + + + + + + + + + +
+ + + {f:if(condition: '{maxitems} > 99', then: '+99', else: '{maxitems}')} + +
diff --git a/Resources/Private/Partials/Backend/PageLayout/Record.html b/Resources/Private/Partials/Backend/PageLayout/Record.html index fb58f21..12cb41a 100644 --- a/Resources/Private/Partials/Backend/PageLayout/Record.html +++ b/Resources/Private/Partials/Backend/PageLayout/Record.html @@ -3,7 +3,16 @@ data-namespace-typo3-fluid="true"> -
+ + + + + + + + + +
diff --git a/Resources/Public/Css/backend.css b/Resources/Public/Css/backend.css index f0582c5..6bfefbb 100644 --- a/Resources/Public/Css/backend.css +++ b/Resources/Public/Css/backend.css @@ -1,34 +1,37 @@ @charset "UTF-8"; -.t3-cd-badge-container { - position: relative; +.t3js-page-column .t3-cd-badge-container[data-maxitems="0"] .t3-page-ce .t3js-page-new-ce, +.t3js-page-column .t3-cd-badge-container[data-maxitems="0"] .t3-page-ce .t3-page-ce-dropzone { + display: none; } -.t3-cd-badge-container[data-maxitems="0"] .t3-page-ce .t3js-page-new-ce, -.t3-cd-badge-container[data-maxitems="0"] .t3-page-ce .t3-page-ce-dropzone { - display: none; +body[style="cursor: move;"] .t3js-page-column .t3-cd-badge-container[data-maxitems="0"] .t3-page-ce .t3js-page-new-ce, +body[style="cursor: move;"].t3js-page-column .t3-cd-badge-container[data-maxitems="0"] .t3-page-ce .t3-page-ce-dropzone { + display: block; + visibility: hidden; } -.t3-cd-badge { - position: absolute; - left: 0; - top: 0; - transform: translate(-50%, 0); - background-color: #ff0000; - z-index: 100; +.t3-cd-badge-container:not([data-maxitems="-1"]) .t3-page-column-header { + padding-left: 25px; } -.t3-cd-badge.text-bg-success { - background-color: #107c10; - color: #ffffff; +.t3-cd-badge-container:not([data-maxitems="-1"]).t3-cd-badge-container-length-2 .t3-page-column-header { + padding-left: 30px; } -.t3-cd-badge.text-bg-warning { - background-color: #e8a33d; - color: #ffffff; +.t3-cd-badge-container:not([data-maxitems="-1"]).t3-cd-badge-container-length-3 .t3-page-column-header { + padding-left: 40px; } -.t3-cd-badge.text-bg-danger { - background-color: #ff0000; - color: #ffffff; +.t3-cd-badge-container { + position: relative; } + +.t3-cd-badge { + position: absolute; + z-index: 1; + left: 0; + top: 21px; + background-color: #eaeaea; + color: #000000; +} \ No newline at end of file From 23dfe4283534df680f7c957926cb2d7df2320a19 Mon Sep 17 00:00:00 2001 From: Benjamin Giesbrecht Date: Thu, 9 Feb 2023 12:29:58 +0000 Subject: [PATCH 2/8] remove container condition --- .../Partials/Backend/PageLayout/Grid/ColumnHeader.html | 4 +++- Resources/Private/Partials/Backend/PageLayout/Record.html | 4 +++- Resources/Public/Css/backend.css | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html b/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html index a52c4a0..3a7ac93 100644 --- a/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html +++ b/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html @@ -7,6 +7,8 @@ + + @@ -15,7 +17,7 @@ -
+
{f:if(condition: '{maxitems} > 99', then: '+99', else: '{maxitems}')} diff --git a/Resources/Private/Partials/Backend/PageLayout/Record.html b/Resources/Private/Partials/Backend/PageLayout/Record.html index 12cb41a..6915b6c 100644 --- a/Resources/Private/Partials/Backend/PageLayout/Record.html +++ b/Resources/Private/Partials/Backend/PageLayout/Record.html @@ -4,6 +4,8 @@ + + @@ -12,7 +14,7 @@ -
+
diff --git a/Resources/Public/Css/backend.css b/Resources/Public/Css/backend.css index 6bfefbb..330fbc2 100644 --- a/Resources/Public/Css/backend.css +++ b/Resources/Public/Css/backend.css @@ -11,7 +11,7 @@ body[style="cursor: move;"].t3js-page-column .t3-cd-badge-container[data-maxitem visibility: hidden; } -.t3-cd-badge-container:not([data-maxitems="-1"]) .t3-page-column-header { +.t3-cd-badge-container:not([data-maxitems="-1"]).t3-cd-badge-container-length-1 .t3-page-column-header { padding-left: 25px; } From 276fa1323685df7099a52a12042adb4fb324ca7d Mon Sep 17 00:00:00 2001 From: RefstalSolutionsDev Date: Thu, 9 Mar 2023 16:19:48 +0530 Subject: [PATCH 3/8] Fix styling and partial issue at TYPO3 10 and 12 --- Classes/ViewHelpers/GetVersionViewHelper.php | 32 +++++++++++++++++++ Configuration/TSconfig/Page/maxitems.tsconfig | 2 +- Configuration/TypoScript/constants.typoscript | 3 +- .../PageLayout/Grid/ColumnHeader.html | 2 +- .../{ => Partials}/PageLayout/Record.html | 0 Resources/Public/Css/backend.css | 6 ++++ 6 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 Classes/ViewHelpers/GetVersionViewHelper.php rename Resources/Private/Partials/Backend/{ => Partials}/PageLayout/Grid/ColumnHeader.html (87%) rename Resources/Private/Partials/Backend/{ => Partials}/PageLayout/Record.html (100%) diff --git a/Classes/ViewHelpers/GetVersionViewHelper.php b/Classes/ViewHelpers/GetVersionViewHelper.php new file mode 100644 index 0000000..97e95df --- /dev/null +++ b/Classes/ViewHelpers/GetVersionViewHelper.php @@ -0,0 +1,32 @@ +getMajorVersion(); + + return $version; + } +} diff --git a/Configuration/TSconfig/Page/maxitems.tsconfig b/Configuration/TSconfig/Page/maxitems.tsconfig index eb1b892..c9693fa 100644 --- a/Configuration/TSconfig/Page/maxitems.tsconfig +++ b/Configuration/TSconfig/Page/maxitems.tsconfig @@ -1,2 +1,2 @@ -templates.typo3/cms-backend.100 = ichhabrecht/content-defender:Resources/Private/ +templates.typo3/cms-backend.100 = ichhabrecht/content-defender:Resources/Private/Partials/Backend/ \ No newline at end of file diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index 42f7ad8..83278eb 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -3,8 +3,9 @@ module.tx_contentdefender { # cat=plugin.tx_contentdefender/file; type=string; label=Path to template root templateRootPath = EXT:content_defender/Resources/Private/Templates/Backend/ # cat=plugin.tx_contentdefender/file; type=string; label=Path to template partials - partialRootPath = EXT:content_defender/Resources/Private/Partials/Backend/ + partialRootPath = EXT:content_defender/Resources/Private/Partials/Backend/Partials/ # cat=plugin.tx_contentdefender/file; type=string; label=Path to template layouts layoutRootPath = EXT:content_defender/Resources/Private/Layouts/Backend/ } } +` \ No newline at end of file diff --git a/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html b/Resources/Private/Partials/Backend/Partials/PageLayout/Grid/ColumnHeader.html similarity index 87% rename from Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html rename to Resources/Private/Partials/Backend/Partials/PageLayout/Grid/ColumnHeader.html index 3a7ac93..d15e3ea 100644 --- a/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html +++ b/Resources/Private/Partials/Backend/Partials/PageLayout/Grid/ColumnHeader.html @@ -17,7 +17,7 @@ -
+
{f:if(condition: '{maxitems} > 99', then: '+99', else: '{maxitems}')} diff --git a/Resources/Private/Partials/Backend/PageLayout/Record.html b/Resources/Private/Partials/Backend/Partials/PageLayout/Record.html similarity index 100% rename from Resources/Private/Partials/Backend/PageLayout/Record.html rename to Resources/Private/Partials/Backend/Partials/PageLayout/Record.html diff --git a/Resources/Public/Css/backend.css b/Resources/Public/Css/backend.css index 330fbc2..c48044d 100644 --- a/Resources/Public/Css/backend.css +++ b/Resources/Public/Css/backend.css @@ -34,4 +34,10 @@ body[style="cursor: move;"].t3js-page-column .t3-cd-badge-container[data-maxitem top: 21px; background-color: #eaeaea; color: #000000; +} + +.t3-cd-badge-container.typo3-version-12 .t3-cd-badge{ + background-color: #c6bebe; + left: 1rem; + top: 0; } \ No newline at end of file From 57d971cb62a1709e2c4249aeb1b5bd004404b419 Mon Sep 17 00:00:00 2001 From: RefstalSolutionsDev Date: Tue, 14 Mar 2023 15:35:28 +0530 Subject: [PATCH 4/8] Adapt fixes for TYPO3 12 --- Classes/ViewHelpers/GetVersionViewHelper.php | 32 +++++++++++++++++++ Configuration/TSconfig/Page/maxitems.tsconfig | 2 +- Configuration/TypoScript/constants.typoscript | 7 ++-- .../PageLayout/Grid/ColumnHeader.html | 5 +++ .../Partials}/PageLayout/Record.html | 0 Resources/Public/Css/backend_v12.css | 5 +++ 6 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 Classes/ViewHelpers/GetVersionViewHelper.php rename Resources/Private/{Partials/Backend => Backend/Partials}/PageLayout/Grid/ColumnHeader.html (87%) rename Resources/Private/{Partials/Backend => Backend/Partials}/PageLayout/Record.html (100%) create mode 100644 Resources/Public/Css/backend_v12.css diff --git a/Classes/ViewHelpers/GetVersionViewHelper.php b/Classes/ViewHelpers/GetVersionViewHelper.php new file mode 100644 index 0000000..97e95df --- /dev/null +++ b/Classes/ViewHelpers/GetVersionViewHelper.php @@ -0,0 +1,32 @@ +getMajorVersion(); + + return $version; + } +} diff --git a/Configuration/TSconfig/Page/maxitems.tsconfig b/Configuration/TSconfig/Page/maxitems.tsconfig index eb1b892..956bcf9 100644 --- a/Configuration/TSconfig/Page/maxitems.tsconfig +++ b/Configuration/TSconfig/Page/maxitems.tsconfig @@ -1,2 +1,2 @@ -templates.typo3/cms-backend.100 = ichhabrecht/content-defender:Resources/Private/ +templates.typo3/cms-backend.100 = ichhabrecht/content-defender:Resources/Private/Backend/ \ No newline at end of file diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index 42f7ad8..76803da 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -1,10 +1,11 @@ module.tx_contentdefender { view { # cat=plugin.tx_contentdefender/file; type=string; label=Path to template root - templateRootPath = EXT:content_defender/Resources/Private/Templates/Backend/ + templateRootPath = EXT:content_defender/Resources/Private/Backend/Templates/ # cat=plugin.tx_contentdefender/file; type=string; label=Path to template partials - partialRootPath = EXT:content_defender/Resources/Private/Partials/Backend/ + partialRootPath = EXT:content_defender/Resources/Private/Backend/Partials/ # cat=plugin.tx_contentdefender/file; type=string; label=Path to template layouts - layoutRootPath = EXT:content_defender/Resources/Private/Layouts/Backend/ + layoutRootPath = EXT:content_defender/Resources/Private/Backend/Layouts/ } } +` \ No newline at end of file diff --git a/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html b/Resources/Private/Backend/Partials/PageLayout/Grid/ColumnHeader.html similarity index 87% rename from Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html rename to Resources/Private/Backend/Partials/PageLayout/Grid/ColumnHeader.html index 3a7ac93..2158fe1 100644 --- a/Resources/Private/Partials/Backend/PageLayout/Grid/ColumnHeader.html +++ b/Resources/Private/Backend/Partials/PageLayout/Grid/ColumnHeader.html @@ -4,6 +4,11 @@ + + + + + diff --git a/Resources/Private/Partials/Backend/PageLayout/Record.html b/Resources/Private/Backend/Partials/PageLayout/Record.html similarity index 100% rename from Resources/Private/Partials/Backend/PageLayout/Record.html rename to Resources/Private/Backend/Partials/PageLayout/Record.html diff --git a/Resources/Public/Css/backend_v12.css b/Resources/Public/Css/backend_v12.css new file mode 100644 index 0000000..2dd2ba2 --- /dev/null +++ b/Resources/Public/Css/backend_v12.css @@ -0,0 +1,5 @@ +.t3-cd-badge-container .t3-cd-badge{ + background-color: #c6bebe; + left: 1rem; + top: 0; +} \ No newline at end of file From 3902cadc538a16097772412c5530b6d07d694d38 Mon Sep 17 00:00:00 2001 From: RefstalSolutionsDev Date: Tue, 14 Mar 2023 15:50:49 +0530 Subject: [PATCH 5/8] Adapt fixes for TYPO3 12 --- Configuration/TSconfig/Page/maxitems.tsconfig | 4 ---- Configuration/TypoScript/constants.typoscript | 4 ---- 2 files changed, 8 deletions(-) diff --git a/Configuration/TSconfig/Page/maxitems.tsconfig b/Configuration/TSconfig/Page/maxitems.tsconfig index 723bc33..f4eadb0 100644 --- a/Configuration/TSconfig/Page/maxitems.tsconfig +++ b/Configuration/TSconfig/Page/maxitems.tsconfig @@ -1,6 +1,2 @@ -<<<<<<< HEAD templates.typo3/cms-backend.100 = ichhabrecht/content-defender:Resources/Private/Backend/ -======= -templates.typo3/cms-backend.100 = ichhabrecht/content-defender:Resources/Private/Partials/Backend/ ->>>>>>> 276fa1323685df7099a52a12042adb4fb324ca7d diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index e2aa16d..76803da 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -3,11 +3,7 @@ module.tx_contentdefender { # cat=plugin.tx_contentdefender/file; type=string; label=Path to template root templateRootPath = EXT:content_defender/Resources/Private/Backend/Templates/ # cat=plugin.tx_contentdefender/file; type=string; label=Path to template partials -<<<<<<< HEAD partialRootPath = EXT:content_defender/Resources/Private/Backend/Partials/ -======= - partialRootPath = EXT:content_defender/Resources/Private/Partials/Backend/Partials/ ->>>>>>> 276fa1323685df7099a52a12042adb4fb324ca7d # cat=plugin.tx_contentdefender/file; type=string; label=Path to template layouts layoutRootPath = EXT:content_defender/Resources/Private/Backend/Layouts/ } From d1d44c8fe1058696e53d3159f8268fe405a4adf1 Mon Sep 17 00:00:00 2001 From: Klick&Klar Date: Wed, 15 Mar 2023 17:50:52 +0100 Subject: [PATCH 6/8] Update GetVersionViewHelper.php --- Classes/ViewHelpers/GetVersionViewHelper.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Classes/ViewHelpers/GetVersionViewHelper.php b/Classes/ViewHelpers/GetVersionViewHelper.php index 97e95df..2b71af5 100644 --- a/Classes/ViewHelpers/GetVersionViewHelper.php +++ b/Classes/ViewHelpers/GetVersionViewHelper.php @@ -2,8 +2,6 @@ namespace IchHabRecht\ContentDefender\ViewHelpers; -use IchHabRecht\ContentDefender\BackendLayout\BackendLayoutConfiguration; -use TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumn; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; @@ -23,10 +21,6 @@ public static function renderStatic( \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext ) { - $version = NULL; - - $version = (new Typo3Version())->getMajorVersion(); - - return $version; + return (new Typo3Version())->getMajorVersion(); } } From 829fb6db5ae281401ac87c500e0deb5149a39c38 Mon Sep 17 00:00:00 2001 From: Klick&Klar Date: Wed, 15 Mar 2023 17:54:30 +0100 Subject: [PATCH 7/8] Update GetVersionViewHelper.php --- Classes/ViewHelpers/GetVersionViewHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/ViewHelpers/GetVersionViewHelper.php b/Classes/ViewHelpers/GetVersionViewHelper.php index 2b71af5..388d72e 100644 --- a/Classes/ViewHelpers/GetVersionViewHelper.php +++ b/Classes/ViewHelpers/GetVersionViewHelper.php @@ -2,10 +2,10 @@ namespace IchHabRecht\ContentDefender\ViewHelpers; +use TYPO3\CMS\Core\Information\Typo3Version; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; -use TYPO3\CMS\Core\Information\Typo3Version; class GetVersionViewHelper extends AbstractViewHelper { From 2b2b142afeec6d0400a5147c224414085703fc4d Mon Sep 17 00:00:00 2001 From: Benjamin Giesbrecht Date: Tue, 8 Aug 2023 08:58:44 +0200 Subject: [PATCH 8/8] =?UTF-8?q?[BUG]=20bad=20sign=20=C2=AB`=C2=BB=20in=20t?= =?UTF-8?q?yposcript=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configuration/TypoScript/constants.typoscript | 1 - 1 file changed, 1 deletion(-) diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index 76803da..fee1fa6 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -8,4 +8,3 @@ module.tx_contentdefender { layoutRootPath = EXT:content_defender/Resources/Private/Backend/Layouts/ } } -` \ No newline at end of file