report.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4. <title>{{ report.title }}</title>
  5. <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='font-awesome-4.7.0/css/font-awesome.min.css') }}">
  6. <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='jquery-ui/jquery-ui.min.css') }}"/>
  7. <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='DataTables/datatables.min.css') }}"/>
  8. <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='datachecker.css') }}"/>
  9. <script type="text/javascript" src="{{ url_for('static', filename='jquery-3.3.1.min.js') }}"></script>
  10. <script type="text/javascript" src="{{ url_for('static', filename='jquery-ui/jquery-ui.min.js') }}"></script>
  11. <script type="text/javascript" src="{{ url_for('static', filename='DataTables/datatables.min.js') }}"></script>
  12. <script type="text/javascript" src="{{ url_for('static', filename='datachecker.js') }}"> </script>
  13. </head>
  14. <body>
  15. <header>
  16. <h1>{{ report.title }}</h1>
  17. </header>
  18. <section id=main>
  19. {% for reportfile in report.report_files %}
  20. <h2>{{ reportfile.file }}</h2>
  21. {%- if reportfile.errors -%}
  22. <ul>
  23. {% for err in reportfile.errors %}
  24. <li class="fa fa-exclamation-circle error"> {{ err }}</li>
  25. {% endfor %}
  26. </ul>
  27. {% endif %}
  28. <table class="datatable cell-border display compact stripe">
  29. <thead>
  30. <tr>
  31. <th>N</th>
  32. <th>Valide</th>
  33. {% for header in reportfile.headers %}
  34. <th>{{ header }}</th>
  35. {% endfor %}
  36. </tr>
  37. </thead>
  38. <tbody>
  39. {% for record in reportfile.records %}
  40. <tr>
  41. <td>{{ record.index }}</td>
  42. <td>
  43. {%- if record.valid -%}
  44. <i class="fa fa-check valid"></i>
  45. {% else %}
  46. <i class="fa fa-times error"></i>
  47. {% endif %}
  48. </td>
  49. {% for field in record.fields %}
  50. {%- if field.valid -%}
  51. <td>{{ field.value }}</td>
  52. {% else %}
  53. <td class="error" title="{{ field.error }}"><i class="fa fa-exclamation-circle"></i> <span>{{ field.value }}</span></td>
  54. {% endif %}
  55. {% endfor %}
  56. </tr>
  57. {% endfor %}
  58. </tbody>
  59. </table>
  60. {% endfor %}
  61. </section>
  62. </body>
  63. </html>