diff options
Diffstat (limited to 'qc_app/templates/errors_display.html')
-rw-r--r-- | qc_app/templates/errors_display.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/qc_app/templates/errors_display.html b/qc_app/templates/errors_display.html new file mode 100644 index 0000000..0c9a212 --- /dev/null +++ b/qc_app/templates/errors_display.html @@ -0,0 +1,43 @@ +{%macro errors_display(errors, no_error_msg, error_message)%} + +{%if errors | length == 0 %} +<span class="alert-success">{{no_error_msg}}</span> +{%else %} +<p class="alert-error">{{error_message}}</p> + +<table class="reports-table"> + <thead> + <tr> + <th>line number</th> + <th>column(s)</th> + <th>error</th> + <th>error message</th> + </tr> + </thead> + + <tbody> + {%for error in errors%} + <tr> + <td>{{error["line"]}}</td> + <td> + {%if isinvalidvalue(error):%} + {{error.column}} + {%else: %} + {{error.columns}} + {%endif %} + </td> + <td> + {%if isinvalidvalue(error):%} + Invalid Value + {%else: %} + Duplicate Header + {%endif %} + </td> + <td>{{error["message"]}}</td> + </tr> + {%endfor%} + </tbody> +</table> +{%endif%} + +{%endmacro%} |