Display meta-fields in datatables (#1116)
This commit is contained in:
@@ -9,10 +9,17 @@
|
||||
'customer': 'hidden-xs',
|
||||
'comment': 'hidden-xs hidden-sm',
|
||||
'orderNumber': 'hidden-xs hidden-sm',
|
||||
} %}
|
||||
{% for field in metaColumns %}
|
||||
{% set columns = columns|merge({
|
||||
(field.name): {'title': field.label, 'class': 'hidden-xs hidden-sm', 'orderBy': false}
|
||||
}) %}
|
||||
{% endfor %}
|
||||
{% set columns = columns|merge({
|
||||
'team': {'class': '', 'orderBy': false},
|
||||
'visible': {'class': '', 'orderBy': false},
|
||||
'actions': 'actions alwaysVisible',
|
||||
} %}
|
||||
}) %}
|
||||
|
||||
{% set tableName = 'project_admin' %}
|
||||
|
||||
@@ -39,6 +46,11 @@
|
||||
</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'comment') }}">{{ entry.comment|comment2html }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'orderNumber') }}">{{ entry.orderNumber }}</td>
|
||||
{% for field in metaColumns %}
|
||||
<td class="text-nowrap {{ tables.data_table_column_class(tableName, columns, field.name) }}">
|
||||
{{ tables.datatable_meta_column(entry, field) }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'team') }}">
|
||||
{% if entry.teams|length > 0 %}
|
||||
{{ widgets.badge_counter(entry.teams|length) }}
|
||||
|
||||
Reference in New Issue
Block a user