eskp.py
changeset 250 a4adf5a448f3
parent 249 3b60bc570d8a
child 252 1de16074dd73
equal deleted inserted replaced
249:3b60bc570d8a 250:a4adf5a448f3
    42             ]
    42             ]
    43     return menue
    43     return menue
    44 
    44 
    45 app.jinja_env.globals.update(get_topmenue=get_topmenue)
    45 app.jinja_env.globals.update(get_topmenue=get_topmenue)
    46 
    46 
    47 def get_ozone_dates():
    47 def get_o3lossclams_dates():
    48     menue = [('/ozoneloss/clams/2014', _(u'2014')),
    48     menue = [('/ozoneloss/clams/2012', _(u'2012')),
    49              ('/ozoneloss/clams/2013', _(u'2013')),
       
    50              ('/ozoneloss/clams/2012', _(u'2012')),
       
    51              ('/ozoneloss/clams/2011', _(u'2011')),
    49              ('/ozoneloss/clams/2011', _(u'2011')),
    52              ('/ozoneloss/clams/2010', _(u'2010')),
    50              ('/ozoneloss/clams/2010', _(u'2010')),
    53              ]
    51              ]
    54     return menue
    52     return menue
    55 
    53 
    60              ('/ozoneloss/vpsc/2011', _(u'2011')),
    58              ('/ozoneloss/vpsc/2011', _(u'2011')),
    61              ('/ozoneloss/vpsc/2010', _(u'2010')),
    59              ('/ozoneloss/vpsc/2010', _(u'2010')),
    62              ]
    60              ]
    63     return menue
    61     return menue
    64 
    62 
    65 app.jinja_env.globals.update(get_ozone_dates=get_ozone_dates)
    63 app.jinja_env.globals.update(get_o3lossclams_dates=get_o3lossclams_dates)
    66 app.jinja_env.globals.update(get_vpsc_dates=get_vpsc_dates)
    64 app.jinja_env.globals.update(get_vpsc_dates=get_vpsc_dates)
    67 
    65 
    68 @babel.localeselector
    66 @babel.localeselector
    69 def get_locale():
    67 def get_locale():
    70     """ToDo: if translation is completed, switch to en """
    68     """ToDo: if translation is completed, switch to en """
   111 
   109 
   112 @app.route('/ozoneloss/vpsc/2014')
   110 @app.route('/ozoneloss/vpsc/2014')
   113 def y2014a():
   111 def y2014a():
   114     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   112     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   115     content = get_content(filename)
   113     content = get_content(filename)
   116     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, year=2014)
   114     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
       
   115     explanation = get_content(filename)
       
   116 
       
   117     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2014)
   117 
   118 
   118 @app.route('/ozoneloss/vpsc/2013')
   119 @app.route('/ozoneloss/vpsc/2013')
   119 def y2013a():
   120 def y2013a():
   120     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   121     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   121     content = get_content(filename)
   122     content = get_content(filename)
   122     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2013", content=content, year=2013)
   123     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
       
   124     explanation = get_content(filename)
       
   125 
       
   126     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2013)
   123 
   127 
   124 @app.route('/ozoneloss/vpsc/2012')
   128 @app.route('/ozoneloss/vpsc/2012')
   125 def y2012a():
   129 def y2012a():
   126     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   130     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   127     content = get_content(filename)
   131     content = get_content(filename)
   128     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2012", content=content, year=2012)
   132     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
       
   133     explanation = get_content(filename)
       
   134 
       
   135     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2012)
   129 
   136 
   130 @app.route('/ozoneloss/vpsc/2011')
   137 @app.route('/ozoneloss/vpsc/2011')
   131 def y2011a():
   138 def y2011a():
   132     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   139     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   133     content = get_content(filename)
   140     content = get_content(filename)
   134     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2011", content=content, year=2011)
   141     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
       
   142     explanation = get_content(filename)
       
   143 
       
   144     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2011)
   135 
   145 
   136 @app.route('/ozoneloss/vpsc/2010')
   146 @app.route('/ozoneloss/vpsc/2010')
   137 def y2010a():
   147 def y2010a():
   138     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   148     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   139     content = get_content(filename)
   149     content = get_content(filename)
   140     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2010", content=content, year=2010)
   150     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
       
   151     explanation = get_content(filename)
       
   152 
       
   153     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2011)
   141 
   154 
   142 @app.route('/de')
   155 @app.route('/de')
   143 def de():
   156 def de():
   144     global LANGUAGE_SELECTED
   157     global LANGUAGE_SELECTED
   145     LANGUAGE_SELECTED = "de"
   158     LANGUAGE_SELECTED = "de"
Impressum Datenschutzerklärung