1.1 --- a/eskp.py Tue May 20 16:23:02 2014 +0200
1.2 +++ b/eskp.py Tue May 20 16:24:06 2014 +0200
1.3 @@ -194,10 +194,19 @@
1.4 def institute():
1.5 filename = os.path.join("templates", get_locale(), "rst", "iek-7.rst")
1.6 content = get_content(filename)
1.7 - filename = os.path.join("templates", get_locale(), "rst", "iek-7_author.rst")
1.8 - author = modal_info("/author_info.html", "author", _(u"IEK-7"), filename)
1.9 + vcard_file = os.path.join("vcards", "sas.vcf")
1.10 + author = u""
1.11 + try:
1.12 + card = get_vcard(vcard_file)
1.13 + except IOError:
1.14 + card = None
1.15 + if card is not None:
1.16 + qr_image = qr_image_data(card)
1.17 + author = render_template("/author_info.html", act="author", title=_(u"IEK-7"),
1.18 + card=card, image=qr_image, contact=_(u"Contact"), exit=_(u"Close"))
1.19 +
1.20 return render_template("/iek-7.html", act="iek-7", content=content,
1.21 - author=author, contact = u"IEK-7")
1.22 + author=author, card=card, contact = u"IEK-7")
1.23
1.24
1.25 @app.route("/imprint")
2.1 --- a/templates/buiseness_card.html Tue May 20 16:23:02 2014 +0200
2.2 +++ b/templates/buiseness_card.html Tue May 20 16:24:06 2014 +0200
2.3 @@ -4,16 +4,21 @@
2.4 <div class="col-md-3">
2.5 <p> {{ card.title.value }} {{ card.fn.value }}</p>
2.6 <p> {{ card.org.value[0] }}</p>
2.7 - <p><a href="mailto:{{ card.email.value|safe }}">{{ card.email.value|safe }}</a></p>
2.8 + <p>E-Mail: <a href="mailto:{{ card.email.value|safe }}">{{ card.email.value|safe }}</a></p>
2.9 + {% if card.tel.value %}
2.10 + <p>Tel.: {{ card.tel.value }}</p>
2.11 + {% endif %}
2.12 <img src="data:image/png;base64,{{ image|safe }}"/>
2.13 </div>
2.14
2.15 <div class="col-md-3">
2.16 - <img class="logo" src="{{ card.photo.value|safe}}" alt="Image von Person" />
2.17 + {% if card.photo.value %}
2.18 + <img class="logo" src="{{ card.photo.value|safe}}" alt="Image von Person" />
2.19
2.20 - <div class="collapse navbar-collapse">
2.21 - <ul class="nav navbar-nav navbar-right">
2.22 - </div>
2.23 + <div class="collapse navbar-collapse">
2.24 + <ul class="nav navbar-nav navbar-right">
2.25 + </div>
2.26 + {% endif %}
2.27 </div>
2.28 </div>
2.29 </div>
3.1 --- a/vcards/jug.vcf Tue May 20 16:23:02 2014 +0200
3.2 +++ b/vcards/jug.vcf Tue May 20 16:24:06 2014 +0200
3.3 @@ -3,6 +3,7 @@
3.4 ORG:Institut für Energie- und Klimaforschung Stratosphäre (IEK-7)
3.5 PHOTO;VALUE=URL;TYPE=JPG:http://www.fz-juelich.de/SharedDocs/Bilder/IEK/IEK-7/DE/Mitarbeiter/grooss_j_u.jpg?__blob=normal
3.6 TITLE:Dr.
3.7 +TEL:
3.8 FN:Jens-Uwe Grooß
3.9 N:Grooß;Jens-Uwe;;;
3.10 EMAIL;TYPE=INTERNET:j.-u.grooss@fz-juelich.de
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/vcards/sas.vcf Tue May 20 16:24:06 2014 +0200
4.3 @@ -0,0 +1,10 @@
4.4 +BEGIN:VCARD
4.5 +VERSION:3.0
4.6 +ORG:Institut für Energie- und Klimaforschung Stratosphäre (IEK-7)
4.7 +FN:Sandra Stein
4.8 +TITLE:
4.9 +N:Stein; Sandra;;;
4.10 +TEL:02461-616065
4.11 +EMAIL;TYPE=INTERNET:s.stein@fz-juelich.de
4.12 +PHOTO:
4.13 +END:VCARD