Permalink
Browse files

* New version :)

  • Loading branch information...
1 parent 4c08b42 commit 2ccfddaefb8589fd99313b5bd256aa1ab7503db4 Alessandro Vermeulen committed Mar 22, 2011
View
@@ -1,6 +1,4 @@
# OS generated files #
######################
-.DS_Store?
-ehthumbs.db
-Icon?
-Thumbs.db
+.DS_Store
+Icon
@@ -2,8 +2,8 @@
#
# File: Doormat.py
#
-# Copyright (c) 2010 by unknown <unknown>
-# Generator: ArchGenXML Version 2.5
+# Copyright (c) 2011 by unknown <unknown>
+# Generator: ArchGenXML Version 2.6
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
@@ -76,6 +76,9 @@ def getDoormatData(self):
link_class = "external-link"
elif item.portal_type == "Document":
text = item.getText()
+ elif item.portal_type == "DoormatCollection"
+ text = "Hi, collection"
+ link_class = "internal_link"
if not (text or url):
continue
@@ -2,8 +2,8 @@
#
# File: Doormat.py
#
-# Copyright (c) 2010 by unknown <unknown>
-# Generator: ArchGenXML Version 2.5
+# Copyright (c) 2011 by unknown <unknown>
+# Generator: ArchGenXML Version 2.6
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
@@ -38,13 +38,15 @@
'DoormatSection': 'Doormat: Add DoormatSection',
'DoormatReference': 'Doormat: Add DoormatReference',
'DoormatMixin': 'Doormat: Add DoormatMixin',
+ 'DoormatCollection': 'Doormat: Add DoormatCollection',
}
setDefaultRoles('Doormat: Add Doormat', ('Manager','Owner'))
setDefaultRoles('Doormat: Add DoormatColumn', ('Manager','Owner'))
setDefaultRoles('Doormat: Add DoormatSection', ('Manager','Owner'))
setDefaultRoles('Doormat: Add DoormatReference', ('Manager','Owner'))
setDefaultRoles('Doormat: Add DoormatMixin', ('Manager','Owner'))
+setDefaultRoles('Doormat: Add DoormatCollection', ('Manager','Owner'))
product_globals = globals()
@@ -1,17 +1,20 @@
-<configure xmlns="http://namespaces.zope.org/zope"
- xmlns:browser="http://namespaces.zope.org/browser"
+<configure xmlns="http://namespaces.zope.org/zope"
+ xmlns:browser="http://namespaces.zope.org/browser"
xmlns:five="http://namespaces.zope.org/five"
xmlns:i18n="http://namespaces.zope.org/i18n"
i18n_domain="Doormat">
-
+
+ <!-- ##code-section configure.zcml.header -->
+ <include package=".browser" />
+ <!-- ##/code-section configure.zcml.header -->
+
<i18n:registerTranslations directory="locales" />
<include file="profiles.zcml" />
<!-- ##code-section configure.zcml -->
- <include package=".browser" />
<!-- ##/code-section configure.zcml -->
</configure>
@@ -2,8 +2,8 @@
#
# File: Doormat.py
#
-# Copyright (c) 2010 by unknown <unknown>
-# Generator: ArchGenXML Version 2.5
+# Copyright (c) 2011 by unknown <unknown>
+# Generator: ArchGenXML Version 2.6
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
@@ -0,0 +1,93 @@
+# -*- coding: utf-8 -*-
+#
+# File: DoormatCollection.py
+#
+# Copyright (c) 2011 by unknown <unknown>
+# Generator: ArchGenXML Version 2.6
+# http://plone.org/products/archgenxml
+#
+# GNU General Public License (GPL)
+#
+
+__author__ = """unknown <unknown>"""
+__docformat__ = 'plaintext'
+
+from AccessControl import ClassSecurityInfo
+from Products.Archetypes.atapi import *
+from zope.interface import implements
+import interfaces
+from Products.Doormat.content.DoormatMixin import DoormatMixin
+from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin
+
+from Products.Doormat.config import *
+
+# additional imports from tagged value 'import'
+from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import ReferenceBrowserWidget
+
+##code-section module-header #fill in your manual code here
+##/code-section module-header
+
+schema = Schema((
+
+ ReferenceField(
+ name='collection',
+ widget=ReferenceBrowserWidget(
+ label='Collection',
+ label_msgid='Doormat_label_collection',
+ i18n_domain='Doormat',
+ ),
+ relationship="internally_references_to_collection",
+ ),
+ ReferenceField(
+ name='showMoreLink',
+ widget=ReferenceBrowserWidget(
+ label='Showmorelink',
+ label_msgid='Doormat_label_showMoreLink',
+ i18n_domain='Doormat',
+ ),
+ ),
+ StringField(
+ name='showMoreText',
+ widget=StringField._properties['widget'](
+ label='Showmoretext',
+ label_msgid='Doormat_label_showMoreText',
+ i18n_domain='Doormat',
+ ),
+ ),
+
+),
+)
+
+##code-section after-local-schema #fill in your manual code here
+##/code-section after-local-schema
+
+DoormatCollection_schema = BaseSchema.copy() + \
+ getattr(DoormatMixin, 'schema', Schema(())).copy() + \
+ schema.copy()
+
+##code-section after-schema #fill in your manual code here
+##/code-section after-schema
+
+class DoormatCollection(BaseContent, DoormatMixin, BrowserDefaultMixin):
+ """
+ """
+ security = ClassSecurityInfo()
+
+ implements(interfaces.IDoormatCollection)
+
+ meta_type = 'DoormatCollection'
+ _at_rename_after_creation = True
+
+ schema = DoormatCollection_schema
+
+ ##code-section class-header #fill in your manual code here
+ ##/code-section class-header
+
+ # Methods
+
+registerType(DoormatCollection, PROJECTNAME)
+# end of class DoormatCollection
+
+##code-section module-footer #fill in your manual code here
+##/code-section module-footer
+
@@ -2,8 +2,8 @@
#
# File: DoormatColumn.py
#
-# Copyright (c) 2010 by unknown <unknown>
-# Generator: ArchGenXML Version 2.5
+# Copyright (c) 2011 by unknown <unknown>
+# Generator: ArchGenXML Version 2.6
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
@@ -2,8 +2,8 @@
#
# File: DoormatMixin.py
#
-# Copyright (c) 2010 by unknown <unknown>
-# Generator: ArchGenXML Version 2.5
+# Copyright (c) 2011 by unknown <unknown>
+# Generator: ArchGenXML Version 2.6
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
@@ -2,8 +2,8 @@
#
# File: DoormatReference.py
#
-# Copyright (c) 2010 by unknown <unknown>
-# Generator: ArchGenXML Version 2.5
+# Copyright (c) 2011 by unknown <unknown>
+# Generator: ArchGenXML Version 2.6
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
@@ -2,8 +2,8 @@
#
# File: DoormatSection.py
#
-# Copyright (c) 2010 by unknown <unknown>
-# Generator: ArchGenXML Version 2.5
+# Copyright (c) 2011 by unknown <unknown>
+# Generator: ArchGenXML Version 2.6
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
@@ -2,8 +2,8 @@
#
# File: content.py
#
-# Copyright (c) 2010 by unknown <unknown>
-# Generator: ArchGenXML Version 2.5
+# Copyright (c) 2011 by unknown <unknown>
+# Generator: ArchGenXML Version 2.6
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
@@ -41,6 +41,7 @@
import DoormatSection
import DoormatReference
import DoormatMixin
+import DoormatCollection
##code-section init-module-footer #fill in your manual code here
##/code-section init-module-footer
@@ -25,5 +25,9 @@ class IDoormatMixin(Interface):
"""Marker interface for .DoormatMixin.DoormatMixin
"""
+class IDoormatCollection(Interface):
+ """Marker interface for .DoormatCollection.DoormatCollection
+ """
+
##code-section FOOT
##/code-section FOOT
@@ -21,11 +21,32 @@ msgstr ""
msgid "Doormat_help_showTitle"
msgstr ""
+#. Default: "Collection"
+#: Collection.py
+#: content/Collection.py
+#: content/DoormatCollection.py
+msgid "Doormat_label_collection"
+msgstr ""
+
#. Default: "Internal_link"
#: content/DoormatReference.py
msgid "Doormat_label_internal_link"
msgstr ""
+#. Default: "Showmorelink"
+#: Collection.py
+#: content/Collection.py
+#: content/DoormatCollection.py
+msgid "Doormat_label_showMoreLink"
+msgstr ""
+
+#. Default: "Showmoretext"
+#: Collection.py
+#: content/Collection.py
+#: content/DoormatCollection.py
+msgid "Doormat_label_showMoreText"
+msgstr ""
+
#. Default: "Show title in Doormat"
#: content/DoormatMixin.py
msgid "Doormat_label_showTitle"
@@ -6,5 +6,6 @@
<type portal_type="DoormatSection"/>
<type portal_type="DoormatReference"/>
<type portal_type="DoormatMixin"/>
+ <type portal_type="DoormatCollection"/>
</factorytypes>
</object>
@@ -8,7 +8,7 @@
id="Doormat-Update-RoleMappings"
handler="Products.Doormat.setuphandlers.updateRoleMappings"
title="Update Workflow role mappings for Doormat"
- version="2010-10-13T16:45:26.262633">
+ version="2011-03-22T10:30:01.730646">
<dependency step="Doormat-QI-dependencies"/>
updates the workflow role mappings for Doormat
</import-step>
@@ -17,7 +17,7 @@
id="Doormat-postInstall"
handler="Products.Doormat.setuphandlers.postInstall"
title="manual coded post-install for Doormat"
- version="2010-10-13T16:45:26.262633">
+ version="2011-03-22T10:30:01.730646">
<dependency step="Doormat-QI-dependencies"/>
manual coded post-install for Doormat
</import-step>
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<metadata>
- <version>0.6</version>
+ <version>0.6.6</version>
<!-- ##code-section METADATA -->
<!-- ##/code-section METADATA -->
-</metadata>
+</metadata>
@@ -11,6 +11,8 @@
meta_type="Factory-based Type Information with dynamic views"/>
<object name="DoormatMixin"
meta_type="Factory-based Type Information with dynamic views"/>
+ <object name="DoormatCollection"
+ meta_type="Factory-based Type Information with dynamic views"/>
<!-- ##code-section TYPES -->
<!-- ##/code-section TYPES -->
</object>
@@ -17,6 +17,8 @@
<element value="Link"/>
<element value="DoormatReference"/>
<element value="Document"/>
+ <element value="DoormatCollection"/>
+ <element value="DoormatCollection"/>
</property>
<property name="allow_discussion">False</property>
<property name="default_view">folder_listing</property>
@@ -2,8 +2,8 @@
#
# File: setuphandlers.py
#
-# Copyright (c) 2010 by unknown <unknown>
-# Generator: ArchGenXML Version 2.5
+# Copyright (c) 2011 by unknown <unknown>
+# Generator: ArchGenXML Version 2.6
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
@@ -31,7 +31,7 @@ def isNotDoormatProfile(context):
def updateRoleMappings(context):
"""after workflow changed update the roles mapping. this is like pressing
the button 'Update Security Setting' and portal_workflow"""
- if isNotDoormatProfile(context): return
+ if isNotDoormatProfile(context): return
wft = getToolByName(context.getSite(), 'portal_workflow')
wft.updateRoleMappings()
Oops, something went wrong.

0 comments on commit 2ccfdda

Please sign in to comment.