Changeset 1244
- Timestamp:
- 03/26/08 18:02:15 (8 months ago)
- Files:
-
- PleiadesEntity/trunk/Extensions/Install.py (modified) (2 diffs)
- PleiadesEntity/trunk/Extensions/loader.py (modified) (1 diff)
- PleiadesEntity/trunk/__init__.py (modified) (4 diffs)
- PleiadesEntity/trunk/config.py (modified) (4 diffs)
- PleiadesEntity/trunk/configure.zcml (modified) (1 diff)
- PleiadesEntity/trunk/content/Location.py (modified) (6 diffs)
- PleiadesEntity/trunk/content/LocationContainer.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/Name.py (modified) (7 diffs)
- PleiadesEntity/trunk/content/Place.py (modified) (5 diffs)
- PleiadesEntity/trunk/content/PlaceContainer.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/PlacefulAssociation.py (modified) (7 diffs)
- PleiadesEntity/trunk/content/PrimaryReference.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/Reference.py (modified) (4 diffs)
- PleiadesEntity/trunk/content/SecondaryReference.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/TemporalAttestation.py (modified) (6 diffs)
- PleiadesEntity/trunk/content/__init__.py (modified) (1 diff)
- PleiadesEntity/trunk/models/PleiadesEntity.zargo (modified) (previous)
- PleiadesEntity/trunk/profiles/default/import_steps.xml (modified) (1 diff)
- PleiadesEntity/trunk/profiles/default/types.xml (modified) (1 diff)
- PleiadesEntity/trunk/profiles/default/types/Name.xml (modified) (2 diffs)
- PleiadesEntity/trunk/profiles/default/types/PlaceContainer.xml (modified) (1 diff)
- PleiadesEntity/trunk/tests/test_docfiles.py (modified) (1 diff)
- PleiadesEntity/trunk/utils/agxit.sh (modified) (1 diff)
- PleiadesEntity/trunk/version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
PleiadesEntity/trunk/Extensions/Install.py
r706 r1244 141 141 factory_tool.manage_setPortalFactoryTypes(listOfTypeIds=factory_types) 142 142 143 from Products.PleiadesEntity.config import STYLESHEETS144 try:143 try: 144 from Products.PleiadesEntity.config import STYLESHEETS 145 145 portal_css = getToolByName(portal, 'portal_css') 146 146 for stylesheet in STYLESHEETS: … … 157 157 # No portal_css registry 158 158 pass 159 from Products.PleiadesEntity.config import JAVASCRIPTS 160 try: 159 160 try: 161 from Products.PleiadesEntity.config import JAVASCRIPTS 161 162 portal_javascripts = getToolByName(portal, 'portal_javascripts') 162 163 for javascript in JAVASCRIPTS: PleiadesEntity/trunk/Extensions/loader.py
r1124 r1244 41 41 from Products.PleiadesEntity.Extensions.xmlutil import * 42 42 from Products.PleiadesEntity.Extensions.ws_validation import validate_name 43 43 from Products.PleiadesEntity.AppConfig import * 44 44 from Products.PleiadesEntity.config import * 45 45 PleiadesEntity/trunk/__init__.py
r746 r1244 3 3 # File: PleiadesEntity.py 4 4 # 5 # Copyright (c) 200 7by Ancient World Mapping Center, University of North5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 1.5.07 # Generator: ArchGenXML Version 2.0 8 8 # http://plone.org/products/archgenxml 9 9 # … … 37 37 # - To perform custom initialisation after types have been registered, 38 38 # use the protected code section at the bottom of initialize(). 39 # - To register a customisation policy, create a file CustomizationPolicy.py40 # with a method register(context) to register the policy.41 39 42 from zLOG import LOG, INFO, DEBUG 40 import logging 41 logger = logging.getLogger('PleiadesEntity') 42 logger.debug('Installing Product') 43 43 44 LOG('PleiadesEntity', DEBUG, 'Installing Product') 45 46 try: 47 import CustomizationPolicy 48 except ImportError: 49 CustomizationPolicy = None 50 44 import os 45 import os.path 51 46 from Globals import package_home 47 import Products.CMFPlone.interfaces 48 from Products.Archetypes import listTypes 49 from Products.Archetypes.atapi import * 50 from Products.Archetypes.utils import capitalize 51 from Products.CMFCore import DirectoryView 52 from Products.CMFCore import permissions as cmfpermissions 52 53 from Products.CMFCore import utils as cmfutils 53 from Products.CMFCore import CMFCorePermissions54 from Products.CMFCore import DirectoryView55 54 from Products.CMFPlone.utils import ToolInit 56 from Products.Archetypes.atapi import * 57 from Products.Archetypes import listTypes 58 from Products.Archetypes.utils import capitalize 59 60 import os, os.path 61 62 from Products.PleiadesEntity.config import * 55 from config import * 63 56 64 57 DirectoryView.registerDirectory('skins', product_globals) 65 DirectoryView.registerDirectory('skins/PleiadesEntity', 66 product_globals) 58 67 59 68 60 ##code-section custom-init-head #fill in your manual code here … … 71 63 72 64 def initialize(context): 65 """initialize product (called by zope)""" 73 66 ##code-section custom-init-top #fill in your manual code here 74 67 ##/code-section custom-init-top … … 91 84 ).initialize(context) 92 85 93 # Apply customization-policy, if theres any94 if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):95 CustomizationPolicy.register(context)96 print 'Customization policy for PleiadesEntity installed'97 98 86 ##code-section custom-init-bottom #fill in your manual code here 99 87 profile_registry.registerProfile('default', PleiadesEntity/trunk/config.py
r746 r1244 3 3 # File: PleiadesEntity.py 4 4 # 5 # Copyright (c) 200 7by Ancient World Mapping Center, University of North5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 1.5.07 # Generator: ArchGenXML Version 2.0 8 8 # http://plone.org/products/archgenxml 9 9 # 10 10 # GNU General Public License (GPL) 11 #12 # This program is free software; you can redistribute it and/or13 # modify it under the terms of the GNU General Public License14 # as published by the Free Software Foundation; either version 215 # of the License, or (at your option) any later version.16 #17 # This program is distributed in the hope that it will be useful,18 # but WITHOUT ANY WARRANTY; without even the implied warranty of19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20 # GNU General Public License for more details.21 #22 # You should have received a copy of the GNU General Public License23 # along with this program; if not, write to the Free Software24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA25 # 02110-1301, USA.26 11 # 27 12 … … 36 21 # 37 22 # If you wish to perform custom configuration, you may put a file 38 # AppConfig.py in your product's root directory. Th is will be included39 # in this file if found.23 # AppConfig.py in your product's root directory. The items in there 24 # will be included (by importing) in this file if found. 40 25 41 from Products.CMFCore. CMFCorePermissions import setDefaultRoles26 from Products.CMFCore.permissions import setDefaultRoles 42 27 ##code-section config-head #fill in your manual code here 43 28 ##/code-section config-head … … 45 30 46 31 PROJECTNAME = "PleiadesEntity" 47 48 # Check for Plone 2.149 try:50 from Products.CMFPlone.migrations import v2_151 except ImportError:52 HAS_PLONE21 = False53 else:54 HAS_PLONE21 = True55 32 56 33 # Permissions … … 68 45 PRODUCT_DEPENDENCIES = [] 69 46 70 # You can overwrite these two in an AppConfig.py:71 # STYLESHEETS = [{'id': 'my_global_stylesheet.css'},72 # {'id': 'my_contenttype.css',73 # 'expression': 'python:object.getTypeInfo().getId() == "MyType"'}]74 # You can do the same with JAVASCRIPTS.75 STYLESHEETS = []76 JAVASCRIPTS = []77 78 47 ##code-section config-bottom #fill in your manual code here 79 48 ##/code-section config-bottom 80 49 81 50 82 # Load custom configuration not managed by ArchGenXML51 # Load custom configuration not managed by archgenxml 83 52 try: 84 53 from Products.PleiadesEntity.AppConfig import * PleiadesEntity/trunk/configure.zcml
r1186 r1244 1 <configure 2 xmlns="http://namespaces.zope.org/zope"3 xmlns:five="http://namespaces.zope.org/five"4 xmlns:browser="http://namespaces.zope.org/browser"5 >1 <configure xmlns="http://namespaces.zope.org/zope" 2 xmlns:browser="http://namespaces.zope.org/browser" 3 xmlns:five="http://namespaces.zope.org/five"> 4 5 <include file="profiles.zcml" /> 6 6 7 <adapter 8 for=".interfaces.IGeoEntity" 9 provides="Products.PleiadesGeocoder.interfaces.IGeoItemSimple" 10 factory=".geo.createGeoItem" 11 /> 12 13 <adapter 14 for=".interfaces.IGeoEntity" 15 provides="Products.PleiadesGeocoder.interfaces.IGeoCollectionSimple" 16 factory=".geo.GeoCollectionSimple" 17 /> 18 19 <five:implements 20 class=".content.PlaceContainer.PlaceContainer" 21 interface="zope.app.annotation.interfaces.IAttributeAnnotatable" 22 /> 23 24 <five:implements 25 class=".content.PlacefulAssociation.PlacefulAssociation" 26 interface=".interfaces.IGeoEntity" 27 /> 28 29 <five:implements 30 class=".content.Place.Place" 31 interface=".interfaces.IGeoEntity" 32 /> 33 34 <five:implements 35 class=".content.Place.Place" 36 interface=".interfaces.IPlacefulContainer" 37 /> 38 39 <five:implements 40 class=".content.Place.Place" 41 interface="Products.PleiadesOpenLayers.interfaces.feature.IMapFeature" 42 /> 43 44 <five:implements 45 class=".content.PlaceContainer.PlaceContainer" 46 interface=".interfaces.IGeoEntity" 47 /> 48 49 <five:implements 50 class=".content.PlaceContainer.PlaceContainer" 51 interface=".interfaces.IPlaceContainer" 52 /> 53 54 <five:implements 55 class=".content.PlaceContainer.PlaceContainer" 56 interface="Products.CMFCore.interfaces.IFolderish" 57 /> 58 59 <five:implements 60 class=".content.LocationContainer.LocationContainer" 61 interface="Products.CMFCore.interfaces.IFolderish" 62 /> 63 64 <five:deprecatedManageAddDelete 65 class=".content.Name.Name" 66 /> 67 68 <five:deprecatedManageAddDelete 69 class=".content.Location.Location" 70 /> 71 72 <five:deprecatedManageAddDelete 73 class=".content.Place.Place" 74 /> 75 76 <five:deprecatedManageAddDelete 77 class=".content.PlacefulAssociation.PlacefulAssociation" 78 /> 79 80 <five:deprecatedManageAddDelete 81 class=".content.LocationContainer.LocationContainer" 82 /> 83 84 <five:deprecatedManageAddDelete 85 class=".content.PlaceContainer.PlaceContainer" 86 /> 87 88 <five:deprecatedManageAddDelete 89 class=".content.TemporalAttestation.TemporalAttestation" 90 /> 91 92 <five:deprecatedManageAddDelete 93 class=".content.SecondaryReference.SecondaryReference" 94 /> 95 96 <browser:page 97 for=".interfaces.IGeoEntity" 98 name="geo" 99 class="Products.PleiadesGeocoder.browser.info.GeoInfosetView" 100 permission="zope.Public" 101 allowed_interface="Products.PleiadesGeocoder.browser.info.IGeoInfosetView" 102 /> 7 <!-- ##code-section configure.zcml --> 8 <!-- ##/code-section configure.zcml --> 103 9 104 10 </configure> 105 PleiadesEntity/trunk/content/Location.py
r734 r1244 3 3 # File: Location.py 4 4 # 5 # Copyright (c) 200 7by Ancient World Mapping Center, University of North5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 1.5.07 # Generator: ArchGenXML Version 2.0 8 8 # http://plone.org/products/archgenxml 9 9 # 10 10 # GNU General Public License (GPL) 11 #12 # This program is free software; you can redistribute it and/or13 # modify it under the terms of the GNU General Public License14 # as published by the Free Software Foundation; either version 215 # of the License, or (at your option) any later version.16 #17 # This program is distributed in the hope that it will be useful,18 # but WITHOUT ANY WARRANTY; without even the implied warranty of19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20 # GNU General Public License for more details.21 #22 # You should have received a copy of the GNU General Public License23 # along with this program; if not, write to the Free Software24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA25 # 02110-1301, USA.26 11 # 27 12 … … 31 16 from AccessControl import ClassSecurityInfo 32 17 from Products.Archetypes.atapi import * 18 from zope.interface import implements 19 import interfaces 20 21 from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin 22 33 23 from Products.PleiadesEntity.config import * 34 24 … … 38 28 schema = Schema(( 39 29 40 #Geometry type of the object represented by the spatial41 #coordinates string. Must be one of ['Point', 'Line', 'Polygon',42 #'Box'].43 30 StringField( 44 31 name='geometryType', 45 32 default="Point", 46 index="FieldIndex",47 33 widget=SelectionWidget( 48 34 label="Geometry Type", … … 51 37 ), 52 38 enforceVocabulary=1, 53 vocabulary=['Point'] 39 vocabulary=['Point'], 54 40 ), 55 56 #Geometry coordinates using GeoRSS-Simple representation.57 41 StringField( 58 42 name='spatialCoordinates', 59 widget=String Widget(43 widget=StringField._properties['widget']( 60 44 label="Spatial Coordinates", 61 45 description="Use GeoRSS-Simple representation.", … … 63 47 description_msgid='PleiadesEntity_help_spatialCoordinates', 64 48 i18n_domain='PleiadesEntity', 65 ) 49 ), 66 50 ), 67 68 51 ), 69 52 ) … … 79 62 ##/code-section after-schema 80 63 81 class Location(BaseFolder ):64 class Location(BaseFolder, BrowserDefaultMixin): 82 65 """ 83 66 """ 84 67 security = ClassSecurityInfo() 85 __implements__ = (getattr(BaseFolder,'__implements__',()),) 86 87 # This name appears in the 'add' box 88 archetype_name = 'Ancient Location' 68 implements(interfaces.ILocation) 89 69 90 70 meta_type = 'Location' 91 portal_type = 'Location'92 allowed_content_types = ['TemporalAttestation', 'SecondaryReference']93 filter_content_types = 194 global_allow = 095 content_icon = 'link_icon.gif'96 immediate_view = 'base_view'97 default_view = 'base_view'98 suppl_views = ()99 typeDescription = "An ancient location or region"100 typeDescMsgId = 'description_edit_location'101 102 71 _at_rename_after_creation = False 103 72 PleiadesEntity/trunk/content/LocationContainer.py
r615 r1244 3 3 # File: LocationContainer.py 4 4 # 5 # Copyright (c) 200 7by Ancient World Mapping Center, University of North5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 1.5.07 # Generator: ArchGenXML Version 2.0 8 8 # http://plone.org/products/archgenxml 9 9 # 10 10 # GNU General Public License (GPL) 11 #12 # This program is free software; you can redistribute it and/or13 # modify it under the terms of the GNU General Public License14 # as published by the Free Software Foundation; either version 215 # of the License, or (at your option) any later version.16 #17 # This program is distributed in the hope that it will be useful,18 # but WITHOUT ANY WARRANTY; without even the implied warranty of19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20 # GNU General Public License for more details.21 #22 # You should have received a copy of the GNU General Public License23 # along with this program; if not, write to the Free Software24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA25 # 02110-1301, USA.26 11 # 27 12 … … 31 16 from AccessControl import ClassSecurityInfo 32 17 from Products.Archetypes.atapi import * 18 from zope.interface import implements 19 import interfaces 20 21 from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin 22 33 23 from Products.PleiadesEntity.config import * 34 24 … … 53 43 ##/code-section after-schema 54 44 55 class LocationContainer(BaseBTreeFolder ):45 class LocationContainer(BaseBTreeFolder, BrowserDefaultMixin): 56 46 """Folder-ish container of Locations that also implements PCL 57 47 s IFeatureStore. 58 48 """ 59 49 security = ClassSecurityInfo() 60 __implements__ = (getattr(BaseBTreeFolder,'__implements__',()),) 61 62 # This name appears in the 'add' box 63 archetype_name = 'Container for Locations' 50 implements(interfaces.ILocationContainer) 64 51 65 52 meta_type = 'LocationContainer' 66 portal_type = 'LocationContainer'67 allowed_content_types = ['Location']68 filter_content_types = 169 global_allow = 170 #content_icon = 'LocationContainer.gif'71 immediate_view = 'base_view'72 default_view = 'base_view'73 suppl_views = ()74 typeDescription = "Container for Locations"75 typeDescMsgId = 'description_edit_locationcontainer'76 77 53 _at_rename_after_creation = True 78 54 PleiadesEntity/trunk/content/Name.py
r747 r1244 3 3 # File: Name.py 4 4 # 5 # Copyright (c) 200 7by Ancient World Mapping Center, University of North5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 1.5.07 # Generator: ArchGenXML Version 2.0 8 8 # http://plone.org/products/archgenxml 9 9 # 10 10 # GNU General Public License (GPL) 11 #12 # This program is free software; you can redistribute it and/or13 # modify it under the terms of the GNU General Public License14 # as published by the Free Software Foundation; either version 215 # of the License, or (at your option) any later version.16 #17 # This program is distributed in the hope that it will be useful,18 # but WITHOUT ANY WARRANTY; without even the implied warranty of19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20 # GNU General Public License for more details.21 #22 # You should have received a copy of the GNU General Public License23 # along with this program; if not, write to the Free Software24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA25 # 02110-1301, USA.26 11 # 27 12 … … 31 16 from AccessControl import ClassSecurityInfo 32 17 from Products.Archetypes.atapi import * 18 from zope.interface import implements 19 import interfaces 20 21 from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin 22 33 23 from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary 34 24 from Products.PleiadesEntity.config import * … … 44 34 StringField( 45 35 name='nameAttested', 46 index="ZCTextIndex", 47 widget=StringWidget( 36 widget=StringField._properties['widget']( 48 37 label="Name as Attested", 49 38 description="A transcription of the attested form of the name, in its original language and script.", … … 52 41 description_msgid='PleiadesEntity_help_nameAttested', 53 42 i18n_domain='PleiadesEntity', 54 ) 43 ), 55 44 ), 56 57 45 StringField( 58 46 name='nameLanguage', 59 index="FieldIndex",60 47 widget=SelectionWidget( 61 48 label="Language and Writing System", … … 66 53 ), 67 54 vocabulary=NamedVocabulary("""ancient-name-languages"""), 68 enforceVocabulary=1 55 enforceVocabulary=1, 69 56 ), 70 71 57 StringField( 72 58 name='nameTransliterated', 73 widget=String Widget(59 widget=StringField._properties['widget']( 74 60 label="Transliterated name", 75 61 label_msgid='PleiadesEntity_label_nameTransliterated', 76 62 i18n_domain='PleiadesEntity', 77 ) 63 ), 78 64 ), 79 80 65 StringField( 81 66 name='nameType', … … 87 72 vocabulary=NamedVocabulary("""name-types"""), 88 73 default="geographic", 89 enforceVocabulary=1 74 enforceVocabulary=1, 90 75 ), 91 92 76 StringField( 93 77 name='accuracy', 94 index="FieldIndex",95 vocabulary=NamedVocabulary("""name-accuracy"""),96 default="accurate",97 enforceVocabulary=1,98 78 widget=SelectionWidget( 99 79 label="Accuracy of Attestation", 100 80 label_msgid='PleiadesEntity_label_accuracy', 101 81 i18n_domain='PleiadesEntity', 102 ) 82 ), 83 vocabulary=NamedVocabulary("""name-accuracy"""), 84 default="accurate", 85 enforceVocabulary=1, 103 86 ), 104 105 87 StringField( 106 88 name='completeness', 107 index="FieldIndex",108 vocabulary=NamedVocabulary("""name-completeness"""),109 default="complete",110 enforceVocabulary=1,111 89 widget=SelectionWidget( 112 90 label="Completeness of Attestation", 113 91 label_msgid='PleiadesEntity_label_completeness', 114 92 i18n_domain='PleiadesEntity', 115 ) 93 ), 94 vocabulary=NamedVocabulary("""name-completeness"""), 95 default="complete", 96 enforceVocabulary=1, 116 97 ), 117 118 98 ), 119 99 ) … … 128 108 ##/code-section after-schema 129 109 130 class Name(BaseFolder ):110 class Name(BaseFolder, BrowserDefaultMixin): 131 111 """ 132 112 """ 133 113 security = ClassSecurityInfo() 134 __implements__ = (getattr(BaseFolder,'__implements__',()),) 135 136 # This name appears in the 'add' box 137 archetype_name = 'Ancient Name' 114 implements(interfaces.IName) 138 115 139 116 meta_type = 'Name' 140 portal_type = 'Name'141 allowed_content_types = ['TemporalAttestation', 'SecondaryReference', 'PrimaryReference']142 filter_content_types = 1143 global_allow = 0144 content_icon = 'document_icon.gif'145 immediate_view = 'base_view'146 default_view = 'base_view'147 suppl_views = ()148 typeDescription = "Any sort of name that can be applied to a geographic place."149 typeDescMsgId = 'description_edit_name'150 151 117 _at_rename_after_creation = True 152 118 PleiadesEntity/trunk/content/Place.py
r750 r1244 3 3 # File: Place.py 4 4 # 5 # Copyright (c) 200 7by Ancient World Mapping Center, University of North5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 1.5.07 # Generator: ArchGenXML Version 2.0 8 8 # http://plone.org/products/archgenxml 9 9 # 10 10 # GNU General Public License (GPL) 11 #12 # This program is free software; you can redistribute it and/or13 # modify it under the terms of the GNU General Public License14 # as published by the Free Software Foundation; either version 215 # of the License, or (at your option) any later version.16 #17 # This program is distributed in the hope that it will be useful,18 # but WITHOUT ANY WARRANTY; without even the implied warranty of19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20 # GNU General Public License for more details.21 #22 # You should have received a copy of the GNU General Public License23 # along with this program; if not, write to the Free Software24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA25 # 02110-1301, USA.26 11 # 27 12 … … 31 16 from AccessControl import ClassSecurityInfo 32 17 from Products.Archetypes.atapi import * 18 from zope.interface import implements 19 import interfaces 20 21 from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin 22 33 23 from Products.PleiadesEntity.config import * 34 24 … … 40 30 StringField( 41 31 name='modernLocation', 42 index="ZCTextIndex", 43 widget=StringWidget( 32 widget=StringField._properties['widget']( 44 33 label="Modern Location", 45 34 description="The modern location or vicinity of the ancient place", … … 47 36 description_msgid='PleiadesEntity_help_modernLocation', 48 37 i18n_domain='PleiadesEntity', 49 ) 38 ), 50 39 ), 51 52 40 ), 53 41 ) … … 62 50 ##/code-section after-schema 63 51 64 class Place(BaseFolder ):52 class Place(BaseFolder, BrowserDefaultMixin): 65 53 """ 66 54 """ 67 55 security = ClassSecurityInfo() 68 __implements__ = (getattr(BaseFolder,'__implements__',()),) 69 70 # This name appears in the 'add' box 71 archetype_name = 'Ancient Place' 56 implements(interfaces.IPlace) 72 57 73 58 meta_type = 'Place' 74 portal_type = 'Place'75 allowed_content_types = ['PlacefulAssociation']76 filter_content_types = 177 global_allow = 078 content_icon = 'place_icon.gif'79 immediate_view = 'base_view'80 default_view = 'base_view'81 suppl_views = ()82 typeDescription = "Ancient Place"83 typeDescMsgId = 'description_edit_place'84 85 59 _at_rename_after_creation = False 86 60 PleiadesEntity/trunk/content/PlaceContainer.py
r632 r1244 3 3 # File: PlaceContainer.py 4 4 # 5 # Copyright (c) 200 7by Ancient World Mapping Center, University of North5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 1.5.07 # Generator: ArchGenXML Version 2.0 8 8 # http://plone.org/products/archgenxml 9 9 # 10 10 # GNU General Public License (GPL) 11 #12 # This program is free software; you can redistribute it and/or13 # modify it under the terms of the GNU General Public License14 # as published by the Free Software Foundation; either version 215 # of the License, or (at your option) any later version.16 #17 # This program is distributed in the hope that it will be useful,18 # but WITHOUT ANY WARRANTY; without even the implied warranty of19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20 # GNU General Public License for more details.21 #22 # You should have received a copy of the GNU General Public License23 # along with this program; if not, write to the Free Software24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA25 # 02110-1301, USA.26 11 # 27 12 … … 31 16 from AccessControl import ClassSecurityInfo 32 17 from Products.Archetypes.atapi import * 18 from zope.interface import implements 19 import interfaces 20 21 from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin 22 33 23 from Products.PleiadesEntity.config import * 34 24 … … 53 43 ##/code-section after-schema 54 44 55 class PlaceContainer(BaseBTreeFolder ):45 class PlaceContainer(BaseBTreeFolder, BrowserDefaultMixin): 56 46 """ 57 47 """ 58 48 security = ClassSecurityInfo() 59 __implements__ = (getattr(BaseBTreeFolder,'__implements__',()),) 60 61 # This name appears in the 'add' box 62 archetype_name = 'Container for Places.' 49 implements(interfaces.IPlaceContainer) 63 50 64 51 meta_type = 'PlaceContainer' 65 portal_type = 'PlaceContainer'66 allowed_content_types = ['Place']67 filter_content_types = 168 global_allow = 169 #content_icon = 'PlaceContainer.gif'70 immediate_view = 'base_view'71 default_view = 'base_view'72 suppl_views = ()73 typeDescription = "Container for Places."74 typeDescMsgId = 'description_edit_placecontainer'75 76 52 _at_rename_after_creation = True 77 53 PleiadesEntity/trunk/content/PlacefulAssociation.py
r706 r1244 3 3 # File: PlacefulAssociation.py 4 4 # 5 # Copyright (c) 200 7by Ancient World Mapping Center, University of North5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 1.5.07 # Generator: ArchGenXML Version 2.0 8 8 # http://plone.org/products/archgenxml 9 9 # 10 10 # GNU General Public License (GPL) 11 #12 # This program is free software; you can redistribute it and/or13 # modify it under the terms of the GNU General Public License14 # as published by the Free Software Foundation; either version 215 # of the License, or (at your option) any later version.16 #17 # This program is distributed in the hope that it will be useful,18 # but WITHOUT ANY WARRANTY; without even the implied warranty of19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20 # GNU General Public License for more details.21 #22 # You should have received a copy of the GNU General Public License23 # along with this program; if not, write to the Free Software24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA25 # 02110-1301, USA.26 11 # 27 12 … … 31 16 from AccessControl import ClassSecurityInfo 32 17 from Products.Archetypes.atapi import * 18 from zope.interface import implements 19 import interfaces 20 21 from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin 22 23 from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import \ 24 ReferenceBrowserWidget 33 25 from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary 34 26 from Products.PleiadesEntity.config import * … … 41 33 StringField( 42 34 name='placeType', 43 index="KeywordIndex",44 vocabulary=NamedVocabulary("""place-types"""),45 default="unknown",46 enforceVocabulary=1,47 35 widget=SelectionWidget( 48 36 label="Place Type", 49 37 label_msgid='PleiadesEntity_label_placeType', 50 38 i18n_domain='PleiadesEntity', 51 ) 39 ), 40 vocabulary=NamedVocabulary("""place-types"""), 41 default="unknown", 42 enforceVocabulary=1, 52 43 ), 53 54 44 StringField( 55 45 name='associationCertainty', … … 62 52 ), 63 53 vocabulary=NamedVocabulary("""association-certainty"""), 64 enforceVocabulary=1 54 enforceVocabulary=1, 65 55 ), 66 67 56 ReferenceField( 68 57 name='locations', 69 widget=Reference Widget(58 widget=ReferenceBrowserWidget( 70 59 label='Locations', 71 60 label_msgid='PleiadesEntity_label_locations', … … 74 63 allowed_types=('Location',), 75 64 multiValued=1, 76 relationship='hasLocation' 65 relationship='hasLocation', 77 66 ), 78 79 67 ReferenceField( 80 68 name='names', 81 widget=Reference Widget(69 widget=ReferenceBrowserWidget( 82 70 label='Names', 83 71 label_msgid='PleiadesEntity_label_names', … … 86 74 allowed_types=('Name',), 87 75 multiValued=1, 88 relationship='hasName' 76 relationship='hasName', 89 77 ), 90 91 78 ), 92 79 ) … … 101 88 ##/code-section after-schema 102 89 103 class PlacefulAssociation(BaseFolder ):90 class PlacefulAssociation(BaseFolder, BrowserDefaultMixin): 104 91 """Associates Names and Locations 105 92 """ 106 93 security = ClassSecurityInfo() 107 __implements__ = (getattr(BaseFolder,'__implements__',()),) 108 109 # This name appears in the 'add' box 110 archetype_name = 'PlacefulAssociation' 94 implements(interfaces.IPlacefulAssociation) 111 95 112 96 meta_type = 'PlacefulAssociation' 113 portal_type = 'PlacefulAssociation'114 allowed_content_types = ['SecondaryReference']115 filter_content_types = 1116 global_allow = 0117 content_icon = 'place_icon.gif'118 immediate_view = 'base_view'119 default_view = 'base_view'120 suppl_views = ()121 typeDescription = "PlacefulAssociation"122 typeDescMsgId = 'description_edit_placefulassociation'123 124 97 _at_rename_after_creation = False 125 98 PleiadesEntity/trunk/content/PrimaryReference.py
r602 r1244 3 3 # File: PrimaryReference.py 4 4 # 5 # Copyright (c) 200 7by Ancient World Mapping Center, University of North5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 1.5.07 # Generator: ArchGenXML Version 2.0 8 8 # http://plone.org/products/archgenxml 9 9 # 10 10 # GNU General Public License (GPL) 11 #12 # This program is free software; you can redistribute it and/or13 # modify it under the terms of the GNU General Public License14 # as published by the Free Software Foundation; either version 215 # of the License, or (at your option) any later version.16 #17 # This program is distributed in the hope that it will be useful,18 # but WITHOUT ANY WARRANTY; without even the implied warranty of19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20 # GNU General Public License for more details.21 #22 # You should have received a copy of the GNU General Public License23 # along with this program; if not, write to the Free Software24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA25 # 02110-1301, USA.26 11 # 27 12 … … 31 16 from AccessControl import ClassSecurityInfo 32 17 from Products.Archetypes.atapi import * 18 from zope.interface import implements 19 import interfaces 33 20 from Products.PleiadesEntity.content.Reference import Reference 21 from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin 22 34 23 from Products.PleiadesEntity.config import * 35 24 … … 52 41 ##/code-section after-schema 53 42 54 class PrimaryReference( Reference, BaseContent):43 class PrimaryReference(BaseContent, Reference, BrowserDefaultMixin): 55 44 """ 56 45 """ 57 46 security = ClassSecurityInfo() 58 __implements__ = (getattr(Reference,'__implements__',()),) + (getattr(BaseContent,'__implements__',()),) 59 60 # This name appears in the 'add' box 61 archetype_name = 'Primary Source Citation' 47 implements(interfaces.IPrimaryReference) 62 48 63 49 meta_type = 'PrimaryReference' 64 portal_type = 'PrimaryReference'65 allowed_content_types = [] + list(getattr(Reference, 'allowed_content_types', []))66 filter_content_types = 067 global_allow = 068 #content_icon = 'PrimaryReference.gif'69 immediate_view = 'base_view'70 default_view = 'base_view'71 suppl_views = ()72 typeDescription = "Primary Source Citation"73 typeDescMsgId = 'description_edit_primaryreference'74 75 50 _at_rename_after_creation = True 76 51 PleiadesEntity/trunk/content/Reference.py
