equal
deleted
inserted
replaced
40 from zope.interface import implementer |
40 from zope.interface import implementer |
41 from zope.location import locate |
41 from zope.location import locate |
42 from zope.schema.fieldproperty import FieldProperty |
42 from zope.schema.fieldproperty import FieldProperty |
43 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm |
43 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm |
44 |
44 |
|
45 from pyams_portal import _ |
|
46 |
45 |
47 |
46 # |
48 # |
47 # Portal templates container |
49 # Portal templates container |
48 # |
50 # |
49 |
51 |
78 @implementer(IPortalTemplate) |
80 @implementer(IPortalTemplate) |
79 class PortalTemplate(Persistent, Contained): |
81 class PortalTemplate(Persistent, Contained): |
80 """Portal template class""" |
82 """Portal template class""" |
81 |
83 |
82 name = FieldProperty(IPortalTemplate['name']) |
84 name = FieldProperty(IPortalTemplate['name']) |
|
85 |
|
86 content_name = _("Portal template") |
83 |
87 |
84 |
88 |
85 @subscriber(IObjectAddedEvent, context_selector=IPortalTemplate) |
89 @subscriber(IObjectAddedEvent, context_selector=IPortalTemplate) |
86 def handle_added_template(event): |
90 def handle_added_template(event): |
87 """Register shared template""" |
91 """Register shared template""" |