Commit 6d28858a authored by Thomas Löffler's avatar Thomas Löffler

Changes output of supported TYPO3 versions

parent 13ef3c94
Pipeline #2149 passed with stages
in 1 minute and 35 seconds
......@@ -1233,10 +1233,8 @@ class Version extends \T3o\TerFe2\Domain\Model\AbstractEntity
{
// @todo: Get these versions automatically
$typo3Versions = [
'6.2 LTS' => 6002000,
'7 LTS' => 7006000,
'8 LTS' => 8007000,
'9' => 9000000
'8 LTS' => 8007000
];
$supportedTypo3Versions = [];
......
......@@ -106,23 +106,15 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer {
// does this extension supports different versions?
// @todo: use JSON with all versions to get them
$lastVersion = $extension->getLastVersion();
$document->setField('supports6_boolS', Version::doesExtensionVersionSupportTypo3Version($lastVersion, 6002000));
$document->setField('supports7_boolS', Version::doesExtensionVersionSupportTypo3Version($lastVersion, 7006000));
$document->setField('supports8_boolS', Version::doesExtensionVersionSupportTypo3Version($lastVersion, 8007000));
$document->setField('supports9_boolS', Version::doesExtensionVersionSupportTypo3Version($lastVersion, 9000000));
$typo3Support = [];
if (Version::doesExtensionVersionSupportTypo3Version($lastVersion, 6002000)) {
$typo3Support[] = '6.2 LTS';
}
if (Version::doesExtensionVersionSupportTypo3Version($lastVersion, 7006000)) {
$typo3Support[] = '7 LTS';
}
if (Version::doesExtensionVersionSupportTypo3Version($lastVersion, 8007000)) {
$typo3Support[] = '8 LTS';
}
if (Version::doesExtensionVersionSupportTypo3Version($lastVersion, 9000000)) {
$typo3Support[] = '9';
}
$document->setField('typo3support_stringM', $typo3Support);
......
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:if condition="{version.matrixOfSupportedTypo3Versions}">
<h5>Works with TYPO3</h5>
<ul class="list-inline">
<f:for each="{version.matrixOfSupportedTypo3Versions}" key="label" as="supported">
<li class="list-inline-item btn btn-{f:if(condition:'{supported}',then:'success',else:'secondary')}"><strong>{label}</strong></li>
</f:for>
</ul>
<f:for each="{version.matrixOfSupportedTypo3Versions}" key="label" as="supported">
<f:if condition="{supported}">
<span class="badge badge-success"><strong>{label}</strong></span>
</f:if>
</f:for>
</f:if>
</html>
......@@ -61,7 +61,9 @@
<div class="row mb-3">
<div class="col-md-8">
<p>{extension.lastVersion.description}</p>
<f:render partial="VersionSupportForTypo3" arguments="{version: extension.lastVersion}" />
<h3>
<f:render partial="VersionSupportForTypo3" arguments="{version: extension.lastVersion}" />
</h3>
<f:if condition="{extension.tags}">
<h3>Tags</h3>
<p class="tags">
......
......@@ -38,13 +38,14 @@
<f:format.crop maxCharacters="50">{document.author}</f:format.crop>
</small>
</f:comment>
<h5>Works with TYPO3</h5>
<ul class="list-inline">
<li class="list-inline-item btn btn-{f:if(condition:'{document.supports6_boolS}',then:'success',else:'secondary')}"><strong>6.2 LTS</strong></li>
<li class="list-inline-item btn btn-{f:if(condition:'{document.supports7_boolS}',then:'success',else:'secondary')}"><strong>7 LTS</strong></li>
<li class="list-inline-item btn btn-{f:if(condition:'{document.supports8_boolS}',then:'success',else:'secondary')}"><strong>8 LTS</strong></li>
<li class="list-inline-item btn btn-{f:if(condition:'{document.supports9_boolS}',then:'success',else:'secondary')}"><strong>9</strong></li>
</ul>
<h3>
<f:if condition="{document.supports7_boolS}">
<span class="badge badge-success"><strong>7 LTS</strong></span>
</f:if>
<f:if condition="{document.supports8_boolS}">
<span class="badge badge-success"><strong>8 LTS</strong></span>
</f:if>
</h3>
</div>
</div>
<div class="">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment