Changeset 33
- Timestamp:
- 31/10/05 16:51:12
- Files:
-
- trunk/OATSPSC/content/PloneSoftwareCenter.py (modified) (5 diffs)
- trunk/OATSPSC/content/schemata.py (modified) (3 diffs)
- trunk/OATSPSC/version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/OATSPSC/content/PloneSoftwareCenter.py
r28 r33 74 74 75 75 security.declarePrivate('_getContained') 76 def _getContained(self, states, category, CatType, oats , portal_type, limit=None,76 def _getContained(self, states, category, CatType, oats_status, portal_type, limit=None, 77 77 sort_on='effective', sort_order='reverse'): 78 78 """Get contained objects of type portal_type … … 93 93 else: 94 94 query['getCategories_need'] = category 95 if oats: 96 query['isOats'] = oats 95 96 if oats_status: 97 query['getOats_status'] = oats_status 98 97 99 if limit: 98 100 query['sort_limit'] = limit … … 113 115 """Get catalog brain of packages.""" 114 116 if Forge=='Forge': 115 oats =1116 else: 117 oats =None118 return self._getContained(states, None, None, oats , 'PSCProject', limit)117 oats_status='OATSProject' 118 else: 119 oats_status=None 120 return self._getContained(states, None, None, oats_status, 'PSCProject', limit) 119 121 120 122 security.declareProtected(CMFCorePermissions.View, 'getPackagesByCategory') … … 123 125 124 126 if Forge=='Forge': 125 oats =1126 else: 127 oats =None128 return self._getContained(states, category, CatType, oats , 'PSCProject', limit,127 oats_status='OATSProject' 128 else: 129 oats_status=None 130 return self._getContained(states, category, CatType, oats_status, 'PSCProject', limit, 129 131 sort_on='sort_title') 130 132 … … 138 140 """Get catalog brains for releases in category.""" 139 141 if Forge=='Forge': 140 oats=1 141 else: 142 oats=None 143 144 return self._getContained(states, category, CatType, oats, 'PSCRelease', limit) 142 oats_status='OATSProject' 143 else: 144 oats_status=None 145 return self._getContained(states, category, CatType, oats_status, 'PSCRelease', limit) 145 146 146 147 security.declareProtected(CMFCorePermissions.View, 'getCategoriesToList') trunk/OATSPSC/content/schemata.py
r27 r33 372 372 widget=IdWidget ( 373 373 label="Short name", 374 description=" Should not contain spaces, underscores or mixed case. Short Name is part of the item's web address.",374 description="The Short Name is part of the item's web address, should be in CamelCase and contain no spaces- e.g. MyProject.", 375 375 i18n_domain="plonesoftwarecenter", 376 376 ), … … 447 447 name='contactAddress', 448 448 required=0, 449 validators = ( ('isMailto', V_SUFFICIENT), ('isURL', V_REQUIRED),),449 validators = ('isEmail',), 450 450 widget=StringWidget( 451 451 label="Contact address", 452 452 label_msgid="label_package_contact_address", 453 description=" Contact address for the project. Use mailto: or http:// prefix to indicate an email address or webpage.",453 description="Email contact for the project. ", 454 454 description_msgid="help_package_contact_address", 455 455 i18n_domain="plonesoftwarecenter", … … 561 561 ), 562 562 563 # Probably ditch this for the multivalued version (oats_status) 564 563 565 BooleanField( 564 566 name='oats', 565 accessor="isOats",567 # accessor="isOats", 566 568 searchable=1, 567 569 default=0, 570 index='KeywordIndex:schema', 568 571 write_permission=CMFCorePermissions.ReviewPortalContent, 569 572 widget=BooleanWidget( trunk/OATSPSC/version.txt
r30 r33 1 1.0 beta 7 - OATS beta 29 1 1.0 beta 7 - OATS beta 33 2 3 Changes to schema and plonesoftwarecentre in order to sort out viewing Forge projects... using oats_status
