summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2012-12-30 14:05:55 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2012-12-30 14:05:55 (GMT)
commitfb2b3e2572cf361238035089fc3cd045182f4f5f (patch)
tree35be0b82cb58e4d8081efed4a5e86fdd871989c4
parent3db3267c5c0f871d1d98af484130c0a24dde3067 (diff)
downloadtabellio.webviews-fb2b3e2572cf361238035089fc3cd045182f4f5f.zip
tabellio.webviews-fb2b3e2572cf361238035089fc3cd045182f4f5f.tar.gz
tabellio.webviews-fb2b3e2572cf361238035089fc3cd045182f4f5f.tar.bz2
deputy: even more workarounds for half completed addresses
-rw-r--r--tabellio/webviews/deputy.pt26
1 files changed, 24 insertions, 2 deletions
diff --git a/tabellio/webviews/deputy.pt b/tabellio/webviews/deputy.pt
index d7eb477..05b3bbc 100644
--- a/tabellio/webviews/deputy.pt
+++ b/tabellio/webviews/deputy.pt
@@ -122,7 +122,7 @@
string:${contact_form_url}/deputy?form.widgets.deputy=${context/getId}">Utiliser le formulaire de contact</a>
</p>
- <div tal:condition="python: context.private_address and (not context.work_address or not context.work_address.street)">
+ <div tal:condition="python: context.private_address and (not context.work_address or (not context.work_ address.street and not context.work_address.city))">
<p>
<span tal:condition="context/private_address/title">
<span tal:replace="context/private_address/title"/><br/></span>
@@ -152,7 +152,29 @@
</div>
- <div tal:condition="python: context.private_address and context.work_address and context.work_address.street">
+ <div tal:condition="python: context.work_address and not context.private_address">
+ <p>
+ <span tal:condition="context/work_address/title">
+ <span tal:replace="context/work_address/title"/><br/></span>
+ <span tal:condition="context/work_address/street">
+ <span tal:replace="context/work_address/street"/><br/></span>
+ <span tal:condition="context/work_address/zipcode"
+ tal:replace="context/work_address/zipcode"/>
+ <span tal:condition="context/work_address/city">
+ <span tal:replace="context/work_address/city"/><br/></span>
+ <span tal:condition="context/work_address/phone1">
+ ☎ <span tal:replace="context/work_address/phone1"/><br/></span>
+ <span tal:condition="context/work_address/phone2">
+ ☎ <span tal:replace="context/work_address/phone2"/><br/></span>
+ <span tal:condition="context/work_address/fax">
+ ℻ <span tal:replace="context/work_address/fax"/><br/></span>
+ <a tal:condition="python: context.work_address and context.work_address.email"
+ tal:attributes="href string:mailto:${context/work_address/email}"
+ tal:content="context/work_address/email">email</a>
+ </p>
+ </div>
+
+ <div tal:condition="python: context.private_address and context.work_address and (context.work_address.street or context.work_address.city)">
<div tal:condition="context/private_address">
<h2>Privée</h2>
<p>