Skip to content
Browse files

Initial commit

  • Loading branch information...
0 parents commit 4c08b4273dfac84db77eaec8bd2fd9f0160b3223 Alessandro Vermeulen committed Mar 21, 2011
Showing with 7,147 additions and 0 deletions.
  1. +6 −0 .gitignore
  2. +12 −0 Products/Doormat/Extensions/Install.py
  3. +97 −0 Products/Doormat/__init__.py
  4. +1 −0 Products/Doormat/browser/__init__.py
  5. +55 −0 Products/Doormat/browser/configure.zcml
  6. +1 −0 Products/Doormat/browser/doormat_bare_view.pt
  7. +5 −0 Products/Doormat/browser/doormat_view.pt
  8. +9 −0 Products/Doormat/browser/doormat_viewlet.pt
  9. +9 −0 Products/Doormat/browser/doormat_viewlet_bare.pt
  10. +5 −0 Products/Doormat/browser/interfaces.py
  11. +48 −0 Products/Doormat/browser/macros.pt
  12. +43 −0 Products/Doormat/browser/stylesheets/doormat.css
  13. +101 −0 Products/Doormat/browser/views.py
  14. +67 −0 Products/Doormat/config.py
  15. +17 −0 Products/Doormat/configure.zcml
  16. +68 −0 Products/Doormat/content/Doormat.py
  17. +68 −0 Products/Doormat/content/DoormatColumn.py
  18. +75 −0 Products/Doormat/content/DoormatMixin.py
  19. +77 −0 Products/Doormat/content/DoormatReference.py
  20. +68 −0 Products/Doormat/content/DoormatSection.py
  21. +47 −0 Products/Doormat/content/__init__.py
  22. +29 −0 Products/Doormat/content/interfaces.py
  23. +33 −0 Products/Doormat/i18n/generated.pot
  24. +2 −0 Products/Doormat/locales/NOTEMPTY.txt
  25. +29 −0 Products/Doormat/profiles.zcml
  26. +4 −0 Products/Doormat/profiles/default/Doormat_marker.txt
  27. +5 −0 Products/Doormat/profiles/default/browserlayer.xml
  28. +6 −0 Products/Doormat/profiles/default/catalog.xml
  29. +31 −0 Products/Doormat/profiles/default/cssregistry.xml
  30. +10 −0 Products/Doormat/profiles/default/factorytool.xml
  31. +29 −0 Products/Doormat/profiles/default/import_steps.xml
  32. +16 −0 Products/Doormat/profiles/default/jsregistry.xml
  33. +6 −0 Products/Doormat/profiles/default/metadata.xml
  34. +28 −0 Products/Doormat/profiles/default/skins.xml
  35. +16 −0 Products/Doormat/profiles/default/types.xml
  36. +48 −0 Products/Doormat/profiles/default/types/Doormat.xml
  37. +48 −0 Products/Doormat/profiles/default/types/DoormatColumn.xml
  38. +44 −0 Products/Doormat/profiles/default/types/DoormatMixin.xml
  39. +44 −0 Products/Doormat/profiles/default/types/DoormatReference.xml
  40. +50 −0 Products/Doormat/profiles/default/types/DoormatSection.xml
  41. +20 −0 Products/Doormat/profiles/default/viewlets.xml
  42. +47 −0 Products/Doormat/setuphandlers.py
  43. BIN Products/Doormat/skins/doormat_images/Doormat.gif
  44. BIN Products/Doormat/skins/doormat_images/DoormatColumn.gif
  45. BIN Products/Doormat/skins/doormat_images/DoormatReference.gif
  46. BIN Products/Doormat/skins/doormat_images/DoormatSection.gif
  47. 0 Products/Doormat/skins/doormat_styles/NOT_EMPTY.txt
  48. 0 Products/Doormat/skins/doormat_templates/NOT_EMPTY.txt
  49. +55 −0 Products/Doormat/tests.py
  50. +6 −0 Products/__init__.py
  51. +162 −0 README.txt
  52. +13 −0 docs/DEVELOPERS.txt
  53. +67 −0 docs/HISTORY.txt
  54. +63 −0 docs/INSTALL.txt
  55. +339 −0 docs/LICENSE.GPL
  56. +16 −0 docs/LICENSE.txt
  57. +10 −0 docs/TODO.txt
  58. +95 −0 docs/irc.txt
  59. +40 −0 setup.py
  60. +4 −0 uml/Makefile
  61. +15 −0 uml/argouml2xmi.sh
  62. +4,838 −0 uml/doormat.uml
6 .gitignore
@@ -0,0 +1,6 @@
+# OS generated files #
+######################
+.DS_Store?
+ehthumbs.db
+Icon?
+Thumbs.db
12 Products/Doormat/Extensions/Install.py
@@ -0,0 +1,12 @@
+from Products.CMFCore.utils import getToolByName
+
+def install(portal):
+ setup_tool = getToolByName(portal, 'portal_setup')
+ setup_tool.runAllImportStepsFromProfile('profile-Products.Doormat:default')
+ return "Ran all import steps."
+
+def uninstall(portal):
+ setup_tool = getToolByName(portal, 'portal_setup')
+ setup_tool.runAllImportStepsFromProfile('profile-Products.Doormat:uninstall')
+ return "Ran all uninstall steps."
+
97 Products/Doormat/__init__.py
@@ -0,0 +1,97 @@
+# -*- coding: utf-8 -*-
+#
+# File: Doormat.py
+#
+# Copyright (c) 2010 by unknown <unknown>
+# Generator: ArchGenXML Version 2.5
+# http://plone.org/products/archgenxml
+#
+# GNU General Public License (GPL)
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+__author__ = """unknown <unknown>"""
+__docformat__ = 'plaintext'
+
+
+# There are three ways to inject custom code here:
+#
+# - To set global configuration variables, create a file AppConfig.py.
+# This will be imported in config.py, which in turn is imported in
+# each generated class and in this file.
+# - To perform custom initialisation after types have been registered,
+# use the protected code section at the bottom of initialize().
+
+import logging
+logger = logging.getLogger('Doormat')
+logger.debug('Installing Product')
+
+import os
+import os.path
+from Globals import package_home
+import Products.CMFPlone.interfaces
+from Products.Archetypes import listTypes
+from Products.Archetypes.atapi import *
+from Products.Archetypes.utils import capitalize
+from Products.CMFCore import DirectoryView
+from Products.CMFCore import permissions as cmfpermissions
+from Products.CMFCore import utils as cmfutils
+from Products.CMFPlone.utils import ToolInit
+from config import *
+
+DirectoryView.registerDirectory('skins', product_globals)
+
+
+##code-section custom-init-head #fill in your manual code here
+##/code-section custom-init-head
+
+
+def initialize(context):
+ """initialize product (called by zope)"""
+ ##code-section custom-init-top #fill in your manual code here
+ ##/code-section custom-init-top
+
+ # imports packages and types for registration
+ import content
+
+
+ # Initialize portal content
+ all_content_types, all_constructors, all_ftis = process_types(
+ listTypes(PROJECTNAME),
+ PROJECTNAME)
+
+ cmfutils.ContentInit(
+ PROJECTNAME + ' Content',
+ content_types = all_content_types,
+ permission = DEFAULT_ADD_CONTENT_PERMISSION,
+ extra_constructors = all_constructors,
+ fti = all_ftis,
+ ).initialize(context)
+
+ # Give it some extra permissions to control them on a per class limit
+ for i in range(0,len(all_content_types)):
+ klassname=all_content_types[i].__name__
+ if not klassname in ADD_CONTENT_PERMISSIONS:
+ continue
+
+ context.registerClass(meta_type = all_ftis[i]['meta_type'],
+ constructors= (all_constructors[i],),
+ permission = ADD_CONTENT_PERMISSIONS[klassname])
+
+ ##code-section custom-init-bottom #fill in your manual code here
+ ##/code-section custom-init-bottom
+
1 Products/Doormat/browser/__init__.py
@@ -0,0 +1 @@
+# Make this a python package
55 Products/Doormat/browser/configure.zcml
@@ -0,0 +1,55 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:browser="http://namespaces.zope.org/browser"
+ xmlns:five="http://namespaces.zope.org/five"
+ xmlns:zcml="http://namespaces.zope.org/zcml"
+ xmlns:i18n="http://namespaces.zope.org/i18n"
+ xmlns:plone="http://namespaces.plone.org/plone"
+ i18n_domain="Doormat">
+
+
+ <browser:page
+ for="..content.interfaces.IDoormat"
+ name="doormat-view"
+ class=".views.DoormatView"
+ template="doormat_view.pt"
+ permission="zope2.View"
+ />
+
+ <browser:page
+ for="..content.interfaces.IDoormat"
+ name="doormat-view-bare"
+ class=".views.DoormatView"
+ template="doormat_bare_view.pt"
+ permission="zope2.View"
+ />
+
+ <browser:page
+ for="..content.interfaces.IDoormat"
+ name="doormat-macros"
+ template="macros.pt"
+ permission="zope.Public"
+ />
+
+ <browser:viewlet
+ name="doormat.footer"
+ manager="plone.app.layout.viewlets.interfaces.IPortalFooter"
+ template="doormat_viewlet.pt"
+ permission="zope2.View"
+ layer=".interfaces.IDoormatLayer"
+ />
+
+ <browser:viewlet
+ name="doormat.footer.bare"
+ manager="plone.app.layout.viewlets.interfaces.IPortalFooter"
+ template="doormat_viewlet_bare.pt"
+ permission="zope2.View"
+ layer=".interfaces.IDoormatLayer"
+ />
+
+ <browser:resourceDirectory
+ name="Products.Doormat.stylesheets"
+ directory="stylesheets"
+ />
+
+</configure>
1 Products/Doormat/browser/doormat_bare_view.pt
@@ -0,0 +1 @@
+<div metal:use-macro="view/context/@@doormat-macros/body" />
5 Products/Doormat/browser/doormat_view.pt
@@ -0,0 +1,5 @@
+<div class="row">
+ <div class="cell width-full position-0" >
+ <div metal:use-macro="view/context/@@doormat-macros/body" />
+ </div>
+</div>
9 Products/Doormat/browser/doormat_viewlet.pt
@@ -0,0 +1,9 @@
+<tal:getDoormat
+ tal:define="doormat_brains python:
+ context.portal_catalog(portal_type='Doormat',sort_on='created')"
+ tal:condition="python: len(doormat_brains) > 0">
+ <tal:getView
+ tal:define="doormat_object python: doormat_brains[0].getObject()"
+ tal:content="structure doormat_object/@@doormat-view"
+ />
+</tal:getDoormat>
9 Products/Doormat/browser/doormat_viewlet_bare.pt
@@ -0,0 +1,9 @@
+<tal:getDoormat
+ tal:define="doormat_brains python:
+ context.portal_catalog(portal_type='Doormat',sort_on='created')"
+ tal:condition="python: len(doormat_brains) > 0">
+ <tal:getView
+ tal:define="doormat_object python: doormat_brains[0].getObject()"
+ tal:content="structure doormat_object/@@doormat-view-bare"
+ />
+</tal:getDoormat>
5 Products/Doormat/browser/interfaces.py
@@ -0,0 +1,5 @@
+from zope.interface import Interface
+
+class IDoormatLayer(Interface):
+ """ Marker interface for browser layer
+ """
48 Products/Doormat/browser/macros.pt
@@ -0,0 +1,48 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
+ >
+
+<div id="doormat-container"
+ tal:define="
+ doormat_data view/getDoormatData;
+ nr_of_cols python:len(doormat_data);
+ "
+ tal:attributes="class string:columns-${nr_of_cols}"
+ metal:define-macro="body">
+
+ <h2 tal:define="title view/getDoormatTitle"
+ tal:condition="title"
+ tal:content="title"
+ >
+ [Doormat title]
+ </h2>
+ <div tal:attributes="class string:doormatColumn column-${repeat/column/index}"
+ tal:repeat="column doormat_data">
+ <h3 tal:condition="column/show_title"
+ tal:content="column/column_title">
+ [Column title]
+ </h3>
+ <dl class="doormatSection" tal:repeat="section column/column_sections">
+ <dt class="doormatSectionHeader"
+ tal:condition="section/show_title"
+ tal:content="section/section_title">[title for section]</dt>
+ <dd class="doormatSectionBody" tal:repeat="link section/section_links">
+ <a tal:condition="python: link.get('link_url', None)"
+ tal:attributes="
+ href link/link_url;
+ class link/link_class;
+ "
+ tal:content="link/link_title">
+ [link title]
+ </a>
+ <div tal:condition="python: link.get('content', None)"
+ tal:replace="structure link/content">
+ [content]
+ </div>
+ </dd>
+ </dl>
+ </div>
+</div>
+
+</html>
43 Products/Doormat/browser/stylesheets/doormat.css
@@ -0,0 +1,43 @@
+#doormat-container {
+ background:none repeat scroll 0 0 #DDDDDD;
+ font-size:75%;
+ margin:1em 0;
+ float: left;
+ width: 100%;
+}
+#doormat-container h2 {
+ margin: 0.5em 0.5em 0px 0.5em;
+}
+#doormat-container h3 {
+ margin: 0.5em 0px;
+}
+#doormat-container dl {
+ margin: 0.5em 0px;
+}
+#doormat-container dl dd {
+ margin-left: 0px;
+}
+#doormat-container .doormatColumn {
+ float: left;
+ margin: 0px 1em;
+}
+
+/* Make all columns equally wide */
+#doormat-container.columns-2 .doormatColumn {
+ width: 48%;
+}
+#doormat-container.columns-3 .doormatColumn {
+ width: 31%;
+}
+#doormat-container.columns-4 .doormatColumn {
+ width: 23%;
+}
+#doormat-container.columns-5 .doormatColumn {
+ width: 18%;
+}
+#doormat-container.columns-6 .doormatColumn {
+ width: 14%;
+}
+#doormat-container.columns-7 .doormatColumn {
+ width: 12%;
+}
101 Products/Doormat/browser/views.py
@@ -0,0 +1,101 @@
+from plone.memoize.instance import memoize
+
+from zope import interface
+from zope import component
+from Products.CMFPlone import utils
+from Products.Five import BrowserView
+from zope.interface import implements
+from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin
+
+class DoormatView(BrowserView):
+ """
+ """
+
+ def getDoormatTitle(self):
+ """
+ """
+ title = ''
+ if self.context.getShowTitle():
+ title = self.context.Title()
+ return title
+
+ def getDoormatData(self):
+ """ Return a dictionary like this:
+ data = [
+ { 'column_title: 'Column One',
+ 'column_sections: [
+ { 'section_title': 'De Oosterpoort',
+ 'section_links': [
+ { 'link_title': 'Some Title',
+ 'link_url': 'http://some.whe.re',
+ 'link_class': 'external-link',
+ 'content': 'html content',
+ },
+ ]
+ },
+ ]
+ },
+ ]
+ """
+ doormat = self.context
+ data = []
+ # Fetch Columns
+ for column in doormat.objectValues():
+ column_dict = {
+ 'column_title': column.Title(),
+ 'show_title': column.getShowTitle(),
+ }
+ column_sections = []
+ sections = column.objectValues()
+
+ # Fetch Categories from Column
+ for section in sections:
+ section_dict = {
+ 'section_title': section.Title(),
+ 'show_title': section.getShowTitle(),
+ }
+ section_links = []
+ objs = section.objectValues()
+
+ # Loop over all link object in category
+ for item in objs:
+ # Use the link item's title, not that of the linked content
+ title = item.Title()
+ text = ''
+ url = ''
+ link_class = ''
+
+ if item.portal_type == 'DoormatReference':
+ linked_item = item.getInternal_link()
+ if not linked_item:
+ continue
+ url = linked_item.absolute_url()
+ elif item.portal_type == "Link":
+ # Link is an Archetypes link
+ url = item.getRemoteUrl
+ link_class = "external-link"
+ elif item.portal_type == "Document":
+ text = item.getText()
+
+ if not (text or url):
+ continue
+
+ link_dict = {
+ 'content': text,
+ 'link_url': url,
+ 'link_title': title,
+ 'link_class': link_class,
+ }
+ section_links.append(link_dict)
+ section_dict['section_links'] = section_links
+ column_sections.append(section_dict)
+ column_dict['column_sections'] = column_sections
+ data.append(column_dict)
+ return data
+
+
+
+##code-section module-footer #fill in your manual code here
+##/code-section module-footer
+
+
67 Products/Doormat/config.py
@@ -0,0 +1,67 @@
+# -*- coding: utf-8 -*-
+#
+# File: Doormat.py
+#
+# Copyright (c) 2010 by unknown <unknown>
+# Generator: ArchGenXML Version 2.5
+# http://plone.org/products/archgenxml
+#
+# GNU General Public License (GPL)
+#
+
+__author__ = """unknown <unknown>"""
+__docformat__ = 'plaintext'
+
+
+# Product configuration.
+#
+# The contents of this module will be imported into __init__.py, the
+# workflow configuration and every content type module.
+#
+# If you wish to perform custom configuration, you may put a file
+# AppConfig.py in your product's root directory. The items in there
+# will be included (by importing) in this file if found.
+
+from Products.CMFCore.permissions import setDefaultRoles
+##code-section config-head #fill in your manual code here
+##/code-section config-head
+
+
+PROJECTNAME = "Doormat"
+
+# Permissions
+DEFAULT_ADD_CONTENT_PERMISSION = "Add portal content"
+setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, ('Manager', 'Owner', 'Contributor'))
+ADD_CONTENT_PERMISSIONS = {
+ 'Doormat': 'Doormat: Add Doormat',
+ 'DoormatColumn': 'Doormat: Add DoormatColumn',
+ 'DoormatSection': 'Doormat: Add DoormatSection',
+ 'DoormatReference': 'Doormat: Add DoormatReference',
+ 'DoormatMixin': 'Doormat: Add DoormatMixin',
+}
+
+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'))
+
+product_globals = globals()
+
+# Dependencies of Products to be installed by quick-installer
+# override in custom configuration
+DEPENDENCIES = []
+
+# Dependend products - not quick-installed - used in testcase
+# override in custom configuration
+PRODUCT_DEPENDENCIES = []
+
+##code-section config-bottom #fill in your manual code here
+##/code-section config-bottom
+
+
+# Load custom configuration not managed by archgenxml
+try:
+ from Products.Doormat.AppConfig import *
+except ImportError:
+ pass
17 Products/Doormat/configure.zcml
@@ -0,0 +1,17 @@
+<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">
+
+ <i18n:registerTranslations directory="locales" />
+
+ <include file="profiles.zcml" />
+
+
+
+ <!-- ##code-section configure.zcml -->
+ <include package=".browser" />
+ <!-- ##/code-section configure.zcml -->
+
+</configure>
68 Products/Doormat/content/Doormat.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+#
+# File: Doormat.py
+#
+# Copyright (c) 2010 by unknown <unknown>
+# Generator: ArchGenXML Version 2.5
+# 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.ATContentTypes.content.folder import ATFolder
+from Products.ATContentTypes.content.folder import ATFolderSchema
+from Products.Doormat.config import *
+
+##code-section module-header #fill in your manual code here
+##/code-section module-header
+
+schema = Schema((
+
+
+),
+)
+
+##code-section after-local-schema #fill in your manual code here
+##/code-section after-local-schema
+
+Doormat_schema = ATFolderSchema.copy() + \
+ getattr(DoormatMixin, 'schema', Schema(())).copy() + \
+ schema.copy()
+
+##code-section after-schema #fill in your manual code here
+##/code-section after-schema
+
+class Doormat(ATFolder, DoormatMixin):
+ """
+ """
+ security = ClassSecurityInfo()
+
+ implements(interfaces.IDoormat)
+
+ meta_type = 'Doormat'
+ _at_rename_after_creation = True
+
+ schema = Doormat_schema
+
+ ##code-section class-header #fill in your manual code here
+ ##/code-section class-header
+
+ # Methods
+
+
+registerType(Doormat, PROJECTNAME)
+# end of class Doormat
+
+##code-section module-footer #fill in your manual code here
+##/code-section module-footer
+
68 Products/Doormat/content/DoormatColumn.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+#
+# File: DoormatColumn.py
+#
+# Copyright (c) 2010 by unknown <unknown>
+# Generator: ArchGenXML Version 2.5
+# 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.ATContentTypes.content.folder import ATFolder
+from Products.ATContentTypes.content.folder import ATFolderSchema
+from Products.Doormat.config import *
+
+##code-section module-header #fill in your manual code here
+##/code-section module-header
+
+schema = Schema((
+
+
+),
+)
+
+##code-section after-local-schema #fill in your manual code here
+##/code-section after-local-schema
+
+DoormatColumn_schema = ATFolderSchema.copy() + \
+ getattr(DoormatMixin, 'schema', Schema(())).copy() + \
+ schema.copy()
+
+##code-section after-schema #fill in your manual code here
+##/code-section after-schema
+
+class DoormatColumn(ATFolder, DoormatMixin):
+ """
+ """
+ security = ClassSecurityInfo()
+
+ implements(interfaces.IDoormatColumn)
+
+ meta_type = 'DoormatColumn'
+ _at_rename_after_creation = True
+
+ schema = DoormatColumn_schema
+
+ ##code-section class-header #fill in your manual code here
+ ##/code-section class-header
+
+ # Methods
+
+
+registerType(DoormatColumn, PROJECTNAME)
+# end of class DoormatColumn
+
+##code-section module-footer #fill in your manual code here
+##/code-section module-footer
+
75 Products/Doormat/content/DoormatMixin.py
@@ -0,0 +1,75 @@
+# -*- coding: utf-8 -*-
+#
+# File: DoormatMixin.py
+#
+# Copyright (c) 2010 by unknown <unknown>
+# Generator: ArchGenXML Version 2.5
+# 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.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin
+
+from Products.Doormat.config import *
+
+##code-section module-header #fill in your manual code here
+##/code-section module-header
+
+schema = Schema((
+
+ BooleanField(
+ name='showTitle',
+ default="True",
+ widget=BooleanField._properties['widget'](
+ label="Show title in viewlet",
+ description="If checked, this Doormat / Column / Section's title will be displayed in the doormat viewlet.",
+ label_msgid='Doormat_label_showTitle',
+ description_msgid='Doormat_help_showTitle',
+ i18n_domain='Doormat',
+ ),
+ ),
+
+),
+)
+
+##code-section after-local-schema #fill in your manual code here
+##/code-section after-local-schema
+
+DoormatMixin_schema = BaseSchema.copy() + \
+ schema.copy()
+
+##code-section after-schema #fill in your manual code here
+##/code-section after-schema
+
+class DoormatMixin(BrowserDefaultMixin):
+ """
+ """
+ security = ClassSecurityInfo()
+
+ implements(interfaces.IDoormatMixin)
+
+ meta_type = 'DoormatMixin'
+ _at_rename_after_creation = True
+
+ schema = DoormatMixin_schema
+
+ ##code-section class-header #fill in your manual code here
+ ##/code-section class-header
+
+ # Methods
+
+
+# end of class DoormatMixin
+
+##code-section module-footer #fill in your manual code here
+##/code-section module-footer
+
77 Products/Doormat/content/DoormatReference.py
@@ -0,0 +1,77 @@
+# -*- coding: utf-8 -*-
+#
+# File: DoormatReference.py
+#
+# Copyright (c) 2010 by unknown <unknown>
+# Generator: ArchGenXML Version 2.5
+# 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.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='internal_link',
+ widget=ReferenceBrowserWidget(
+ label='Internal_link',
+ label_msgid='Doormat_label_internal_link',
+ i18n_domain='Doormat',
+ ),
+ relationship="internally_links_to",
+ ),
+
+),
+)
+
+##code-section after-local-schema #fill in your manual code here
+##/code-section after-local-schema
+
+DoormatReference_schema = BaseSchema.copy() + \
+ schema.copy()
+
+##code-section after-schema #fill in your manual code here
+##/code-section after-schema
+
+class DoormatReference(BaseContent, BrowserDefaultMixin):
+ """
+ """
+ security = ClassSecurityInfo()
+
+ implements(interfaces.IDoormatReference)
+
+ meta_type = 'DoormatReference'
+ _at_rename_after_creation = True
+
+ schema = DoormatReference_schema
+
+ ##code-section class-header #fill in your manual code here
+ ##/code-section class-header
+
+ # Methods
+
+
+registerType(DoormatReference, PROJECTNAME)
+# end of class DoormatReference
+
+##code-section module-footer #fill in your manual code here
+##/code-section module-footer
+
68 Products/Doormat/content/DoormatSection.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+#
+# File: DoormatSection.py
+#
+# Copyright (c) 2010 by unknown <unknown>
+# Generator: ArchGenXML Version 2.5
+# 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.ATContentTypes.content.folder import ATFolder
+from Products.ATContentTypes.content.folder import ATFolderSchema
+from Products.Doormat.config import *
+
+##code-section module-header #fill in your manual code here
+##/code-section module-header
+
+schema = Schema((
+
+
+),
+)
+
+##code-section after-local-schema #fill in your manual code here
+##/code-section after-local-schema
+
+DoormatSection_schema = ATFolderSchema.copy() + \
+ getattr(DoormatMixin, 'schema', Schema(())).copy() + \
+ schema.copy()
+
+##code-section after-schema #fill in your manual code here
+##/code-section after-schema
+
+class DoormatSection(ATFolder, DoormatMixin):
+ """
+ """
+ security = ClassSecurityInfo()
+
+ implements(interfaces.IDoormatSection)
+
+ meta_type = 'DoormatSection'
+ _at_rename_after_creation = True
+
+ schema = DoormatSection_schema
+
+ ##code-section class-header #fill in your manual code here
+ ##/code-section class-header
+
+ # Methods
+
+
+registerType(DoormatSection, PROJECTNAME)
+# end of class DoormatSection
+
+##code-section module-footer #fill in your manual code here
+##/code-section module-footer
+
47 Products/Doormat/content/__init__.py
@@ -0,0 +1,47 @@
+# -*- coding: utf-8 -*-
+#
+# File: content.py
+#
+# Copyright (c) 2010 by unknown <unknown>
+# Generator: ArchGenXML Version 2.5
+# http://plone.org/products/archgenxml
+#
+# GNU General Public License (GPL)
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+__author__ = """unknown <unknown>"""
+__docformat__ = 'plaintext'
+
+
+##code-section init-module-header #fill in your manual code here
+##/code-section init-module-header
+
+
+# Subpackages
+# Additional
+
+# Classes
+import Doormat
+import DoormatColumn
+import DoormatSection
+import DoormatReference
+import DoormatMixin
+
+##code-section init-module-footer #fill in your manual code here
+##/code-section init-module-footer
+
29 Products/Doormat/content/interfaces.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+
+from zope.interface import Interface
+
+##code-section HEAD
+##/code-section HEAD
+
+class IDoormat(Interface):
+ """Marker interface for .Doormat.Doormat
+ """
+
+class IDoormatColumn(Interface):
+ """Marker interface for .DoormatColumn.DoormatColumn
+ """
+
+class IDoormatSection(Interface):
+ """Marker interface for .DoormatSection.DoormatSection
+ """
+
+class IDoormatReference(Interface):
+ """Marker interface for .DoormatReference.DoormatReference
+ """
+
+class IDoormatMixin(Interface):
+ """Marker interface for .DoormatMixin.DoormatMixin
+ """
+
+##code-section FOOT
+##/code-section FOOT
33 Products/Doormat/i18n/generated.pot
@@ -0,0 +1,33 @@
+# archgenxml generated POT File
+# unknown <unknown>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: Doormat\n"
+"POT-Creation-Date: Thu May 20 10:23:19 2010\n"
+"PO-Revision-Date: Thu May 20 10:23:19 2010\n"
+"Last-Translator: unknown <unknown>\n"
+"Language-Team: unknown <unknown>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"Language-Code: en\n"
+"Language-Name: English\n"
+"Preferred-Encodings: latin1 utf-8\n"
+"Domain: Doormat\n"
+
+#. Default: "If checked, the Doormat / Column / Section's title will be displayed in the doormat viewlet."
+#: content/DoormatMixin.py
+msgid "Doormat_help_showTitle"
+msgstr ""
+
+#. Default: "Internal_link"
+#: content/DoormatReference.py
+msgid "Doormat_label_internal_link"
+msgstr ""
+
+#. Default: "Show title in Doormat"
+#: content/DoormatMixin.py
+msgid "Doormat_label_showTitle"
+msgstr ""
+
2 Products/Doormat/locales/NOTEMPTY.txt
@@ -0,0 +1,2 @@
+This file is here to ensure that the locales directory will be added to the
+egg.
29 Products/Doormat/profiles.zcml
@@ -0,0 +1,29 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
+ i18n_domain="Doormat">
+
+ <include package="Products.GenericSetup" file="meta.zcml" />
+
+ <!-- ##code-section profiles.zcml-top #fill in your manual code here -->
+ <!-- ##/code-section profiles.zcml-top -->
+
+ <genericsetup:registerProfile
+ name="default"
+ title="Doormat"
+ directory="profiles/default"
+ description="Extension profile for Doormat."
+ provides="Products.GenericSetup.interfaces.EXTENSION"
+ />
+
+ <!-- ##code-section profiles.zcml-bottom #fill in your manual code here -->
+ <genericsetup:registerProfile
+ name="uninstall"
+ title="Doormat Uninstall Profile"
+ directory="profiles/uninstall"
+ description="Removes Doormat."
+ provides="Products.GenericSetup.interfaces.EXTENSION"
+ />
+ <!-- ##/code-section profiles.zcml-bottom -->
+
+</configure>
4 Products/Doormat/profiles/default/Doormat_marker.txt
@@ -0,0 +1,4 @@
+This is a marker for the products GenericSetup import steps.
+
+With this marker file present the steps in setuphandlers.py are executed only
+in context of this specific profile.
5 Products/Doormat/profiles/default/browserlayer.xml
@@ -0,0 +1,5 @@
+<layers>
+ <layer
+ name="Product.Doormat.layer"
+ interface="Products.Doormat.browser.interfaces.IDoormatLayer" />
+</layers>
6 Products/Doormat/profiles/default/catalog.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<object name="portal_catalog" meta_type="Plone Catalog Tool">
+ <column value="getShowTitle"/>
+<!-- ##code-section FOOT -->
+<!-- ##/code-section FOOT -->
+</object>
31 Products/Doormat/profiles/default/cssregistry.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<object name="portal_css" meta_type="Stylesheets Registry">
+ <!-- EXAMPLE DEFINITION
+ <stylesheet title=""
+ cacheable="True"
+ compression="safe"
+ cookable="True"
+ enabled="1"
+ expression=""
+ id="myfancystyle.css"
+ media="all"
+ rel="stylesheet"
+ rendering="import"/>
+ -->
+
+ <!-- ##code-section cssregistry.xml -->
+ <stylesheet title=""
+ id="++resource++Products.Doormat.stylesheets/doormat.css"
+ media="screen"
+ rel="stylesheet"
+ rendering="import"
+ cacheable="True"
+ compression="safe"
+ cookable="False"
+ enabled="1"
+ expression=""
+ />
+
+
+ <!-- ##/code-section cssregistry.xml -->
+</object>
10 Products/Doormat/profiles/default/factorytool.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<object name="portal_factory" meta_type="Plone Factory Tool">
+ <factorytypes>
+ <type portal_type="Doormat"/>
+ <type portal_type="DoormatColumn"/>
+ <type portal_type="DoormatSection"/>
+ <type portal_type="DoormatReference"/>
+ <type portal_type="DoormatMixin"/>
+ </factorytypes>
+</object>
29 Products/Doormat/profiles/default/import_steps.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<import-steps>
+
+
+
+
+ <import-step
+ id="Doormat-Update-RoleMappings"
+ handler="Products.Doormat.setuphandlers.updateRoleMappings"
+ title="Update Workflow role mappings for Doormat"
+ version="2010-10-13T16:45:26.262633">
+ <dependency step="Doormat-QI-dependencies"/>
+ updates the workflow role mappings for Doormat
+ </import-step>
+
+ <import-step
+ id="Doormat-postInstall"
+ handler="Products.Doormat.setuphandlers.postInstall"
+ title="manual coded post-install for Doormat"
+ version="2010-10-13T16:45:26.262633">
+ <dependency step="Doormat-QI-dependencies"/>
+ manual coded post-install for Doormat
+ </import-step>
+
+<!-- ##code-section ADDITIONALSTEPS -->
+<!-- ##/code-section ADDITIONALSTEPS -->
+
+</import-steps>
+
16 Products/Doormat/profiles/default/jsregistry.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<object name="portal_javascripts" meta_type="JavaScripts Registry">
+ <!-- EXAMPLE DEFINITION
+ <javascript cacheable="True"
+ compression="safe"
+ cookable="True"
+ enabled="True"
+ expression=""
+ id="myfancyscript.js"
+ inline="False"/>
+ -->
+
+ <!-- ##code-section jsregistry.xml -->
+ <!-- ##/code-section jsregistry.xml -->
+
+</object>
6 Products/Doormat/profiles/default/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<metadata>
+ <version>0.6</version>
+ <!-- ##code-section METADATA -->
+ <!-- ##/code-section METADATA -->
+</metadata>
28 Products/Doormat/profiles/default/skins.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<object name="portal_skins"
+ meta_type="Plone Skins Tool"
+ allow_any="False"
+ cookie_persistence="False"
+ request_varname="plone_skin">
+
+ <object name="doormat_images"
+ meta_type="Filesystem Directory View"
+ directory="Doormat/skins/doormat_images"/>
+ <object name="doormat_styles"
+ meta_type="Filesystem Directory View"
+ directory="Doormat/skins/doormat_styles"/>
+ <object name="doormat_templates"
+ meta_type="Filesystem Directory View"
+ directory="Doormat/skins/doormat_templates"/>
+
+ <skin-path name="*">
+ <layer insert-after="custom"
+ name="doormat_images"/>
+ <layer insert-after="custom"
+ name="doormat_styles"/>
+ <layer insert-after="custom"
+ name="doormat_templates"/>
+ </skin-path>
+
+</object>
16 Products/Doormat/profiles/default/types.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<object name="portal_types"
+ meta_type="Plone Types Tool">
+ <object name="Doormat"
+ meta_type="Factory-based Type Information with dynamic views"/>
+ <object name="DoormatColumn"
+ meta_type="Factory-based Type Information with dynamic views"/>
+ <object name="DoormatSection"
+ meta_type="Factory-based Type Information with dynamic views"/>
+ <object name="DoormatReference"
+ meta_type="Factory-based Type Information with dynamic views"/>
+ <object name="DoormatMixin"
+ meta_type="Factory-based Type Information with dynamic views"/>
+ <!-- ##code-section TYPES -->
+ <!-- ##/code-section TYPES -->
+</object>
48 Products/Doormat/profiles/default/types/Doormat.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<object name="Doormat"
+ meta_type="Factory-based Type Information with dynamic views"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ i18n:domain="plone">
+
+ <property name="title" i18n:translate="">Doormat</property>
+ <property name="description" i18n:translate=""></property>
+ <property name="content_icon">Doormat.gif</property>
+ <property name="content_meta_type">Doormat</property>
+ <property name="product">Doormat</property>
+ <property name="factory">addDoormat</property>
+ <property name="immediate_view">folder_listing</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+ <element value="DoormatColumn"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="default_view">folder_listing</property>
+ <property name="view_methods">
+ <element value="folder_summary_view"/>
+ <element value="folder_tabular_view"/>
+ <element value="atct_album_view"/>
+ <element value="folder_listing"/>
+ </property>
+ <property name="default_view_fallback">False</property>
+ <alias from="(Default)" to="(dynamic view)"/>
+ <alias from="view" to="(selected layout)"/>
+ <alias from="edit" to="base_edit"/>
+ <alias from="sharing" to="@@sharing"/>
+ <action title="View"
+ action_id="view"
+ category="object"
+ condition_expr=""
+ url_expr="string:${object_url}/view"
+ visible="True">
+ <permission value="View"/>
+ </action>
+ <action title="Edit"
+ action_id="edit"
+ category="object"
+ condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user"
+ url_expr="string:${object_url}/edit"
+ visible="True">
+ <permission value="Modify portal content"/>
+ </action>
+</object>
48 Products/Doormat/profiles/default/types/DoormatColumn.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<object name="DoormatColumn"
+ meta_type="Factory-based Type Information with dynamic views"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ i18n:domain="plone">
+
+ <property name="title" i18n:translate="">DoormatColumn</property>
+ <property name="description" i18n:translate=""></property>
+ <property name="content_icon">DoormatColumn.gif</property>
+ <property name="content_meta_type">DoormatColumn</property>
+ <property name="product">Doormat</property>
+ <property name="factory">addDoormatColumn</property>
+ <property name="immediate_view">folder_listing</property>
+ <property name="global_allow">False</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+ <element value="DoormatSection"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="default_view">folder_listing</property>
+ <property name="view_methods">
+ <element value="folder_summary_view"/>
+ <element value="folder_tabular_view"/>
+ <element value="atct_album_view"/>
+ <element value="folder_listing"/>
+ </property>
+ <property name="default_view_fallback">False</property>
+ <alias from="(Default)" to="(dynamic view)"/>
+ <alias from="view" to="(selected layout)"/>
+ <alias from="edit" to="base_edit"/>
+ <alias from="sharing" to="@@sharing"/>
+ <action title="View"
+ action_id="view"
+ category="object"
+ condition_expr=""
+ url_expr="string:${object_url}/view"
+ visible="True">
+ <permission value="View"/>
+ </action>
+ <action title="Edit"
+ action_id="edit"
+ category="object"
+ condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user"
+ url_expr="string:${object_url}/edit"
+ visible="True">
+ <permission value="Modify portal content"/>
+ </action>
+</object>
44 Products/Doormat/profiles/default/types/DoormatMixin.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<object name="DoormatMixin"
+ meta_type="Factory-based Type Information with dynamic views"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ i18n:domain="plone">
+
+ <property name="title" i18n:translate="">DoormatMixin</property>
+ <property name="description" i18n:translate=""></property>
+ <property name="content_icon">DoormatMixin.gif</property>
+ <property name="content_meta_type">DoormatMixin</property>
+ <property name="product">Doormat</property>
+ <property name="factory">addDoormatMixin</property>
+ <property name="immediate_view">base_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">False</property>
+ <property name="allowed_content_types">
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="default_view">base_view</property>
+ <property name="view_methods">
+ <element value="base_view"/>
+ </property>
+ <property name="default_view_fallback">False</property>
+ <alias from="(Default)" to="(dynamic view)"/>
+ <alias from="index.html" to="(dynamic view)"/>
+ <alias from="view" to="(selected layout)"/>
+ <alias from="edit" to="base_edit"/>
+ <action title="View"
+ action_id="view"
+ category="object"
+ condition_expr=""
+ url_expr="string:${object_url}/view"
+ visible="True">
+ <permission value="View"/>
+ </action>
+ <action title="Edit"
+ action_id="edit"
+ category="object"
+ condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user"
+ url_expr="string:${object_url}/edit"
+ visible="True">
+ <permission value="Modify portal content"/>
+ </action>
+</object>
44 Products/Doormat/profiles/default/types/DoormatReference.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<object name="DoormatReference"
+ meta_type="Factory-based Type Information with dynamic views"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ i18n:domain="plone">
+
+ <property name="title" i18n:translate="">Internal link</property>
+ <property name="description" i18n:translate=""></property>
+ <property name="content_icon">DoormatReference.gif</property>
+ <property name="content_meta_type">DoormatReference</property>
+ <property name="product">Doormat</property>
+ <property name="factory">addDoormatReference</property>
+ <property name="immediate_view">base_view</property>
+ <property name="global_allow">False</property>
+ <property name="filter_content_types">False</property>
+ <property name="allowed_content_types">
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="default_view">base_view</property>
+ <property name="view_methods">
+ <element value="base_view"/>
+ </property>
+ <property name="default_view_fallback">False</property>
+ <alias from="(Default)" to="(dynamic view)"/>
+ <alias from="index.html" to="(dynamic view)"/>
+ <alias from="view" to="(selected layout)"/>
+ <alias from="edit" to="base_edit"/>
+ <action title="View"
+ action_id="view"
+ category="object"
+ condition_expr=""
+ url_expr="string:${object_url}/view"
+ visible="True">
+ <permission value="View"/>
+ </action>
+ <action title="Edit"
+ action_id="edit"
+ category="object"
+ condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user"
+ url_expr="string:${object_url}/edit"
+ visible="True">
+ <permission value="Modify portal content"/>
+ </action>
+</object>
50 Products/Doormat/profiles/default/types/DoormatSection.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<object name="DoormatSection"
+ meta_type="Factory-based Type Information with dynamic views"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ i18n:domain="plone">
+
+ <property name="title" i18n:translate="">Section</property>
+ <property name="description" i18n:translate=""></property>
+ <property name="content_icon">DoormatSection.gif</property>
+ <property name="content_meta_type">DoormatSection</property>
+ <property name="product">Doormat</property>
+ <property name="factory">addDoormatSection</property>
+ <property name="immediate_view">folder_listing</property>
+ <property name="global_allow">False</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+ <element value="Link"/>
+ <element value="DoormatReference"/>
+ <element value="Document"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="default_view">folder_listing</property>
+ <property name="view_methods">
+ <element value="folder_summary_view"/>
+ <element value="folder_tabular_view"/>
+ <element value="atct_album_view"/>
+ <element value="folder_listing"/>
+ </property>
+ <property name="default_view_fallback">False</property>
+ <alias from="(Default)" to="(dynamic view)"/>
+ <alias from="view" to="(selected layout)"/>
+ <alias from="edit" to="base_edit"/>
+ <alias from="sharing" to="@@sharing"/>
+ <action title="View"
+ action_id="view"
+ category="object"
+ condition_expr=""
+ url_expr="string:${object_url}/view"
+ visible="True">
+ <permission value="View"/>
+ </action>
+ <action title="Edit"
+ action_id="edit"
+ category="object"
+ condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user"
+ url_expr="string:${object_url}/edit"
+ visible="True">
+ <permission value="Modify portal content"/>
+ </action>
+</object>
20 Products/Doormat/profiles/default/viewlets.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<object>
+ <order
+ manager="plone.portalfooter"
+ skinname="*"
+ >
+ <viewlet
+ name="doormat.footer"
+ insert-before="*"
+ />
+ </order>
+ <hidden
+ manager="plone.portalfooter"
+ skinname="*"
+ >
+ <viewlet
+ name="doormat.footer.bare"
+ />
+ </hidden>
+</object>
47 Products/Doormat/setuphandlers.py
@@ -0,0 +1,47 @@
+# -*- coding: utf-8 -*-
+#
+# File: setuphandlers.py
+#
+# Copyright (c) 2010 by unknown <unknown>
+# Generator: ArchGenXML Version 2.5
+# http://plone.org/products/archgenxml
+#
+# GNU General Public License (GPL)
+#
+
+__author__ = """unknown <unknown>"""
+__docformat__ = 'plaintext'
+
+
+import logging
+logger = logging.getLogger('Doormat: setuphandlers')
+from Products.Doormat.config import PROJECTNAME
+from Products.Doormat.config import DEPENDENCIES
+import os
+from Products.CMFCore.utils import getToolByName
+import transaction
+##code-section HEAD
+##/code-section HEAD
+
+def isNotDoormatProfile(context):
+ return context.readDataFile("Doormat_marker.txt") is None
+
+
+
+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
+ wft = getToolByName(context.getSite(), 'portal_workflow')
+ wft.updateRoleMappings()
+
+def postInstall(context):
+ """Called as at the end of the setup process. """
+ # the right place for your custom code
+ if isNotDoormatProfile(context): return
+ site = context.getSite()
+
+
+
+##code-section FOOT
+##/code-section FOOT
BIN Products/Doormat/skins/doormat_images/Doormat.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN Products/Doormat/skins/doormat_images/DoormatColumn.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN Products/Doormat/skins/doormat_images/DoormatReference.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN Products/Doormat/skins/doormat_images/DoormatSection.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
0 Products/Doormat/skins/doormat_styles/NOT_EMPTY.txt
No changes.
0 Products/Doormat/skins/doormat_templates/NOT_EMPTY.txt
No changes.
55 Products/Doormat/tests.py
@@ -0,0 +1,55 @@
+import unittest
+
+#from zope.testing import doctestunit
+#from zope.component import testing
+from Testing import ZopeTestCase as ztc
+
+from Products.Five import fiveconfigure
+from Products.PloneTestCase import PloneTestCase as ptc
+from Products.PloneTestCase.layer import PloneSite
+ptc.setupPloneSite()
+
+import Products.Doormat
+
+
+class TestCase(ptc.PloneTestCase):
+
+ class layer(PloneSite):
+
+ @classmethod
+ def setUp(cls):
+ fiveconfigure.debug_mode = True
+ ztc.installPackage(Products.Doormat)
+ fiveconfigure.debug_mode = False
+
+ @classmethod
+ def tearDown(cls):
+ pass
+
+
+def test_suite():
+ return unittest.TestSuite([
+
+ # Unit tests
+ #doctestunit.DocFileSuite(
+ # 'README.txt', package='Products.Doormat',
+ # setUp=testing.setUp, tearDown=testing.tearDown),
+
+ #doctestunit.DocTestSuite(
+ # module='Products.Doormat.mymodule',
+ # setUp=testing.setUp, tearDown=testing.tearDown),
+
+
+ # Integration tests that use PloneTestCase
+ #ztc.ZopeDocFileSuite(
+ # 'README.txt', package='Products.Doormat',
+ # test_class=TestCase),
+
+ #ztc.FunctionalDocFileSuite(
+ # 'browser.txt', package='Products.Doormat',
+ # test_class=TestCase),
+
+ ])
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='test_suite')
6 Products/__init__.py
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
162 README.txt
@@ -0,0 +1,162 @@
+Introduction
+============
+
+A doormat is a large collection of links which are presented in a structured
+way. One example is the current plone.org_, where the div#sitemap at the bottom
+is actually an ordered collection of internal and external links, with sections
+called "Downloads", "Documentation", "Developers", "Plone foundation" and
+"Support". See more examples_ of doormats.
+
+This product adds a couple of content types (Archetypes), which are used to
+create a structure which is used for generating a doormat. A viewlet on this
+doormat is placed in the Plone footer. The links in the Doormat are managed as
+content, making the Doormat more flexible than a sitemap. It's also possible
+to add external links. It's also possible to add bits of text, with markup.
+
+
+Getting started
+===============
+
+After installing the product in your site, you can add a "Doormat" item to your
+Plone site. Inside it, you can create a hierarchical structure of Columns,
+Sections, links (both internal and external), and Documents (Plone's Page type).
+
+The Doormat may look like this, schematically::
+
+ +-- Doormat -----------------------------------------------------------------------+
+ | |
+ | +-- Column 1 ----------+ +-- Column 2----------+ +-- Column 3 -------------+ |
+ | | | | | | | |
+ | | +-- Section 1 ----+ | | +-- Section 1 ----+ | | +-- Section 1 --------+ | |
+ | | | | | | | | | | | | | |
+ | | | +-- Link 1 --+ | | | | +-- Link 1 --+ | | | | +-- Document 1 --+ | | |
+ | | | +------------+ | | | | +------------+ | | | | | | | | |
+ | | | | | | | | | | | | (Contact info) | | | |
+ | | | +-- Link 2 --+ | | | | +-- Link 2 --+ | | | | | | | | |
+ | | | +------------+ | | | | +------------+ | | | | +----------------+ | | |
+ | | | | | | | | | | | | | |
+ | | +-----------------+ | | +-----------------+ | | +---------------------+ | |
+ | | | | | | | |
+ | +----------------------+ +---------------------+ +-------------------------+ |
+ | |
+ +----------------------------------------------------------------------------------+
+
+In fact, you can add more than one section, they will be displayed below each
+other. In each section, you can mix internal links, external links and
+Documents.
+
+And in real life:
+
+.. image:: http://plone.org/products/doormat/screenshot
+
+Note that the product adds an extra hierarchical layer compared to the
+plone.org_ doormat: it adds a Column, which can contain more than one Section.
+An example using this structure is the Oosterpoort_, which actually is the
+product's predecessor.
+
+Adding a Document
+=================
+
+Adding and editing a Document to the Doormat is just as simple as adding it in
+any other place. However, keep this in mind that only the "Body text" field
+will be displayed in the Doormat. Other fields, most notably the title and
+description will be omitted.
+
+Links in a Document
+-------------------
+
+By default, relative links will be created from the place where the Document
+lives. This link is then displayed in the Doormat on all pages, so it is very
+likely to be broken.
+
+The solution is to make your editor insert links by uid. With TinyMCE on Plone
+4, you can enable "link by uid" by going to the "Resource types" tab on TinyMCE
+Settings (via the "Site setup"), and checking the box called "Link using UIDs".
+
+This will apply to the whole site. You may want to revert to the default
+setting after you've added the link, as relative links are more desirable in
+general.
+
+Adding an Image
+---------------
+
+To add an image to the Doormat, add a Document and include an image there. It's
+not possible to upload an Image to a DoormatSection, so you need to upload the
+image to another place in your site first.
+
+Make sure you enable "Link using UIDs" (see above) first, because defining the
+image's location in a relative way will break in the same way as a relative
+link will break.
+
+Simple configuration
+====================
+
+You'll probably want to exclude the doormat object from navigation using the
+"Settings" tab. (This was not yet done when the above screenshot was taken.)
+
+There's a field `showTitle` on the folderish types (Doormat, Column and
+Section) which allows content managers to decide if the item's title should be
+displayed in the doormat.
+
+
+More advanced configuration and styling
+=======================================
+
+This section is intended for integrators and/or developers who would like to
+customize the way the doormat is rendered in more detail.
+
+Moving the doormat
+------------------
+
+By default, the default doormat viewlet (`doormat.footer`) is placed in the
+`plone.portalfooter` viewlet manager. It's easy to modify this in an add-on
+product, so the doormat will display below the global navigation (portal tabs),
+or anywhere else in the site.
+
+
+Displaying the doormat without the extra div elements
+-----------------------------------------------------
+
+The default viewlet renders the doormat inside Plone's default footer elements,
+so it blends in with Plone 4's default Sunburst Theme::
+
+ <div class="row">
+ <div class="cell width-full position-0" >
+ <div id="doormat-container" />
+ </div>
+ </div>
+
+Using the `doormat.footer.bare` viewlet will omit the two outermost <div>'s.
+This may be handy when using the doormat in a different theme, or in a
+customized layout. You can hide the default viewlet and enable the bare version
+through `@@manage-viewlets`, or by adding a customized `viewlets.xml` to the
+product you're developing.
+
+
+Caveats
+=======
+
+The viewlet does a catalog lookup for the `Doormat` portal type. If you have
+more than one object of this type (nothing stops you), it will use the oldest
+one.
+
+
+Dependencies / Requirements
+===========================
+
+The product works on:
+
+* Plone 3
+* Plone 4
+
+
+Credits
+=======
+
+This product was sponsored by GroningerForum_.
+
+
+.. _examples: http://www.welie.com/patterns/showPattern.php?patternID=doormat
+.. _plone.org: http://www.plone.org
+.. _Oosterpoort: http://www.de-oosterpoort.nl
+.. _GroningerForum: http://www.groningerforum.nl
13 docs/DEVELOPERS.txt
@@ -0,0 +1,13 @@
+For developers
+==============
+
+This product's content types were created with ArchGenXML. The model is in the
+the UML directory. There's a makefile for generating: cd to Products/Doormat
+and run::
+
+ make -C ../../uml/
+
+Please keep the UML model up-to-date so AGX code generation keeps working,
+unless you have good reason to do so, and please do not use older versions of
+AGX than the version it was last generated with.
+
67 docs/HISTORY.txt
@@ -0,0 +1,67 @@
+Changelog
+=========
+
+0.6 (2010-11-11)
+----------------
+
+- Ability to style doormat columns by position.
+ [malthe]
+
+- Don't use the catalog, traverse using objectValues()
+ https://dev.plone.org/plone/ticket/11265
+ [khink]
+
+0.5 (2010-10-25)
+----------------
+
+- Set global_allow=False on DoormatSection by adding tagged value in UML.
+ (agx mysteriously sets it to True by default)
+ [khink]
+
+- Developer documentation (about using AGX)
+
+- Explicitly set `external-link` class for Link type objects.
+
+0.4 (2010-10-05)
+----------------
+
+- Allow adding text as well as links.
+ http://plone.org/products/doormat/issues/6
+ [renskers]
+
+- Re-added skins folders, as these will be generated by AGX.
+ (Make them not empty.)
+ http://plone.org/products/doormat/issues/4
+ [khink]
+
+- Add class on 'doormat-container' div for number of columns.
+ Add CSS so columns are equal width.
+ [khink]
+
+0.3 (2010-07-19)
+----------------
+
+- Remove empty skins/ folders doormat_styles/ and doormat_templates/ (fixes
+ http://plone.org/products/doormat/issues/4: Skin dirs missing from egg)
+
+- Added viewlet doormat.footer.bare to display the doormat without the div.row
+ and div.cell wrapping.
+
+0.2 (2010-06-11)
+----------------
+
+- Add viewlet to browser layer (fixes
+ http://plone.org/products/doormat/issues/3: Uninstall cleanly)
+
+0.1.1 (2010-06-09)
+------------------
+
+- added locales/NOTEMPTY.txt to ensure locales/ is added to egg. This fixes #1
+ (http://plone.org/products/doormat/issues/1)
+- updated doc
+
+0.1 (2010-06-08)
+----------------
+
+Initial release
+
63 docs/INSTALL.txt
@@ -0,0 +1,63 @@
+Products.Doormat Installation
+-----------------------------
+
+To install Products.Doormat into the global Python environment (or a workingenv),
+using a traditional Zope 2 instance, you can do this:
+
+* When you're reading this you have probably already run
+ ``easy_install Products.Doormat``. Find out how to install setuptools
+ (and EasyInstall) here:
+ http://peak.telecommunity.com/DevCenter/EasyInstall
+
+* If you are using Zope 2.9 (not 2.10), get `pythonproducts`_ and install it
+ via::
+
+ python setup.py install --home /path/to/instance
+
+into your Zope instance.
+
+* Create a file called ``Products.Doormat-configure.zcml`` in the
+ ``/path/to/instance/etc/package-includes`` directory. The file
+ should only contain this::
+
+ <include package="Products.Doormat" />
+
+.. _pythonproducts: http://plone.org/products/pythonproducts
+
+
+Alternatively, if you are using zc.buildout and the plone.recipe.zope2instance
+recipe to manage your project, you can do this:
+
+* Add ``Products.Doormat`` to the list of eggs to install, e.g.:
+
+ [buildout]
+ ...
+ eggs =
+ ...
+ Products.Doormat
+
+* Tell the plone.recipe.zope2instance recipe to install a ZCML slug:
+
+ [instance]
+ recipe = plone.recipe.zope2instance
+ ...
+ zcml =
+ Products.Doormat
+
+* Re-run buildout, e.g. with:
+
+ $ ./bin/buildout
+
+You can skip the ZCML slug if you are going to explicitly include the package
+from another package's configure.zcml file.
+
+
+Because its top level Python namespace package is called ``Products``, this
+package can also be installed in Zope 2 as an old style **Zope 2 Product**.
+
+For that, move (or symlink) the ``Doormat`` folder of this project
+(``Products.Doormat/Products/Doormat``) into the ``Products`` directory of
+the Zope instance it has to be installed for, and restart the server.
+
+You can also skip the ZCML slug if you install this package the **Zope 2
+Product** way.
339 docs/LICENSE.GPL
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into