Skip to content

Commit

Permalink
add new type 'collapse'
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz committed Jan 30, 2024
1 parent 6d9a141 commit 7720b4c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions templates/components/datatable.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@
style="max-width: 250px;">
{{ entry[colkey] }}
</span>
{% elseif formatter == "collapse" %}
{% set rand = random() %}
<div class="accordion" id="inputAccordion{{ rand }}">
<div id="item{{ rand }}">
<a data-bs-toggle="collapse" href="#collapse{{ rand }}">{{ __("See data") }}</a>
</div>
<div id="collapse{{ rand }}" class="accordion-collapse collapse" data-bs-parent="#inputAccordion{{ rand }}">
{{ entry[colkey]|raw }}
</div>
</div>
{% elseif formatter == "longtext" %}
<span class="d-inline-block text-truncate"
title="{{ entry[colkey] }}"
Expand Down

0 comments on commit 7720b4c

Please sign in to comment.