192 |
192 |
193 @app.route("/iek-7") |
193 @app.route("/iek-7") |
194 def institute(): |
194 def institute(): |
195 filename = os.path.join("templates", get_locale(), "rst", "iek-7.rst") |
195 filename = os.path.join("templates", get_locale(), "rst", "iek-7.rst") |
196 content = get_content(filename) |
196 content = get_content(filename) |
197 filename = os.path.join("templates", get_locale(), "rst", "iek-7_author.rst") |
197 vcard_file = os.path.join("vcards", "sas.vcf") |
198 author = modal_info("/author_info.html", "author", _(u"IEK-7"), filename) |
198 author = u"" |
|
199 try: |
|
200 card = get_vcard(vcard_file) |
|
201 except IOError: |
|
202 card = None |
|
203 if card is not None: |
|
204 qr_image = qr_image_data(card) |
|
205 author = render_template("/author_info.html", act="author", title=_(u"IEK-7"), |
|
206 card=card, image=qr_image, contact=_(u"Contact"), exit=_(u"Close")) |
|
207 |
199 return render_template("/iek-7.html", act="iek-7", content=content, |
208 return render_template("/iek-7.html", act="iek-7", content=content, |
200 author=author, contact = u"IEK-7") |
209 author=author, card=card, contact = u"IEK-7") |
201 |
210 |
202 |
211 |
203 @app.route("/imprint") |
212 @app.route("/imprint") |
204 def imprint(): |
213 def imprint(): |
205 filename = os.path.join("templates", get_locale(), "rst", "imprint.rst") |
214 filename = os.path.join("templates", get_locale(), "rst", "imprint.rst") |