Changeset 1429
- Timestamp:
- 11/20/08 10:40:38
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPloneGoogleSitemaps/branches/contenttype/content/sitemap.py
r1428 r1429 13 13 from Products.qPloneGoogleSitemaps.config import PROJECTNAME 14 14 15 SITEMAPS_LIST = ['content','mobile','news'] 16 15 17 SitemapSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( 16 18 17 19 # -*- Your Archetypes field definitions here ... -*- 20 atapi.StringField( 21 name='sitemapType', 22 storage = atapi.AnnotationStorage(), 23 required=True, 24 default='content', 25 vocabulary=SITEMAPS_LIST, 26 widget=atapi.SelectionWidget( 27 label=_(u"Sitemap type"), 28 description=_(u"Select Type of the sitemap."), 29 ), 30 ), 18 31 atapi.LinesField( 19 32 name='portalTypes', 20 33 storage = atapi.AnnotationStorage(), 21 required= False,34 required=True, 22 35 default=['Document',], 23 36 vocabulary="availablePortalTypes", … … 31 44 name='states', 32 45 storage = atapi.AnnotationStorage(), 33 required= False,46 required=True, 34 47 default=['published',], 35 48 vocabulary="getWorkflowStates", qPloneGoogleSitemaps/branches/contenttype/content/sitemap.py~
r1428 r1429 13 13 from Products.qPloneGoogleSitemaps.config import PROJECTNAME 14 14 15 SITEMAPS_LIST = ['content','mobile','news'] 16 17 15 18 SitemapSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( 16 19 17 20 # -*- Your Archetypes field definitions here ... -*- 21 atapi.StringField( 22 name='sitemapType', 23 storage = atapi.AnnotationStorage(), 24 required=True, 25 default='content', 26 vocabulary=SITEMAPS_LIST, 27 widget=atapi.SelectionWidget( 28 label=_(u"Sitemap type"), 29 description=_(u"Select Type of the sitemap."), 30 ), 31 ), 18 32 atapi.LinesField( 19 33 name='portalTypes', 20 34 storage = atapi.AnnotationStorage(), 21 required= False,35 required=True, 22 36 default=['Document',], 23 37 vocabulary="availablePortalTypes", … … 31 45 name='states', 32 46 storage = atapi.AnnotationStorage(), 33 required= False,47 required=True, 34 48 default=['published',], 35 49 vocabulary="getWorkflowStates", … … 121 135 def getWorkflowStates(self): 122 136 pw = getToolByName(self,'portal_workflow') 123 states = set([v for k,v in pw.listWFStatesByTitle()]) 137 states = list(set([v for k,v in pw.listWFStatesByTitle()])) 138 states.sort() 124 139 return atapi.DisplayList(zip(states, states)) 125 140
