Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
validata-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Validata
validata-ui
Commits
8dd04ff4
Commit
8dd04ff4
authored
Nov 30, 2018
by
Pierre Dittgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better PDF report
parent
88a48e53
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
5 deletions
+52
-5
validata_ui/templates/base_template.html
validata_ui/templates/base_template.html
+2
-2
validata_ui/templates/validation_macros.html
validata_ui/templates/validation_macros.html
+45
-2
validata_ui/templates/validation_report.html
validata_ui/templates/validation_report.html
+5
-1
No files found.
validata_ui/templates/base_template.html
View file @
8dd04ff4
...
...
@@ -71,7 +71,7 @@
<script
src=
"{{url_for('static', filename='js/popper.min.js')}}"
></script>
<script
src=
"{{url_for('static', filename='js/bootstrap.min.js')}}"
></script>
{% block footer %}{% endblock %}
<footer
class=
"footer"
>
<footer
class=
"footer
hidden-print
"
>
<div>
Le service de validation du
<a
href=
"https://www.validata.fr/"
>
projet Validata
</a>
est mis à disposition par
...
...
@@ -107,4 +107,4 @@
</body>
</html>
</html>
\ No newline at end of file
validata_ui/templates/validation_macros.html
View file @
8dd04ff4
...
...
@@ -24,7 +24,50 @@
</div>
{% endmacro %}
{% macro body_errors(report, source_data) %}
{% macro body_errors(report, source_data, print_mode) %}
{% if print_mode %}
{{ body_errors_pdf(report, source_data) }}
{% else %}
{{ body_errors_screen(report, source_data) }}
{% endif %}
{% endmacro %}
{% macro body_errors_pdf(report, source_data) %}
<table
id=
"table-errors"
class=
"table table-striped table-bordered table-sm"
>
<thead
class=
"thead-light"
>
<th>
Ligne
</th>
<th>
Colonne
</th>
<th>
Valeur
</th>
<th>
Erreur
</th>
</thead>
<tbody>
{% for row in report.table.errors.body_by_rows %}
{% if 'row' in row.errors %}
<tr>
<td>
{{ row.row_id }}
</td>
<td
colspan=
"3"
>
{{ row.errors.row.title }}
</td>
</tr>
{% else %}
{% for d in source_data.data_rows[row.row_id - 2] %}
{% if loop.index in row.errors %}
<tr>
<td>
{{ row.row_id }}
</td>
<td>
{{ source_data.header[loop.index - 1] }}
</td>
<td>
{{ d }}
</td>
<td>
<h5>
{{row.errors[loop.index].title}}
</h5>
{{ row.errors[loop.index].content | safe }}
</td>
</tr>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endmacro %}
{% macro body_errors_screen(report, source_data) %}
<div
class=
"table-responsive-sm"
>
<table
class=
"table-sm table-bordered table-striped table-hover"
>
<thead
class=
"thead-light"
>
...
...
@@ -109,4 +152,4 @@ au total
{% endif %}
{% endif %}
{% endmacro %}
\ No newline at end of file
{% endmacro %}
validata_ui/templates/validation_report.html
View file @
8dd04ff4
...
...
@@ -7,6 +7,10 @@
font-size
:
1.2em
;
font-weight
:
bold
;
}
#table-errors
td
h2
{
font-size
:
1em
;
font-weight
:
bold
;
}
@media
print
{
.hidden-print
{
...
...
@@ -161,7 +165,7 @@
{% else %}
{# display errors #}
{{ macros.body_errors(report, source_data) }}
{{ macros.body_errors(report, source_data
, print_mode
) }}
{% endif %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment