Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Validata
Validata UI
Commits
f47eeebe
Commit
f47eeebe
authored
May 05, 2021
by
Pierre Dittgen
Browse files
Fix access to config variables in templates
parent
8ebc2012
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
f47eeebe
# Changelog
## next
-
Fix access to config variables in jinja2 templates (restoring matomo and sentry tracker)
## 0.5.3
-
Upgrade validata-core requirement to
`0.7.2`
(fix UTF-8 BOM issue)
...
...
validata_ui/templates/base_template.html
View file @
f47eeebe
...
...
@@ -23,7 +23,7 @@
<a
class=
"navbar-brand"
href=
"{{ url_for('home') }}"
>
<img
src=
"{{ url_for('static', filename='img/logo-horizontal.png') }}"
height=
"15"
alt=
"Validata"
/>
</a>
{% for link in config.header.links %}
{% for link in config.
CONFIG.
header.links %}
<a
class=
"nav-link"
href=
"{{ link.url }}"
target=
"_blank"
>
{{ link.title }}
</a>
{% endfor %}
<a
class=
"btn btn-outline-danger ml-auto"
rel=
"external"
target=
"_blank"
href=
"https://git.opendatafrance.net/validata/validata-ui/issues/new?issuable_template=Probl%C3%A8me"
>
...
...
@@ -71,7 +71,7 @@
développée par
<a
href=
"https://jailbreak.paris"
>
Jailbreak
</a>
.
</p>
<p>
{% for link in config.footer.links %}
{% for link in config.
CONFIG.
footer.links %}
<a
href=
"{{ link.url }}"
target=
"_blank"
>
{{ link.title }}
</a>
{{ " | " if not loop.last }}
{% endfor %}
...
...
validata_ui/views.py
View file @
f47eeebe
...
...
@@ -445,7 +445,7 @@ def validate(schema_instance: SchemaInstance, validata_resource: ValidataResourc
return
render_template
(
"validation_report.html"
,
config
=
config
.
CONFIG
,
config
=
config
,
badge_msg
=
badge_msg
,
badge_url
=
badge_url
,
breadcrumbs
=
[
...
...
@@ -577,9 +577,7 @@ def home():
"catalog"
:
schema_info_list
,
}
return
render_template
(
"home.html"
,
config
=
config
.
CONFIG
,
sections
=
list
(
iter_sections
())
)
return
render_template
(
"home.html"
,
config
=
config
,
sections
=
list
(
iter_sections
()))
@
app
.
route
(
"/pdf"
)
...
...
@@ -675,7 +673,7 @@ def custom_validator():
)
return
render_template
(
"validation_form.html"
,
config
=
config
.
CONFIG
,
config
=
config
,
branches
=
schema_instance
.
branches
,
breadcrumbs
=
[
{
"url"
:
url_for
(
"home"
),
"title"
:
"Accueil"
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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