N°3123 - DataTables rework (WIP)

This commit is contained in:
Eric
2020-12-10 17:13:15 +01:00
parent b03c5232b0
commit 2bef89137e
24 changed files with 293 additions and 218 deletions

View File

@@ -1,21 +1,24 @@
{% for oSubBlock in oUIBlock.GetSubBlocks() %}{{ render_block(oSubBlock, {aPage: aPage}) }}{% endfor %}
{% if oUIBlock.GetOptions()["select_mode"] is defined %}
<input type="hidden" name="selectionMode" value="positive"/>
{% if oUIBlock.GetAjaxData()["extra_params"] is not empty %}
<input type="hidden" name="extra_params" value="{{ oUIBlock.GetAjaxData()["extra_params"] }}"/>
{% endif %}
{% if oUIBlock.GetAjaxData()["filter"] is not empty %}
<input type="hidden" name="filter" value="{{ oUIBlock.GetAjaxData()["filter"] }}"/>
{% endif %}
{% if oUIBlock.GetOptions("select_mode") is not empty %}
<input type="hidden" name="selectionMode" value="positive"/>
<input type="hidden" name="selectionCount" value="0"/>
<div data-target="ibo-datatable--selection"></div>
{% if oUIBlock.GetAjaxData("extra_params") is not empty %}
<input type="hidden" name="extra_params" value="{{ oUIBlock.GetAjaxData("extra_params")|raw|json_encode }}"/>
{% endif %}
{% if oUIBlock.GetAjaxData("filter") is not empty %}
<input type="hidden" name="filter" value="{{ oUIBlock.GetAjaxData("filter")|raw }}"/>
{% endif %}
{% endif %}
<table id="{{ oUIBlock.GetId() }}" width="100%" class="{{ oUIBlock.GetBlockCode() }}">
<thead>
{% if oUIBlock.GetOptions()["select_mode"] is defined %}
<th></th>
{% endif %}
{% for aColumn in oUIBlock.GetDisplayColumns() %}
<th class="ibo-datatable-header" {% if aColumn["description"] is not empty %}title="{{ aColumn["description"] }}"{% endif %}>{{ aColumn["attribute_label"] }} </th>
{% endfor %}
</thead>
</table>
<thead>
{% if oUIBlock.GetOption("select_mode") is not empty %}
<th></th>
{% endif %}
{% for aColumn in oUIBlock.GetDisplayColumns() %}
<th class="ibo-datatable-header" {% if aColumn["description"] is not empty %}title="{{ aColumn["description"] }}"{% endif %}>{{ aColumn["attribute_label"] }} </th>
{% endfor %}
</thead>
</table>