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
23
Issues
23
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
45bf3bc9
Commit
45bf3bc9
authored
Jul 24, 2019
by
Pierre Dittgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorize report table header
parent
13c880cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
validata_ui/templates/validation_macros.html
validata_ui/templates/validation_macros.html
+18
-15
No files found.
validata_ui/templates/validation_macros.html
View file @
45bf3bc9
{% macro thead(report) %}
<thead
class=
"thead-light"
>
<tr>
{% for h in report.table.headers %}
<th
scope=
"col"
{%
if
report.table.headers_alert
[
loop.index
-
1]
!=
""
%}
class=
"{{ report.table.headers_alert[loop.index - 1] }}"
{%
endif
%}
data-toggle=
"popover"
title=
"{{ report.table.headers_title[loop.index - 1]}}"
data-content=
"{{ report.table.headers_description[loop.index - 1] | commonmark2html | escape}}"
>
{{ h }}
</th>
{% endfor %}
</tr>
</thead>
{% endmacro %}
{% macro preview(report, source_data) %}
<p>
Prévisualisation de {{ source_data.preview_rows_nb }} ligne{% if source_data.preview_rows_nb > 1 %}s{% endif %} sur {{ source_data.rows_nb }} au total :
</p>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-sm table-hover"
>
<thead
class=
"thead-light"
>
<tr>
{% for h in source_data.header %}
<th
scope=
"col"
data-toggle=
"popover"
title=
"{{ report.table.headers_title[loop.index - 1]}}"
data-content=
"{{ report.table.headers_description[loop.index - 1] | commonmark2html | escape}}"
>
{{
h }}
</th>
{% endfor %}
</tr>
</thead>
{{ thead(report) }}
<tbody>
{% for row in source_data.preview_rows %}
<tr>
...
...
@@ -71,13 +80,7 @@
{% 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"
>
<th
scope=
"col"
>
1
</th>
{% for h in source_data.header %}
<th
scope=
"col"
data-toggle=
"popover"
title=
"{{ report.table.headers_title[loop.index - 1]}}"
data-content=
"{{ report.table.headers_description[loop.index - 1] | commonmark2html | escape}}"
>
{{
h }}
</th>
{% endfor %}
</thead>
{{ thead(report) }}
<tbody>
{% for row in report.table.errors.body_by_rows %}
<tr>
...
...
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