bootstrap modal for contact data added
authorReimar Bauer <rb.proj AT googlemail DOT com>
Thu, 15 May 2014 11:06:22 +0200
changeset 264bdf11bb4cb98
parent 263 b732704e750d
child 265 69babac65a72
bootstrap modal for contact data added
eskp.py
templates/author_info.html
templates/author_info_link.html
templates/de/rst/iek-7_author.rst
templates/de/rst/ozoneloss_author.rst
templates/de/rst/ozoneloss_publications.rst
templates/footer.html
templates/iek-7.html
templates/index.html
templates/ozoneloss.html
templates/ozoneloss_vpsc.html
templates/theme.html
translations/de/LC_MESSAGES/messages.mo
translations/de/LC_MESSAGES/messages.po
translations/en/LC_MESSAGES/messages.po
translations/eskp.pot
     1.1 --- a/eskp.py	Tue May 13 12:32:22 2014 +0200
     1.2 +++ b/eskp.py	Thu May 15 11:06:22 2014 +0200
     1.3 @@ -4,7 +4,7 @@
     1.4  import codecs
     1.5  
     1.6  from docutils.core import publish_parts
     1.7 -from flask import Flask
     1.8 +from flask import Flask, Response
     1.9  from flask import render_template
    1.10  from flask import request
    1.11  from flask.ext.babel import gettext as _
    1.12 @@ -22,7 +22,6 @@
    1.13  
    1.14  app.config['BABEL_DEFAULT_LOCALE'] = 'de'
    1.15  
    1.16 -
    1.17  def get_content(filename, overrides=None):
    1.18      content = u""
    1.19      filename = os.path.join(ESKP_PATH, filename)
    1.20 @@ -62,6 +61,12 @@
    1.21  app.jinja_env.globals.update(get_o3lossclams_dates=get_o3lossclams_dates)
    1.22  app.jinja_env.globals.update(get_vpsc_dates=get_vpsc_dates)
    1.23  
    1.24 +def author_info(name, filename):
    1.25 +    content = get_content(filename)
    1.26 +    html = render_template("/author_info.html", act="author", title=name, content=content, exit=_(u"Close"))
    1.27 +    return html
    1.28 +
    1.29 +
    1.30  @babel.localeselector
    1.31  def get_locale():
    1.32      """ToDo: if translation is completed, switch to en """
    1.33 @@ -126,7 +131,10 @@
    1.34  def ozoneloss():
    1.35      filename = os.path.join("templates", get_locale(), "rst", "ozoneloss.rst")
    1.36      content = get_content(filename)
    1.37 -    return render_template("/ozoneloss.html", act="ozoneloss", content=content)
    1.38 +    filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_author.rst")
    1.39 +    author = author_info(_(u"Ozoneloss"), filename)
    1.40 +    return render_template("/ozoneloss.html", act="ozoneloss", content=content,
    1.41 +                           author=author, contact = u"Dr. Jens-Uwe Grooß", publications=u"Publications" )
    1.42  
    1.43  @app.route("/ozoneloss/clams")
    1.44  def ozoneloss_clams():
    1.45 @@ -144,7 +152,10 @@
    1.46  def institute():
    1.47      filename = os.path.join("templates", get_locale(), "rst", "iek-7.rst")
    1.48      content = get_content(filename)
    1.49 -    return render_template("/iek-7.html", act="iek-7", content=content)
    1.50 +    filename = os.path.join("templates", get_locale(), "rst", "iek-7_author.rst")
    1.51 +    author = author_info(_(u"IEK-7"), filename)
    1.52 +    return render_template("/iek-7.html", act="iek-7", content=content,
    1.53 +                           author=author, contact = u"Sandra Stein")
    1.54  
    1.55  
    1.56  @app.route("/imprint")
    1.57 @@ -155,6 +166,8 @@
    1.58  
    1.59  
    1.60  
    1.61 +
    1.62 +
    1.63  @app.errorhandler(404)
    1.64  def page_not_found(e):
    1.65      msg = _(u"Url: %(url)s not found", url=request.url)
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/templates/author_info.html	Thu May 15 11:06:22 2014 +0200
     2.3 @@ -0,0 +1,24 @@
     2.4 +<!-- Modal -->
     2.5 +<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
     2.6 +   aria-labelledby="myModalLabel" aria-hidden="true">
     2.7 +   <div class="modal-dialog">
     2.8 +      <div class="modal-content">
     2.9 +         <div class="modal-header">
    2.10 +            <button type="button" class="close"
    2.11 +               data-dismiss="modal" aria-hidden="true">
    2.12 +                  &times;
    2.13 +            </button>
    2.14 +            <h4 class="modal-title" id="myModalLabel">
    2.15 +               {{ title }}
    2.16 +            </h4>
    2.17 +         </div>
    2.18 +         <div class="modal-body">
    2.19 +            {{ content|safe }}
    2.20 +         </div>
    2.21 +         <div class="modal-footer">
    2.22 +            <button type="button" class="btn btn-default"
    2.23 +               data-dismiss="modal"> {{ exit }}
    2.24 +            </button>
    2.25 +         </div>
    2.26 +      </div><!-- /.modal-content -->
    2.27 +</div><!-- /.modal -->
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/templates/author_info_link.html	Thu May 15 11:06:22 2014 +0200
     3.3 @@ -0,0 +1,14 @@
     3.4 +
     3.5 +<ul class="list-unstyled">
     3.6 +<li>
     3.7 +    <a data-toggle="modal" data-target="#myModal">
     3.8 +Kontakt: {{ contact }}
     3.9 +</a>
    3.10 +</li>
    3.11 +{% if publications %}
    3.12 +   <li>
    3.13 +    {{ publications }}
    3.14 +    </li>
    3.15 +{% endif %}
    3.16 +</ul>
    3.17 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/templates/de/rst/iek-7_author.rst	Thu May 15 11:06:22 2014 +0200
     4.3 @@ -0,0 +1,13 @@
     4.4 +Ansprechpartner
     4.5 +================
     4.6 +
     4.7 +**Sandra Stein**
     4.8 +
     4.9 +Kontaktdaten:
    4.10 +~~~~~~~~~~~~~
    4.11 +
    4.12 +::
    4.13 +
    4.14 + Sekretariat IEK-7
    4.15 + Sandra Stein
    4.16 + Tel 02461-61/6065
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/templates/de/rst/ozoneloss_author.rst	Thu May 15 11:06:22 2014 +0200
     5.3 @@ -0,0 +1,7 @@
     5.4 +Ansprechpartner
     5.5 +================
     5.6 +
     5.7 +Kontaktdaten:
     5.8 +~~~~~~~~~~~~~
     5.9 +
    5.10 +
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/templates/de/rst/ozoneloss_publications.rst	Thu May 15 11:06:22 2014 +0200
     6.3 @@ -0,0 +1,3 @@
     6.4 +Extreme Ozonverluste im Frühjahr über Europa
     6.5 +==============================================
     6.6 +
     7.1 --- a/templates/footer.html	Tue May 13 12:32:22 2014 +0200
     7.2 +++ b/templates/footer.html	Thu May 15 11:06:22 2014 +0200
     7.3 @@ -8,4 +8,4 @@
     7.4         </div>
     7.5      </div>
     7.6    </div>
     7.7 -</div>
     7.8 +</div>
     7.9 \ No newline at end of file
     8.1 --- a/templates/iek-7.html	Tue May 13 12:32:22 2014 +0200
     8.2 +++ b/templates/iek-7.html	Thu May 15 11:06:22 2014 +0200
     8.3 @@ -4,12 +4,10 @@
     8.4   <div class="col-lg-12">
     8.5     <img src="/static/images/start_iek7.png">
     8.6      <br>
     8.7 -
     8.8   	<div class="row">
     8.9 -
    8.10      {{ content|safe }}
    8.11   </div>
    8.12 -
    8.13 -
    8.14 +{{ author|safe }}
    8.15  </div>
    8.16 +{% include "author_info_link.html" %}
    8.17  {% endblock %}
     9.1 --- a/templates/index.html	Tue May 13 12:32:22 2014 +0200
     9.2 +++ b/templates/index.html	Thu May 15 11:06:22 2014 +0200
     9.3 @@ -11,6 +11,5 @@
     9.4      </div>
     9.5    </div>  
     9.6  </div>
     9.7 -
     9.8  {% endblock %}
     9.9  
    10.1 --- a/templates/ozoneloss.html	Tue May 13 12:32:22 2014 +0200
    10.2 +++ b/templates/ozoneloss.html	Thu May 15 11:06:22 2014 +0200
    10.3 @@ -14,5 +14,8 @@
    10.4        <img src="/static/images/clams_do3col_11032812.png" alt="Delta O3 column">
    10.5        </center>
    10.6     </div>
    10.7 +{{ author|safe }}
    10.8 +
    10.9  </div>
   10.10 +{% include "author_info_link.html" %}
   10.11  {% endblock %}
    11.1 --- a/templates/ozoneloss_vpsc.html	Tue May 13 12:32:22 2014 +0200
    11.2 +++ b/templates/ozoneloss_vpsc.html	Thu May 15 11:06:22 2014 +0200
    11.3 @@ -20,7 +20,7 @@
    11.4  
    11.5  <div class="row">
    11.6  {{ content_explanation|safe }}
    11.7 -
    11.8 +{{ modal_info|safe }}
    11.9  </div>
   11.10  
   11.11  </div>
    12.1 --- a/templates/theme.html	Tue May 13 12:32:22 2014 +0200
    12.2 +++ b/templates/theme.html	Thu May 15 11:06:22 2014 +0200
    12.3 @@ -60,6 +60,7 @@
    12.4      </header>
    12.5      <div id="main">
    12.6        {% block body %}{% endblock %}
    12.7 +
    12.8      </div><!-- /main -->
    12.9    </div> <!-- /wrap -->
   12.10    {% include "footer.html" %}
    13.1 Binary file translations/de/LC_MESSAGES/messages.mo has changed
    14.1 --- a/translations/de/LC_MESSAGES/messages.po	Tue May 13 12:32:22 2014 +0200
    14.2 +++ b/translations/de/LC_MESSAGES/messages.po	Thu May 15 11:06:22 2014 +0200
    14.3 @@ -8,7 +8,7 @@
    14.4  msgstr ""
    14.5  "Project-Id-Version: PROJECT VERSION\n"
    14.6  "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
    14.7 -"POT-Creation-Date: 2014-05-05 11:15+0200\n"
    14.8 +"POT-Creation-Date: 2014-05-15 10:13+0200\n"
    14.9  "PO-Revision-Date: 2014-05-05 11:10+0200\n"
   14.10  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
   14.11  "Language-Team: de <LL@li.org>\n"
   14.12 @@ -18,29 +18,55 @@
   14.13  "Content-Transfer-Encoding: 8bit\n"
   14.14  "Generated-By: Babel 1.3\n"
   14.15  
   14.16 -#: eskp.py:35
   14.17 +#: eskp.py:37 eskp.py:135
   14.18 +msgid "Ozoneloss"
   14.19 +msgstr "Ozonverlust"
   14.20 +
   14.21 +#: eskp.py:38
   14.22  msgid "ESKP"
   14.23  msgstr ""
   14.24  
   14.25 -#: eskp.py:36
   14.26 -msgid "Ozoneloss"
   14.27 -msgstr "Ozonverlust"
   14.28 -
   14.29 -#: eskp.py:37
   14.30 +#: eskp.py:39
   14.31  msgid "IEK-7"
   14.32  msgstr "IEK-7"
   14.33  
   14.34 -#: eskp.py:57 eskp.py:68 eskp.py:79
   14.35 +#: eskp.py:46 eskp.py:55
   14.36 +msgid "2012"
   14.37 +msgstr ""
   14.38 +
   14.39 +#: eskp.py:47 eskp.py:56
   14.40 +msgid "2011"
   14.41 +msgstr ""
   14.42 +
   14.43 +#: eskp.py:48 eskp.py:57
   14.44 +msgid "2010"
   14.45 +msgstr ""
   14.46 +
   14.47 +#: eskp.py:53
   14.48 +msgid "2014"
   14.49 +msgstr ""
   14.50 +
   14.51 +#: eskp.py:54
   14.52 +msgid "2013"
   14.53 +msgstr ""
   14.54 +
   14.55 +#: eskp.py:66
   14.56 +msgid "Close"
   14.57 +msgstr "Schließen"
   14.58 +
   14.59 +#: eskp.py:80 eskp.py:109 eskp.py:120
   14.60  msgid "About ESKP"
   14.61  msgstr "Über ESKP"
   14.62  
   14.63 -#: eskp.py:111
   14.64 +#: eskp.py:170
   14.65  #, python-format
   14.66  msgid "Url: %(url)s not found"
   14.67  msgstr "Url: %(url)s nicht gefunden"
   14.68  
   14.69 -#: eskp.py:112
   14.70 +#: eskp.py:171
   14.71  msgid "This information is not available!"
   14.72  msgstr "Diese Information steht nicht zur Verfügung"
   14.73  
   14.74 +#~ msgid "ozoneloss"
   14.75 +#~ msgstr "Ozonverlust"
   14.76  
    15.1 --- a/translations/en/LC_MESSAGES/messages.po	Tue May 13 12:32:22 2014 +0200
    15.2 +++ b/translations/en/LC_MESSAGES/messages.po	Thu May 15 11:06:22 2014 +0200
    15.3 @@ -8,7 +8,7 @@
    15.4  msgstr ""
    15.5  "Project-Id-Version: PROJECT VERSION\n"
    15.6  "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
    15.7 -"POT-Creation-Date: 2014-05-05 11:15+0200\n"
    15.8 +"POT-Creation-Date: 2014-05-15 10:13+0200\n"
    15.9  "PO-Revision-Date: 2014-05-05 11:10+0200\n"
   15.10  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
   15.11  "Language-Team: en <LL@li.org>\n"
   15.12 @@ -18,28 +18,52 @@
   15.13  "Content-Transfer-Encoding: 8bit\n"
   15.14  "Generated-By: Babel 1.3\n"
   15.15  
   15.16 -#: eskp.py:35
   15.17 +#: eskp.py:37 eskp.py:135
   15.18 +msgid "Ozoneloss"
   15.19 +msgstr ""
   15.20 +
   15.21 +#: eskp.py:38
   15.22  msgid "ESKP"
   15.23  msgstr ""
   15.24  
   15.25 -#: eskp.py:36
   15.26 -msgid "Ozoneloss"
   15.27 -msgstr ""
   15.28 -
   15.29 -#: eskp.py:37
   15.30 +#: eskp.py:39
   15.31  msgid "IEK-7"
   15.32  msgstr ""
   15.33  
   15.34 -#: eskp.py:57 eskp.py:68 eskp.py:79
   15.35 +#: eskp.py:46 eskp.py:55
   15.36 +msgid "2012"
   15.37 +msgstr ""
   15.38 +
   15.39 +#: eskp.py:47 eskp.py:56
   15.40 +msgid "2011"
   15.41 +msgstr ""
   15.42 +
   15.43 +#: eskp.py:48 eskp.py:57
   15.44 +msgid "2010"
   15.45 +msgstr ""
   15.46 +
   15.47 +#: eskp.py:53
   15.48 +msgid "2014"
   15.49 +msgstr ""
   15.50 +
   15.51 +#: eskp.py:54
   15.52 +msgid "2013"
   15.53 +msgstr ""
   15.54 +
   15.55 +#: eskp.py:66
   15.56 +msgid "Close"
   15.57 +msgstr ""
   15.58 +
   15.59 +#: eskp.py:80 eskp.py:109 eskp.py:120
   15.60  msgid "About ESKP"
   15.61  msgstr ""
   15.62  
   15.63 -#: eskp.py:111
   15.64 +#: eskp.py:170
   15.65  #, python-format
   15.66  msgid "Url: %(url)s not found"
   15.67  msgstr ""
   15.68  
   15.69 -#: eskp.py:112
   15.70 +#: eskp.py:171
   15.71  msgid "This information is not available!"
   15.72  msgstr ""
   15.73  
   15.74 @@ -106,3 +130,6 @@
   15.75  #~ msgid "__Valentin Pratz,  novice programmers"
   15.76  #~ msgstr ""
   15.77  
   15.78 +#~ msgid "ozoneloss"
   15.79 +#~ msgstr ""
   15.80 +
    16.1 --- a/translations/eskp.pot	Tue May 13 12:32:22 2014 +0200
    16.2 +++ b/translations/eskp.pot	Thu May 15 11:06:22 2014 +0200
    16.3 @@ -8,7 +8,7 @@
    16.4  msgstr ""
    16.5  "Project-Id-Version: PROJECT VERSION\n"
    16.6  "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
    16.7 -"POT-Creation-Date: 2014-05-05 11:15+0200\n"
    16.8 +"POT-Creation-Date: 2014-05-15 10:13+0200\n"
    16.9  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
   16.10  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
   16.11  "Language-Team: LANGUAGE <LL@li.org>\n"
   16.12 @@ -17,28 +17,52 @@
   16.13  "Content-Transfer-Encoding: 8bit\n"
   16.14  "Generated-By: Babel 1.3\n"
   16.15  
   16.16 -#: eskp.py:35
   16.17 +#: eskp.py:37 eskp.py:135
   16.18 +msgid "Ozoneloss"
   16.19 +msgstr ""
   16.20 +
   16.21 +#: eskp.py:38
   16.22  msgid "ESKP"
   16.23  msgstr ""
   16.24  
   16.25 -#: eskp.py:36
   16.26 -msgid "Ozoneloss"
   16.27 -msgstr ""
   16.28 -
   16.29 -#: eskp.py:37
   16.30 +#: eskp.py:39
   16.31  msgid "IEK-7"
   16.32  msgstr ""
   16.33  
   16.34 -#: eskp.py:57 eskp.py:68 eskp.py:79
   16.35 +#: eskp.py:46 eskp.py:55
   16.36 +msgid "2012"
   16.37 +msgstr ""
   16.38 +
   16.39 +#: eskp.py:47 eskp.py:56
   16.40 +msgid "2011"
   16.41 +msgstr ""
   16.42 +
   16.43 +#: eskp.py:48 eskp.py:57
   16.44 +msgid "2010"
   16.45 +msgstr ""
   16.46 +
   16.47 +#: eskp.py:53
   16.48 +msgid "2014"
   16.49 +msgstr ""
   16.50 +
   16.51 +#: eskp.py:54
   16.52 +msgid "2013"
   16.53 +msgstr ""
   16.54 +
   16.55 +#: eskp.py:66
   16.56 +msgid "Close"
   16.57 +msgstr ""
   16.58 +
   16.59 +#: eskp.py:80 eskp.py:109 eskp.py:120
   16.60  msgid "About ESKP"
   16.61  msgstr ""
   16.62  
   16.63 -#: eskp.py:111
   16.64 +#: eskp.py:170
   16.65  #, python-format
   16.66  msgid "Url: %(url)s not found"
   16.67  msgstr ""
   16.68  
   16.69 -#: eskp.py:112
   16.70 +#: eskp.py:171
   16.71  msgid "This information is not available!"
   16.72  msgstr ""
   16.73  
Impressum Datenschutzerklärung