Commit 10439149 authored by Pierre Dittgen's avatar Pierre Dittgen

Turn unknown column into red (danger!)

parent fe40a3f3
......@@ -25,7 +25,9 @@
{% for row in source_data.preview_rows %}
<tr>
{% for val in row %}
<td>{{ val }}</td>
<td
{% if report.table.headers_alert[loop.index - 1] != "" %}class="{{ report.table.headers_alert[loop.index - 1] }}"{% endif %}
>{{ val }}</td>
{% endfor %}
</tr>
{% endfor %}
......
......@@ -227,6 +227,7 @@ def create_validata_ui_report(validata_core_report, schema_dict):
report['table']['headers_title'] = [fields_dict[h][0] if h in fields_dict else 'Colonne inconnue' for h in headers]
report['table']['headers_description'] = [fields_dict[h][1]
if h in fields_dict else 'Cette colonne n\'est pas définie dans le schema' for h in headers]
report['table']['headers_alert'] = ['' if h in fields_dict else 'table-danger' for h in headers]
# Provide better (french) messages
errors = improve_errors(report['table']['errors'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment