equal
deleted
inserted
replaced
66 |
66 |
67 class EmailAddressOneLineView(baseviews.OneLineView): |
67 class EmailAddressOneLineView(baseviews.OneLineView): |
68 __select__ = implements('EmailAddress') |
68 __select__ = implements('EmailAddress') |
69 |
69 |
70 def cell_call(self, row, col, **kwargs): |
70 def cell_call(self, row, col, **kwargs): |
71 entity = self.entity(row, col) |
71 entity = self.rset.get_entity(row, col) |
72 if entity.reverse_primary_email: |
72 if entity.reverse_primary_email: |
73 self.w(u'<b>') |
73 self.w(u'<b>') |
74 if entity.alias: |
74 if entity.alias: |
75 self.w(u'%s <' % xml_escape(entity.alias)) |
75 self.w(u'%s <' % xml_escape(entity.alias)) |
76 self.w('<a href="%s">%s</a>' % (xml_escape(entity.absolute_url()), |
76 self.w('<a href="%s">%s</a>' % (xml_escape(entity.absolute_url()), |
78 if entity.alias: |
78 if entity.alias: |
79 self.w(u'>\n') |
79 self.w(u'>\n') |
80 if entity.reverse_primary_email: |
80 if entity.reverse_primary_email: |
81 self.w(u'</b>') |
81 self.w(u'</b>') |
82 |
82 |
|
83 |
83 class EmailAddressMailToView(baseviews.OneLineView): |
84 class EmailAddressMailToView(baseviews.OneLineView): |
84 """A one line view that builds a user clickable URL for an email with |
85 """A one line view that builds a user clickable URL for an email with |
85 'mailto:'""" |
86 'mailto:'""" |
86 |
87 |
87 id = 'mailto' |
88 id = 'mailto' |
88 __select__ = implements('EmailAddress') |
89 __select__ = implements('EmailAddress') |
89 |
90 |
90 def cell_call(self, row, col, **kwargs): |
91 def cell_call(self, row, col, **kwargs): |
91 entity = self.entity(row, col) |
92 entity = self.rset.get_entity(row, col) |
92 if entity.reverse_primary_email: |
93 if entity.reverse_primary_email: |
93 self.w(u'<b>') |
94 self.w(u'<b>') |
94 if entity.alias: |
95 if entity.alias: |
95 alias = entity.alias |
96 alias = entity.alias |
96 elif entity.reverse_use_email: |
97 elif entity.reverse_use_email: |
109 |
110 |
110 class EmailAddressTextView(baseviews.TextView): |
111 class EmailAddressTextView(baseviews.TextView): |
111 __select__ = implements('EmailAddress') |
112 __select__ = implements('EmailAddress') |
112 |
113 |
113 def cell_call(self, row, col, **kwargs): |
114 def cell_call(self, row, col, **kwargs): |
114 self.w(self.entity(row, col).display_address()) |
115 self.w(self.rset.get_entity(row, col).display_address()) |