Skip to content

Commit

Permalink
[TASK] Add CSS class for TYPO3 12 to allow backporting of some design
Browse files Browse the repository at this point in the history
  • Loading branch information
einpraegsam committed Nov 21, 2024
1 parent c97f198 commit 5dc321d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions Classes/ViewHelpers/Condition/IsTypo3TwelveViewHelper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);
namespace In2code\Lux\ViewHelpers\Condition;

use In2code\Lux\Utility\ConfigurationUtility;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper;

/**
* @noinspection PhpUnused
* Todo: Can be removed when TYPO3 12 support is dropped
*/
class IsTypo3TwelveViewHelper extends AbstractConditionViewHelper
{
public static function verdict(array $arguments, RenderingContextInterface $renderingContext)
{
return ConfigurationUtility::isTypo3Version12();
}
}
2 changes: 1 addition & 1 deletion Resources/Private/Layouts/Backend.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="module">
<f:render partial="DocHeader" arguments="{docHeader:docHeader}" />

<div class="module-body lux">
<div class="module-body lux{lux:condition.isTypo3Twelve(then:' lux--12')}">
<f:render partial="Miscellaneous/FlashMessages" arguments="{_all}"/>

<f:if condition="{filter} && !{filter.anyAllowedSites}">
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Templates/Backend/PageOverview.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
0: '{f:uri.resource(path:\'Css/PageOverview.min.css\',extensionName:\'Lux\')}'
}"/>

<div class="lux lux-pageoverview-container">
<div class="lux lux-pageoverview-container{lux:condition.isTypo3Twelve(then:' lux--12')}">
<div class="lux-pageoverview-container-inner">
<lux:condition.isLuxenterpriseExtensionActivated>
<f:else>
Expand Down

0 comments on commit 5dc321d

Please sign in to comment.