diff -r 3b60bc570d8a -r a4adf5a448f3 eskp.py --- a/eskp.py Wed May 07 17:01:53 2014 +0200 +++ b/eskp.py Thu May 08 11:00:08 2014 +0200 @@ -44,10 +44,8 @@ app.jinja_env.globals.update(get_topmenue=get_topmenue) -def get_ozone_dates(): - menue = [('/ozoneloss/clams/2014', _(u'2014')), - ('/ozoneloss/clams/2013', _(u'2013')), - ('/ozoneloss/clams/2012', _(u'2012')), +def get_o3lossclams_dates(): + menue = [('/ozoneloss/clams/2012', _(u'2012')), ('/ozoneloss/clams/2011', _(u'2011')), ('/ozoneloss/clams/2010', _(u'2010')), ] @@ -62,7 +60,7 @@ ] return menue -app.jinja_env.globals.update(get_ozone_dates=get_ozone_dates) +app.jinja_env.globals.update(get_o3lossclams_dates=get_o3lossclams_dates) app.jinja_env.globals.update(get_vpsc_dates=get_vpsc_dates) @babel.localeselector @@ -113,31 +111,46 @@ def y2014a(): filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst") content = get_content(filename) - return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, year=2014) + filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst") + explanation = get_content(filename) + + return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2014) @app.route('/ozoneloss/vpsc/2013') def y2013a(): filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst") content = get_content(filename) - return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2013", content=content, year=2013) + filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst") + explanation = get_content(filename) + + return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2013) @app.route('/ozoneloss/vpsc/2012') def y2012a(): filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst") content = get_content(filename) - return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2012", content=content, year=2012) + filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst") + explanation = get_content(filename) + + return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2012) @app.route('/ozoneloss/vpsc/2011') def y2011a(): filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst") content = get_content(filename) - return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2011", content=content, year=2011) + filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst") + explanation = get_content(filename) + + return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2011) @app.route('/ozoneloss/vpsc/2010') def y2010a(): filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst") content = get_content(filename) - return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2010", content=content, year=2010) + filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst") + explanation = get_content(filename) + + return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2011) @app.route('/de') def de():