src/pyams_portal/template.py
changeset 120 4f2a1d921a4e
parent 91 bbd58ab513a7
child 186 ffec02eb6ef0
equal deleted inserted replaced
119:d2d0c38fa8f8 120:4f2a1d921a4e
    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"""