Commit 65e8dc7c authored by Christophe Benz's avatar Christophe Benz

Display version number in footer

parent ddf0c0a2
## master
Non-breaking changes:
- display version number in footer
## 0.2.0
New features for users:
......
......@@ -4,6 +4,8 @@ from pathlib import Path
from setuptools import setup
from validata_ui.version import VERSION
# Gets the long description from the README.md file
readme_filepath = Path(__file__).parent / 'README.md'
with readme_filepath.open('rt', encoding='utf-8') as fd_in:
......@@ -12,7 +14,7 @@ with readme_filepath.open('rt', encoding='utf-8') as fd_in:
setup(
name='validata_ui',
version='0.2.0',
version=VERSION,
description='Validata Web UI',
long_description=LONG_DESCRIPTION,
......
......@@ -14,6 +14,7 @@ import tableschema
import opendataschema
from . import config
from .version import VERSION
log = logging.getLogger(__name__)
......@@ -88,5 +89,10 @@ def urlencode(context, value):
return quote_plus(value)
@app.context_processor
def inject_version():
return {"validata_ui_version": VERSION}
# Keep this import after app initialisation (to avoid cyclic imports)
from . import views # noqa isort:skip
......@@ -74,19 +74,20 @@
</div>
<footer class="footer hidden-print">
<div>
<p>
Le service de validation du <a href="https://www.validata.fr/">projet Validata</a>
est mis à disposition par
<a href="http://www.opendatafrance.net/">OpenDataFrance</a> avec
l'aide de <a href="https://jailbreak.paris">Jailbreak</a>
</div>
<ul class="list-unstyled mt-4">
<p>
<a href="/api/v1/apidocs" target="_blank">API</a>
| <a href="https://git.opendatafrance.net/validata" target="_blank">Code source</a>
| <a href="https://riot.im/app/#/room/#validata:jailbreak.paris" target="_blank">Salon de discussion public</a>
</p>
</ul>
l'aide de <a href="https://jailbreak.paris">Jailbreak</a>.
</p>
<p>
<a href="/api/v1/apidocs" target="_blank">API</a>
| <a href="https://git.opendatafrance.net/validata" target="_blank">Codes sources</a>
| <a href="https://riot.im/app/#/room/#validata:jailbreak.paris" target="_blank">Salon de discussion public</a>
</p>
<p class="text-muted">
(version <a href="https://git.opendatafrance.net/validata/validata-ui/tree/v{{ validata_ui_version }}" target="_blank">{{ validata_ui_version }}</a>)
</p>
</footer>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
......
VERSION = '0.2.0'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment