diff --git a/setup/server.py b/setup/server.py index b2ca2175..0d58fa25 100644 --- a/setup/server.py +++ b/setup/server.py @@ -53,7 +53,10 @@ def build_app(path): @app.context_processor def app_context(): - return dict(versions=os.getenv("VERSIONS","master").split(',')) + return dict( + versions=os.getenv("VERSIONS","master").split(','), + stable_version = os.getenv("stable_version", "master") + ) prefix_bp = flask.Blueprint(version, __name__) prefix_bp.jinja_loader = jinja2.ChoiceLoader([ diff --git a/setup/templates/base.html b/setup/templates/base.html index c53bd1d1..5752e91f 100644 --- a/setup/templates/base.html +++ b/setup/templates/base.html @@ -8,13 +8,21 @@

Mailu configuration

Version - {% for module in versions %} - + {% endfor %}

+ {% if version != stable_version %} + {% call macros.panel("danger", "You have not selected the stable version") %} +You have not selected the stable version. The stable version is {{ stable_version }}. +The selected version can be used for testing and reporting bugs. +For production scenarios we recommend to use the stable version. + {% endcall %} + {% endif %} + {% block page %}{% endblock %}