equal
deleted
inserted
replaced
11 |
11 |
12 _ = unicode |
12 _ = unicode |
13 |
13 |
14 VCARD_PHONE_TYPES = {'home': 'HOME', 'office': 'WORK', 'mobile': 'CELL', 'fax': 'FAX'} |
14 VCARD_PHONE_TYPES = {'home': 'HOME', 'office': 'WORK', 'mobile': 'CELL', 'fax': 'FAX'} |
15 |
15 |
16 class VCardEUserView(EntityView): |
16 class VCardCWUserView(EntityView): |
17 """export a person information as a vcard""" |
17 """export a person information as a vcard""" |
18 id = 'vcard' |
18 id = 'vcard' |
19 title = _('vcard') |
19 title = _('vcard') |
20 templatable = False |
20 templatable = False |
21 content_type = 'text/x-vcard' |
21 content_type = 'text/x-vcard' |
22 __select__ = implements('EUser') |
22 __select__ = implements('CWUser') |
23 |
23 |
24 def set_request_content_type(self): |
24 def set_request_content_type(self): |
25 """overriden to set a .vcf filename""" |
25 """overriden to set a .vcf filename""" |
26 self.req.set_content_type(self.content_type, filename='vcard.vcf') |
26 self.req.set_content_type(self.content_type, filename='vcard.vcf') |
27 |
27 |
47 w(u'TITLE:%s\n' % who) |
47 w(u'TITLE:%s\n' % who) |
48 for email in entity.use_email: |
48 for email in entity.use_email: |
49 w(u'EMAIL;TYPE=INTERNET:%s\n' % email.address) |
49 w(u'EMAIL;TYPE=INTERNET:%s\n' % email.address) |
50 |
50 |
51 from logilab.common.deprecation import class_renamed |
51 from logilab.common.deprecation import class_renamed |
52 VCardEuserView = class_renamed('VCardEuserView', VCardEUserView) |
52 VCardEuserView = class_renamed('VCardEuserView', VCardCWUserView) |