Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
person
Commits
46d481824b6b
Commit
c39856ba
authored
Jan 25, 2010
by
Sylvain Thénault
Browse files
update, d-t-w
parent
7d9c2693cfc4
Changes
2
Hide whitespace changes
Inline
Side-by-side
entities.py
View file @
46d48182
"""entity classes for optional person entities
:organization: Logilab
:copyright: 2003-200
8
LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:copyright: 2003-20
1
0 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
__docformat__
=
"restructuredtext en"
from
cubicweb.
common.
mixins
import
EmailableMixIn
from
cubicweb.mixins
import
EmailableMixIn
from
cubicweb.entities
import
AnyEntity
,
fetch_config
...
...
views.py
View file @
46d48182
"""Specific views for person entities
:organization: Logilab
:copyright: 2003-200
9
LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:copyright: 2003-20
1
0 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
__docformat__
=
"restructuredtext en"
...
...
@@ -39,15 +39,15 @@ class PersonPrimaryView(primary.PrimaryView):
if
getattr
(
entity
,
'postal_address'
,
None
):
self
.
w
(
u
"<table>"
)
for
postaladdress
in
entity
.
postal_address
:
self
.
w
(
u
'<tr><th class="labelCol">%s</th><td>%s</td></tr>'
%
self
.
w
(
u
'<tr><th class="labelCol">%s</th><td>%s</td></tr>'
%
(
display_name
(
self
.
_cw
,
'PostalAddress'
),
postaladdress
.
view
(
'incontext'
))
)
self
.
w
(
u
"</table>"
)
if
getattr
(
entity
,
'im_address'
,
None
):
self
.
w
(
u
"<table>"
)
for
imaddress
in
entity
.
im_address
:
self
.
w
(
u
'<tr><th class="labelCol">%s</th><td>%s</td></tr>'
%
self
.
w
(
u
'<tr><th class="labelCol">%s</th><td>%s</td></tr>'
%
(
display_name
(
self
.
_cw
,
'IMAddress'
),
imaddress
.
view
(
'incontext'
))
)
self
.
w
(
u
"</table>"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment