mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 16:22:20 +02:00
N°2847 - Datatables for forms
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
|
||||
{# @license http://opensource.org/licenses/AGPL-3.0 #}
|
||||
|
||||
<input type="hidden" name="attr_{{ oUIBlock.GetRef() }}" value="">
|
||||
|
||||
{% set columns = oUIBlock.GetColumns() %}
|
||||
<table id="{{ oUIBlock.GetId() }}" class="ibo-datatable listResults" style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for column in columns %}
|
||||
<th class="ibo-datatable-header" title="{{ column.description }}">{{ column.label|raw }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for rowId,data in oUIBlock.GetData() %}
|
||||
<tr role="row" id="{{ oUIBlock.GetRef() }}_row_{{ rowId }}">
|
||||
{% for name,column in columns %}
|
||||
<td>
|
||||
{% set cellValueHtml = '' %}
|
||||
{% for cellName,cellValue in data %}
|
||||
{% if cellName == name %}
|
||||
{% set cellValueHtml = cellValue %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if cellValueHtml is empty %}
|
||||
{% set cellValueHtml = ' ' %}
|
||||
{% endif %}
|
||||
{{ cellValueHtml|raw }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user