IMPR: Add some options to Accordion element

This commit is contained in:
Tony Air 2022-02-28 14:40:20 +02:00
parent 703cea1bf0
commit f959f8d84b

View File

@ -1,28 +1,28 @@
<% if $ElementFilteredControllers %> <% if $ElementFilteredControllers %>
<div id="ElementAccordion{$ID}" class="accordion"> <div id="ElementAccordion{$ID}" class="accordion">
<% loop $ElementFilteredControllers %> <% loop $ElementFilteredControllers %>
<div class="accordion-item"> <div class="accordion-item">
<div id="ElementHeader{$ID}" class="accordion-header"> <div id="ElementHeader{$ID}" class="accordion-header">
<button <button
data-bs-toggle="collapse" data-bs-toggle="collapse"
data-bs-target="#ElementContent{$ID}" data-bs-target="#ElementContent{$ID}"
aria-expanded="<% if $First && $Up.OpenFirst %>true<% else %>false<% end_if %>" aria-expanded="<% if $First && $Up.OwnerPage.OpenFirst %>true<% else %>false<% end_if %>"
aria-controls="ElementContent{$ID}" aria-controls="ElementContent{$ID}"
class="accordion-button collapsed" class="accordion-button collapsed"
>$Title</button> >$Title</button>
</div> </div>
<div <div
id="ElementContent{$ID}" id="ElementContent{$ID}"
class="accordion-collapse collapse<% if $First && $Up.OpenFirst %> show<% end_if %>" class="accordion-collapse collapse<% if $First && $Up.OwnerPage.OpenFirst %> show<% end_if %>"
aria-labelledby="ElementHeader{$ID}" aria-labelledby="ElementHeader{$ID}"
<% if not $Up.KeepOpenned %> <% if not $Up.OwnerPage.KeepOpenned %>
data-bs-parent="#ElementAccordion{$Parent.ID}" data-bs-parent="#ElementAccordion{$Parent.ID}"
<% end_if %> <% end_if %>
> >
<div class="accordion-body">$Me</div> <div class="accordion-body">$Me</div>
</div> </div>
</div> </div>
<% end_loop %> <% end_loop %>
</div> </div>
<% end_if %> <% end_if %>