Commit 274a4524 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

[FEATURE] Set version as id for the roadmap tab

parent 4baa3ccb
Pipeline #25445 passed with stages
in 3 minutes and 38 seconds
......@@ -149,4 +149,13 @@ class MajorVersion extends AbstractEntity
{
$this->minorVersions = $minorVersions;
}
public function getVersionOnly(): int
{
if ($this->minorVersions->count() === 0) {
return 0;
}
return (int)$this->minorVersions->current()->getVersion();
}
}
......@@ -5,13 +5,13 @@
<ul class="nav nav-tabs" role="tablist">
<f:for each="{majorVersions}" as="majorsTabs" key="keyTab" iteration="tabIteratorTabs">
<li class="nav-item listing__nav-item">
<a class="nav-link listing__nav-item_link px-lg-0 py-lg-3{f:if(condition: tabIteratorTabs.isFirst, then: ' active')}" data-toggle="tab" role="tab" href="#major_{majorsTabs.uid}">{majorsTabs.title}</a>
<a class="nav-link listing__nav-item_link px-lg-0 py-lg-3{f:if(condition: tabIteratorTabs.isFirst, then: ' active')}" data-toggle="tab" role="tab" href="#v{majorsTabs.versionOnly}">{majorsTabs.title}</a>
</li>
</f:for>
</ul>
<div class="tab-content mb-5">
<f:for each="{majorVersions}" as="major" key="key" iteration="tabIterator">
<div id="major_{major.uid}" role="tabpanel" class="border tab-pane{f:if(condition: tabIterator.isFirst, then: ' active')}">
<div id="v{major.versionOnly}" role="tabpanel" class="border tab-pane{f:if(condition: tabIterator.isFirst, then: ' active')}">
<div class="p-3">
<h2>{major.title}</h2>
<f:format.html>{major.bodyText}</f:format.html>
......
Supports Markdown
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