7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
10 # FOR A PARTICULAR PURPOSE. |
10 # FOR A PARTICULAR PURPOSE. |
11 # |
11 # |
|
12 |
|
13 __docformat__ = 'restructuredtext' |
|
14 |
|
15 from html import escape |
|
16 |
12 from pyramid.encode import url_quote |
17 from pyramid.encode import url_quote |
13 |
|
14 |
|
15 __docformat__ = 'restructuredtext' |
|
16 |
|
17 from zope.interface import implementer |
18 from zope.interface import implementer |
18 from zope.schema.fieldproperty import FieldProperty |
19 from zope.schema.fieldproperty import FieldProperty |
19 from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary |
20 from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary |
20 |
21 |
21 from pyams_content import _ |
22 from pyams_content import _ |
291 title = self.context.address_name |
292 title = self.context.address_name |
292 return title or '--' |
293 return title or '--' |
293 |
294 |
294 @property |
295 @property |
295 def inner_title(self): |
296 def inner_title(self): |
296 return self.context.get_url() |
297 if self.context.address_name: |
|
298 return escape('{} <{}>'.format(self.context.address_name, self.context.address)) |
|
299 else: |
|
300 return self.context.address |
297 |
301 |
298 @property |
302 @property |
299 def human_size(self): |
303 def human_size(self): |
300 return '--' |
304 return '--' |
301 |
305 |