equal
deleted
inserted
replaced
22 return '%s at %s' % (name, host.replace('.', ' dot ')) |
22 return '%s at %s' % (name, host.replace('.', ' dot ')) |
23 |
23 |
24 class EmailAddress(AnyEntity): |
24 class EmailAddress(AnyEntity): |
25 id = 'EmailAddress' |
25 id = 'EmailAddress' |
26 fetch_attrs, fetch_order = fetch_config(['address', 'alias', 'canonical']) |
26 fetch_attrs, fetch_order = fetch_config(['address', 'alias', 'canonical']) |
27 |
|
28 widgets = { |
|
29 'address' : "EmailWidget", |
|
30 } |
|
31 |
27 |
32 def dc_title(self): |
28 def dc_title(self): |
33 if self.alias: |
29 if self.alias: |
34 return '%s <%s>' % (self.alias, self.display_address()) |
30 return '%s <%s>' % (self.alias, self.display_address()) |
35 return self.display_address() |
31 return self.display_address() |
92 |
88 |
93 |
89 |
94 class EProperty(AnyEntity): |
90 class EProperty(AnyEntity): |
95 id = 'EProperty' |
91 id = 'EProperty' |
96 |
92 |
97 fetch_attrs, fetch_order = fetch_config(['pkey', 'value']) |
93 fetch_attrs, fetch_order = fetch_config(['pkey', 'value']) |
98 |
|
99 widgets = { |
|
100 'pkey' : "PropertyKeyWidget", |
|
101 'value' : "PropertyValueWidget", |
|
102 } |
|
103 |
|
104 rest_attr = 'pkey' |
94 rest_attr = 'pkey' |
105 |
95 |
106 def typed_value(self): |
96 def typed_value(self): |
107 return self.vreg.typed_value(self.pkey, self.value) |
97 return self.vreg.typed_value(self.pkey, self.value) |
108 |
98 |
118 |
108 |
119 class Bookmark(AnyEntity): |
109 class Bookmark(AnyEntity): |
120 """customized class for Bookmark entities""" |
110 """customized class for Bookmark entities""" |
121 id = 'Bookmark' |
111 id = 'Bookmark' |
122 fetch_attrs, fetch_order = fetch_config(['title', 'path']) |
112 fetch_attrs, fetch_order = fetch_config(['title', 'path']) |
123 widgets = { |
|
124 'path' : "StringWidget", |
|
125 } |
|
126 __rtags__ = {'path': 'primary'} |
|
127 |
113 |
128 def actual_url(self): |
114 def actual_url(self): |
129 url = self.req.build_url(self.path) |
115 url = self.req.build_url(self.path) |
130 if self.title: |
116 if self.title: |
131 urlparts = list(urlsplit(url)) |
117 urlparts = list(urlsplit(url)) |