r13429 - ArchGenXML/trunk/src/archgenxml
"Philipp Auersperg" <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: zworkb
Date: Sun Jan 23 15:22:47 2011
New Revision: 13429
Modified:
ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py
Log:
pass fixed size parameter to arrayfield (i.e. 4 generates size-4)
Modified: ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py
==============================================================================
--- ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py (original)
+++ ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py Sun Jan 23 15:22:47 2011
@@ -762,6 +762,8 @@
defs = OrderedDict()
defs['widget'] = self.getWidget(element, fieldname, 'array',
tgvprefix='array:widget:')
+ if element.getUpperBound() !=-1:
+ defs['size']=element.getUpperBound()
tgvs = element.getTaggedValues()
for key in tgvs:
if not key.startswith('array:') or key.startswith('array:widget'):
@@ -3349,7 +3351,6 @@
if not os.path.isdir(typesdir):
raise Exception('types is not a directory')
-
for typedef in defs:
filename = '%s.xml' % typedef['name']
handleSectionedFile(['profiles', 'type.xml'],
@@ -4241,7 +4242,10 @@
for action in actions:
if action['id'] not in disabled and \
action['id'] not in [a['id'] for a in newactions]:
- allactions.append(action.copy())
+ _action=action.copy()
+ if _action['id']=='view' and pclass.hasTaggedValue('default_view'):
+ _action['action']='string:${object_url}/'+pclass.getTaggedValue('default_view')
+ allactions.append(_action)
allactions.extend(newactions)
typedef['type_actions'] = allactions
@@ -4271,6 +4275,7 @@
"""Return the FTI information of the content class
"""
default_view = 'base_view'
+
suppl_views = '[]'
if self.getOption('plone_target_version', cclass, 3.0) >= 3.0:
folderish = self.elementIsFolderish(cclass)
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d