[Checkins] SVN: z3ext.controlpanel/tags/1.5.0/ release tag
Nikolay Kim
fafhrd91 at gmail.com
Tue Aug 11 04:54:54 EDT 2009
Log message for revision 102653:
release tag
Changed:
A z3ext.controlpanel/tags/1.5.0/
D z3ext.controlpanel/tags/1.5.0/CHANGES.txt
A z3ext.controlpanel/tags/1.5.0/CHANGES.txt
D z3ext.controlpanel/tags/1.5.0/bootstrap.py
A z3ext.controlpanel/tags/1.5.0/bootstrap.py
D z3ext.controlpanel/tags/1.5.0/setup.py
A z3ext.controlpanel/tags/1.5.0/setup.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/breadcrumb.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/breadcrumb.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/category.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/category.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/configlet.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/configlet.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/interfaces.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/interfaces.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/navigation.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/navigation.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/wizard.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/wizard.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlet.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlet.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlettype.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlettype.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/generations/__init__.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/generations/__init__.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/interfaces.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/interfaces.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/nl/LC_MESSAGES/z3ext.controlpanel.po
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/nl/LC_MESSAGES/z3ext.controlpanel.po
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/ru/LC_MESSAGES/z3ext.controlpanel.po
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/ru/LC_MESSAGES/z3ext.controlpanel.po
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/z3ext.controlpanel.pot
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/z3ext.controlpanel.pot
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/root.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/root.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/storage.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/storage.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/testing.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/testing.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/interfaces.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/interfaces.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/tests.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/tests.py
D z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/zcml.py
A z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/zcml.py
-=-
Deleted: z3ext.controlpanel/tags/1.5.0/CHANGES.txt
===================================================================
--- z3ext.controlpanel/trunk/CHANGES.txt 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/CHANGES.txt 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,180 +0,0 @@
-=======
-CHANGES
-=======
-
-1.4.4 (Unreleased)
-------------------
-
-- Hide 'Configure' wizard step if configlet schema is empty
-
-- Added i18n:translate attributes to pt files
-
-
-1.4.3 (2009-06-21)
-------------------
-
-- Added 'principals' configlet category
-
-- Fixed wizard support code
-
-
-1.4.2 (2009-06-02)
-------------------
-
-- Moved ContentContainerConfiglet implementation to z3ext.content.type package
-
-
-1.4.1 (2009-04-23)
-------------------
-
-- Added 'Content types' configlet category
-
-- Added helper wizard form class
-
-- Do not use z3c.autoinclude
-
-- Do not inherit ContentContainerConfiglet from ContentContainer
-
-
-1.4.0 (2009-03-12)
-------------------
-
-- Added helper class for creating content container configlet
-
-- Added browser:containerViews for data storage
-
-- CSS Styles updated
-
-
-1.3.3 (2008-11-18)
-------------------
-
-- Mark ConfigletData objects as IAttributeAnnotatable
-
-
-1.3.2 (2008-10-22)
-------------------
-
-- Fixed configlet storage if ISite doesn't exists
-
-- Updated translations: nl, ru
-
-
-1.3.1 (2008-10-07)
-------------------
-
-- Fixed migration script for multiple databases
-
-
-1.3.0 (2008-10-07)
-------------------
-
-- Added default stylesheets
-
-- Configlet data storage api has been refactored.
-
-- Use z3ext.controlpanel i18n domain
-
-
-1.2.6 (2008-08-28)
-------------------
-
-- Fixed data storage copy
-
-
-1.2.5 (2008-08-28)
-------------------
-
-- Remove wrong html tag for category view
-
-- Fix configlet storage name
-
-- Added copier for data storage
-
-
-1.2.4 (2008-05-26)
-------------------
-
-- Fixed configlet subcategory + z3c.baseregistry bug
-
-
-1.2.3 (2008-05-14)
-------------------
-
-- Replace 'autoinclude' with 'includeDependendcies'
-
-- Tests updated
-
-
-1.2.2 (2008-04-08)
-------------------
-
-- Fix UI navigation
-
-
-1.2.1 (2008-03-28)
-------------------
-
-- Removed 'principals' configlet category
-
-
-1.2.0 (2008-03-21)
-------------------
-
-- Use z3ext.pagelet directive for browser views
-
-- Added i18n
-
-- Moved to svn.zope.org
-
-
-1.1.7 (2008-03-18)
-------------------
-
-- Added functional tests
-
-
-1.1.6 (2008-02-28)
-------------------
-
-- Use z3c.autoinclude
-
-
-1.1.5 (2008-02-22)
-------------------
-
-- Added buildout.cfg for testing
-
-- Added viewlet manager for configlet navigation
-
-
-1.1.4 (2008-02-20)
-------------------
-
-- Use z3ext.layoutform
-
-
-1.1.3 (2008-02-0?)
-------------------
-
-- Added 'UI' configuration category
-
-
-1.1.2 (2008-02-04)
-------------------
-
-- Fixed problem with generated class and persistence
-
-- Remove all <grant/> directives
-
-
-1.1.0 (2008-01-31)
-------------------
-
-- Use z3ext.layout for rendering
-
-
-1.0.0 (2007-26-07)
-------------------
-
-- Initial release
Copied: z3ext.controlpanel/tags/1.5.0/CHANGES.txt (from rev 102651, z3ext.controlpanel/trunk/CHANGES.txt)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/CHANGES.txt (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/CHANGES.txt 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,182 @@
+=======
+CHANGES
+=======
+
+1.5.0 (2009-08-11)
+------------------
+
+- Hide 'Configure' wizard step if configlet schema is empty
+
+- Added i18n:translate attributes to pt files
+
+- Change copyright holder
+
+
+1.4.3 (2009-06-21)
+------------------
+
+- Added 'principals' configlet category
+
+- Fixed wizard support code
+
+
+1.4.2 (2009-06-02)
+------------------
+
+- Moved ContentContainerConfiglet implementation to z3ext.content.type package
+
+
+1.4.1 (2009-04-23)
+------------------
+
+- Added 'Content types' configlet category
+
+- Added helper wizard form class
+
+- Do not use z3c.autoinclude
+
+- Do not inherit ContentContainerConfiglet from ContentContainer
+
+
+1.4.0 (2009-03-12)
+------------------
+
+- Added helper class for creating content container configlet
+
+- Added browser:containerViews for data storage
+
+- CSS Styles updated
+
+
+1.3.3 (2008-11-18)
+------------------
+
+- Mark ConfigletData objects as IAttributeAnnotatable
+
+
+1.3.2 (2008-10-22)
+------------------
+
+- Fixed configlet storage if ISite doesn't exists
+
+- Updated translations: nl, ru
+
+
+1.3.1 (2008-10-07)
+------------------
+
+- Fixed migration script for multiple databases
+
+
+1.3.0 (2008-10-07)
+------------------
+
+- Added default stylesheets
+
+- Configlet data storage api has been refactored.
+
+- Use z3ext.controlpanel i18n domain
+
+
+1.2.6 (2008-08-28)
+------------------
+
+- Fixed data storage copy
+
+
+1.2.5 (2008-08-28)
+------------------
+
+- Remove wrong html tag for category view
+
+- Fix configlet storage name
+
+- Added copier for data storage
+
+
+1.2.4 (2008-05-26)
+------------------
+
+- Fixed configlet subcategory + z3c.baseregistry bug
+
+
+1.2.3 (2008-05-14)
+------------------
+
+- Replace 'autoinclude' with 'includeDependendcies'
+
+- Tests updated
+
+
+1.2.2 (2008-04-08)
+------------------
+
+- Fix UI navigation
+
+
+1.2.1 (2008-03-28)
+------------------
+
+- Removed 'principals' configlet category
+
+
+1.2.0 (2008-03-21)
+------------------
+
+- Use z3ext.pagelet directive for browser views
+
+- Added i18n
+
+- Moved to svn.zope.org
+
+
+1.1.7 (2008-03-18)
+------------------
+
+- Added functional tests
+
+
+1.1.6 (2008-02-28)
+------------------
+
+- Use z3c.autoinclude
+
+
+1.1.5 (2008-02-22)
+------------------
+
+- Added buildout.cfg for testing
+
+- Added viewlet manager for configlet navigation
+
+
+1.1.4 (2008-02-20)
+------------------
+
+- Use z3ext.layoutform
+
+
+1.1.3 (2008-02-0?)
+------------------
+
+- Added 'UI' configuration category
+
+
+1.1.2 (2008-02-04)
+------------------
+
+- Fixed problem with generated class and persistence
+
+- Remove all <grant/> directives
+
+
+1.1.0 (2008-01-31)
+------------------
+
+- Use z3ext.layout for rendering
+
+
+1.0.0 (2007-26-07)
+------------------
+
+- Initial release
Deleted: z3ext.controlpanel/tags/1.5.0/bootstrap.py
===================================================================
--- z3ext.controlpanel/trunk/bootstrap.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/bootstrap.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,52 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Bootstrap a buildout-based project
-
-Simply run this script in a directory containing a buildout.cfg.
-The script accepts buildout command-line options, so you can
-use the -c option to specify an alternate configuration file.
-
-$Id$
-"""
-
-import os, shutil, sys, tempfile, urllib2
-
-tmpeggs = tempfile.mkdtemp()
-
-ez = {}
-exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
- ).read() in ez
-ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
-
-import pkg_resources
-
-cmd = 'from setuptools.command.easy_install import main; main()'
-if sys.platform == 'win32':
- cmd = '"%s"' % cmd # work around spawn lamosity on windows
-
-ws = pkg_resources.working_set
-assert os.spawnle(
- os.P_WAIT, sys.executable, sys.executable,
- '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
- dict(os.environ,
- PYTHONPATH=
- ws.find(pkg_resources.Requirement.parse('setuptools')).location
- ),
- ) == 0
-
-ws.add_entry(tmpeggs)
-ws.require('zc.buildout')
-import zc.buildout.buildout
-zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
-shutil.rmtree(tmpeggs)
Copied: z3ext.controlpanel/tags/1.5.0/bootstrap.py (from rev 102651, z3ext.controlpanel/trunk/bootstrap.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/bootstrap.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/bootstrap.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+ cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+ os.P_WAIT, sys.executable, sys.executable,
+ '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Deleted: z3ext.controlpanel/tags/1.5.0/setup.py
===================================================================
--- z3ext.controlpanel/trunk/setup.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/setup.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,91 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Setup for z3ext.controlpanel package
-
-$Id$
-"""
-import sys, os
-from setuptools import setup, find_packages
-
-def read(*rnames):
- return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-
-version='1.4.4dev'
-
-
-setup(name = 'z3ext.controlpanel',
- version = version,
- description = "Control Panel - userfriendly system control panel.",
- long_description = (
- 'Detailed Documentation\n' +
- '======================\n'
- + '\n\n' +
- read('src', 'z3ext', 'controlpanel', 'README.txt')
- + '\n\n' +
- read('CHANGES.txt')
- ),
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Zope Public License',
- 'Programming Language :: Python',
- 'Natural Language :: English',
- 'Operating System :: OS Independent',
- 'Topic :: Internet :: WWW/HTTP',
- 'Framework :: Zope3'],
- author = 'Nikolay Kim',
- author_email = 'fafhrd91 at gmail.com',
- url='http://z3ext.net/',
- license='ZPL 2.1',
- packages=find_packages('src'),
- package_dir = {'':'src'},
- namespace_packages=['z3ext'],
- install_requires = ['setuptools', 'ZODB3',
- 'zope.schema',
- 'zope.interface',
- 'zope.component',
- 'zope.annotation',
- 'zope.security',
- 'zope.location',
- 'zope.publisher',
- 'zope.i18n',
- 'zope.i18nmessageid',
- 'zope.viewlet',
- 'zope.contentprovider',
- 'zope.cachedescriptors',
- 'zope.lifecycleevent',
- 'zope.configuration',
- 'zope.app.publisher',
- 'zope.app.component',
- 'zope.app.security',
- 'zope.app.container',
- 'z3ext.layout',
- 'z3ext.layoutform',
- 'z3ext.resourcepackage',
- ],
- extras_require = dict(test=['zope.securitypolicy',
- 'zope.app.security',
- 'zope.app.testing',
- 'zope.app.zcmlfiles',
- 'zope.app.folder',
- 'zope.traversing',
- 'zope.testing',
- 'zope.testbrowser',
- 'z3ext.autoinclude',
- 'z3ext.security',
- ]),
- include_package_data = True,
- zip_safe = False
- )
Copied: z3ext.controlpanel/tags/1.5.0/setup.py (from rev 102651, z3ext.controlpanel/trunk/setup.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/setup.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/setup.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,92 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Setup for z3ext.controlpanel package
+
+$Id$
+"""
+import sys, os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+version='1.5.0'
+
+
+setup(name = 'z3ext.controlpanel',
+ version = version,
+ description = "Control Panel - userfriendly system control panel.",
+ long_description = (
+ 'Detailed Documentation\n' +
+ '======================\n'
+ + '\n\n' +
+ read('src', 'z3ext', 'controlpanel', 'README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Programming Language :: Python',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Framework :: Zope3'],
+ author = 'Nikolay Kim',
+ author_email = 'fafhrd91 at gmail.com',
+ url='http://z3ext.net/',
+ license='ZPL 2.1',
+ packages=find_packages('src'),
+ package_dir = {'':'src'},
+ namespace_packages=['z3ext'],
+ install_requires = ['setuptools', 'ZODB3',
+ 'zope.schema',
+ 'zope.interface',
+ 'zope.component',
+ 'zope.annotation',
+ 'zope.security',
+ 'zope.location',
+ 'zope.publisher',
+ 'zope.i18n',
+ 'zope.i18nmessageid',
+ 'zope.viewlet',
+ 'zope.contentprovider',
+ 'zope.cachedescriptors',
+ 'zope.lifecycleevent',
+ 'zope.configuration',
+ 'zope.app.publisher',
+ 'zope.app.component',
+ 'zope.app.security',
+ 'zope.app.container',
+ 'z3c.traverser',
+ 'z3ext.layout',
+ 'z3ext.layoutform',
+ 'z3ext.resourcepackage',
+ ],
+ extras_require = dict(test=['zope.securitypolicy',
+ 'zope.app.security',
+ 'zope.app.testing',
+ 'zope.app.zcmlfiles',
+ 'zope.app.folder',
+ 'zope.traversing',
+ 'zope.testing',
+ 'zope.testbrowser',
+ 'z3ext.autoinclude',
+ 'z3ext.security',
+ ]),
+ include_package_data = True,
+ zip_safe = False
+ )
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/breadcrumb.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/breadcrumb.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/breadcrumb.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,28 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" custom IBreadcrumb implementation for IConfiglet
-
-$Id$
-"""
-from zope import component, interface
-from z3c.breadcrumb.browser import GenericBreadcrumb
-from z3ext.controlpanel.interfaces import IConfiglet
-
-
-class ConfigletBreadcrumb(GenericBreadcrumb):
- component.adapts(IConfiglet, interface.Interface)
-
- @property
- def name(self):
- return self.context.__title__ or self.context.__name__
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/breadcrumb.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/breadcrumb.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/breadcrumb.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/breadcrumb.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,28 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" custom IBreadcrumb implementation for IConfiglet
+
+$Id$
+"""
+from zope import component, interface
+from z3c.breadcrumb.browser import GenericBreadcrumb
+from z3ext.controlpanel.interfaces import IConfiglet
+
+
+class ConfigletBreadcrumb(GenericBreadcrumb):
+ component.adapts(IConfiglet, interface.Interface)
+
+ @property
+ def name(self):
+ return self.context.__title__ or self.context.__name__
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/category.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/category.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/category.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,60 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" category view
-
-$Id$
-"""
-from zope import interface
-from zope.component import queryMultiAdapter
-from z3ext.controlpanel.interfaces import ICategory, IConfiglet
-
-
-class CategoryView(object):
-
- def update(self):
- super(CategoryView, self).update()
-
- request = self.request
- context = self.context
-
- data = self.process(context, request)
-
- configlets = []
- for info in data:
- info['items'] = self.process(info['configlet'], request)
- if ICategory.providedBy(info['configlet']) and not info['items']:
- continue
- configlets.append(info)
- self.data = configlets
-
- def process(self, context, request):
- data = []
- for configlet in context.values():
- if not IConfiglet.providedBy(configlet) or \
- not configlet.isAvailable():
- continue
-
- info = {'name': configlet.__name__,
- 'title': configlet.__title__,
- 'description': configlet.__description__,
- 'icon': queryMultiAdapter(
- (configlet, request), name='zmi_icon'),
- 'items': (),
- 'selected': False,
- 'configlet': configlet}
-
- data.append((configlet.__title__, info))
-
- data.sort()
- return [info for t, info in data]
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/category.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/category.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/category.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/category.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,60 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" category view
+
+$Id$
+"""
+from zope import interface
+from zope.component import queryMultiAdapter
+from z3ext.controlpanel.interfaces import ICategory, IConfiglet
+
+
+class CategoryView(object):
+
+ def update(self):
+ super(CategoryView, self).update()
+
+ request = self.request
+ context = self.context
+
+ data = self.process(context, request)
+
+ configlets = []
+ for info in data:
+ info['items'] = self.process(info['configlet'], request)
+ if ICategory.providedBy(info['configlet']) and not info['items']:
+ continue
+ configlets.append(info)
+ self.data = configlets
+
+ def process(self, context, request):
+ data = []
+ for configlet in context.values():
+ if not IConfiglet.providedBy(configlet) or \
+ not configlet.isAvailable():
+ continue
+
+ info = {'name': configlet.__name__,
+ 'title': configlet.__title__,
+ 'description': configlet.__description__,
+ 'icon': queryMultiAdapter(
+ (configlet, request), name='zmi_icon'),
+ 'items': (),
+ 'selected': False,
+ 'configlet': configlet}
+
+ data.append((configlet.__title__, info))
+
+ data.sort()
+ return [info for t, info in data]
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/configlet.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/configlet.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/configlet.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,35 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Default view for IConfiglet
-
-$Id$
-"""
-from zope.cachedescriptors.property import Lazy
-from z3ext.layoutform import Fields, PageletEditForm
-
-
-class Configlet(PageletEditForm):
- """ configlet view """
-
- @property
- def label(self):
- return self.context.__title__
-
- @property
- def description(self):
- return self.context.__description__
-
- @Lazy
- def fields(self):
- return Fields(self.context.__schema__)
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/configlet.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/configlet.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/configlet.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/configlet.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,35 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" Default view for IConfiglet
+
+$Id$
+"""
+from zope.cachedescriptors.property import Lazy
+from z3ext.layoutform import Fields, PageletEditForm
+
+
+class Configlet(PageletEditForm):
+ """ configlet view """
+
+ @property
+ def label(self):
+ return self.context.__title__
+
+ @property
+ def description(self):
+ return self.context.__description__
+
+ @Lazy
+ def fields(self):
+ return Fields(self.context.__schema__)
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/interfaces.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/interfaces.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/interfaces.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,27 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-from zope import interface
-from zope.viewlet.interfaces import IViewletManager
-
-
-class IConfigletNavigation(IViewletManager):
- """ extra configlet navigation viewlet manager """
-
-
-class IConfigletEditWizard(interface.Interface):
- """ """
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/interfaces.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/interfaces.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/interfaces.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/interfaces.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,27 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+from zope import interface
+from zope.viewlet.interfaces import IViewletManager
+
+
+class IConfigletNavigation(IViewletManager):
+ """ extra configlet navigation viewlet manager """
+
+
+class IConfigletEditWizard(interface.Interface):
+ """ """
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/navigation.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/navigation.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/navigation.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,93 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-from zope.component import queryMultiAdapter
-from zope.viewlet.manager import ViewletManagerBase
-from z3ext.controlpanel.interfaces import IConfiglet, IRootConfiglet
-
-
-class Navigation(ViewletManagerBase):
-
- def update(self):
- super(Navigation, self).update()
-
- context = self.context
-
- # search configlet
- while not IConfiglet.providedBy(context):
- context = getattr(context, '__parent__', None)
- if context is None:
- break
-
- if context is not None:
- self.context = context
- else:
- self.data = []
- self.isRoot = True
- return
-
- self.isRoot = IRootConfiglet.providedBy(context)
- if self.isRoot:
- return
-
- path = []
- parent = context
- while IConfiglet.providedBy(parent):
- path.insert(0, parent)
- parent = parent.__parent__
-
- self.root, path = path[0], path[1:]
-
- self.data = self._process(self.root, path)
-
- def _process(self, context, path, level=1):
- request = self.request
-
- if path:
- data = []
- for name, configlet in context.items():
- if not IConfiglet.providedBy(configlet) or \
- not configlet.isAvailable():
- continue
-
- info = {'name': name,
- 'title': configlet.__title__,
- 'icon': queryMultiAdapter(
- (configlet, request), name='zmi_icon'),
- 'items': (),
- 'selected': False,
- 'configlet': configlet,
- 'level': level}
-
- if configlet.__id__ == path[0].__id__:
- info['items'] = self._process(configlet, path[1:], level+1)
-
- if configlet.__id__ == self.context.__id__:
- info['selected'] = True
- info['items'] = self._process(configlet, [configlet], level+1)
-
- data.append((configlet.__title__, info))
-
- data.sort()
- data = [info for t, info in data]
- return data
-
- def render(self):
- if self.isRoot:
- return u''
- else:
- return super(Navigation, self).render()
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/navigation.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/navigation.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/navigation.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/navigation.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,93 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+from zope.component import queryMultiAdapter
+from zope.viewlet.manager import ViewletManagerBase
+from z3ext.controlpanel.interfaces import IConfiglet, IRootConfiglet
+
+
+class Navigation(ViewletManagerBase):
+
+ def update(self):
+ super(Navigation, self).update()
+
+ context = self.context
+
+ # search configlet
+ while not IConfiglet.providedBy(context):
+ context = getattr(context, '__parent__', None)
+ if context is None:
+ break
+
+ if context is not None:
+ self.context = context
+ else:
+ self.data = []
+ self.isRoot = True
+ return
+
+ self.isRoot = IRootConfiglet.providedBy(context)
+ if self.isRoot:
+ return
+
+ path = []
+ parent = context
+ while IConfiglet.providedBy(parent):
+ path.insert(0, parent)
+ parent = parent.__parent__
+
+ self.root, path = path[0], path[1:]
+
+ self.data = self._process(self.root, path)
+
+ def _process(self, context, path, level=1):
+ request = self.request
+
+ if path:
+ data = []
+ for name, configlet in context.items():
+ if not IConfiglet.providedBy(configlet) or \
+ not configlet.isAvailable():
+ continue
+
+ info = {'name': name,
+ 'title': configlet.__title__,
+ 'icon': queryMultiAdapter(
+ (configlet, request), name='zmi_icon'),
+ 'items': (),
+ 'selected': False,
+ 'configlet': configlet,
+ 'level': level}
+
+ if configlet.__id__ == path[0].__id__:
+ info['items'] = self._process(configlet, path[1:], level+1)
+
+ if configlet.__id__ == self.context.__id__:
+ info['selected'] = True
+ info['items'] = self._process(configlet, [configlet], level+1)
+
+ data.append((configlet.__title__, info))
+
+ data.sort()
+ data = [info for t, info in data]
+ return data
+
+ def render(self):
+ if self.isRoot:
+ return u''
+ else:
+ return super(Navigation, self).render()
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/wizard.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/wizard.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/wizard.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,77 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-from zope import interface
-from zope.schema import getFields
-from zope.component import getUtility
-from z3ext.layoutform import Fields, PageletEditForm
-from z3ext.wizard import WizardWithTabs
-from z3ext.wizard.step import WizardStep, WizardStepForm
-from z3ext.wizard.button import WizardButton
-from z3ext.wizard.interfaces import ISaveable, IForwardAction
-from z3ext.layoutform.interfaces import ISaveAction
-from z3ext.controlpanel.interfaces import _
-
-from interfaces import IConfigletEditWizard
-
-
-class ConfigletEditWizard(WizardWithTabs):
- interface.implements(IConfigletEditWizard)
-
- prefix = 'configlet.'
- id = 'configlet-edit-wizard'
-
- @property
- def title(self):
- return self.context.__title__
-
- @property
- def description(self):
- return self.context.__description__
-
-
-class ConfigletEditStep(WizardStepForm):
- interface.implements(ISaveable)
-
- name = 'configlet'
- title = _('Configure')
- label = _('Configure configlet')
- permission = 'zope.Public'
-
- @property
- def fields(self):
- return Fields(self.getContent().__schema__)
-
- def isAvailable(self):
- if not len(getFields(self.getContent().__schema__)):
- return False
-
- return super(ConfigletEditStep, self).isAvailable()
-
-
-next = WizardButton(
- title = _(u'Next'),
- condition = lambda form: not form.isLastStep() \
- and not form.step.isSaveable(),
- weight = 300,
- provides = IForwardAction)
-
-save = WizardButton(
- title = _(u'Save'),
- condition = lambda form: form.step.isSaveable(),
- weight = 400,
- provides = ISaveAction)
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/wizard.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/wizard.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/wizard.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/browser/wizard.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,77 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+from zope import interface
+from zope.schema import getFields
+from zope.component import getUtility
+from z3ext.layoutform import Fields, PageletEditForm
+from z3ext.wizard import WizardWithTabs
+from z3ext.wizard.step import WizardStep, WizardStepForm
+from z3ext.wizard.button import WizardButton
+from z3ext.wizard.interfaces import ISaveable, IForwardAction
+from z3ext.layoutform.interfaces import ISaveAction
+from z3ext.controlpanel.interfaces import _
+
+from interfaces import IConfigletEditWizard
+
+
+class ConfigletEditWizard(WizardWithTabs):
+ interface.implements(IConfigletEditWizard)
+
+ prefix = 'configlet.'
+ id = 'configlet-edit-wizard'
+
+ @property
+ def title(self):
+ return self.context.__title__
+
+ @property
+ def description(self):
+ return self.context.__description__
+
+
+class ConfigletEditStep(WizardStepForm):
+ interface.implements(ISaveable)
+
+ name = 'configlet'
+ title = _('Configure')
+ label = _('Configure configlet')
+ permission = 'zope.Public'
+
+ @property
+ def fields(self):
+ return Fields(self.getContent().__schema__)
+
+ def isAvailable(self):
+ if not len(getFields(self.getContent().__schema__)):
+ return False
+
+ return super(ConfigletEditStep, self).isAvailable()
+
+
+next = WizardButton(
+ title = _(u'Next'),
+ condition = lambda form: not form.isLastStep() \
+ and not form.step.isSaveable(),
+ weight = 300,
+ provides = IForwardAction)
+
+save = WizardButton(
+ title = _(u'Save'),
+ condition = lambda form: form.step.isSaveable(),
+ weight = 400,
+ provides = ISaveAction)
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlet.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/configlet.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlet.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,110 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Configlet implementation
-
-$Id$
-"""
-from zope import schema, interface
-from zope.location import Location
-from zope.component import getUtility, queryUtility
-from zope.security.proxy import removeSecurityProxy
-from zope.interface.common.mapping import IEnumerableMapping
-
-from interfaces import IConfiglet, IConfigletData
-
-_marker = object()
-
-
-class Configlet(Location):
- interface.implements(IConfiglet, IEnumerableMapping)
-
- def __init__(self, tests=()):
- self.__name__ = self.__id__.rsplit('.', 1)[-1]
- self.__tests__ = tests
- self.__subgroups__ = ()
-
- @property
- def data(self):
- return IConfigletData(self)
-
- def isAvailable(self):
- for test in self.__tests__:
- if not test(self):
- return False
-
- if IConfiglet.providedBy(self.__parent__):
- if not self.__parent__.isAvailable():
- return False
-
- return True
-
- def add(self, name):
- if name not in self.__subgroups__:
- self.__subgroups__ = self.__subgroups__ + (name,)
-
- def remove(self, name):
- if name in self.__subgroups__:
- names = list(self.__subgroups__)
- names.remove(name)
- self.__subgroups__ = tuple(names)
-
- # implementation of IEnumerableMapping interface
- def __getitem__(self, key):
- obj = self.get(key, _marker)
- if obj is _marker:
- raise KeyError(key)
- return obj
-
- def get(self, key, default=None):
- id = self.__id__ and self.__id__ + '.' + key or key
- configlet = queryUtility(IConfiglet, id, default)
- if configlet is default:
- return default
- return configlet
-
- def __contains__(self, key):
- return key in self.keys()
-
- def keys(self):
- return self.__subgroups__
-
- def __iter__(self):
- id = self.__id__
- if id:
- id = id + '.'
-
- for key in self.keys():
- name = id + key
- configlet = queryUtility(IConfiglet, name)
- if configlet is not None:
- yield configlet
-
- def values(self):
- return [group for id, group in self.items()]
-
- def items(self):
- id = self.__id__
- if id:
- id = id + '.'
-
- items = []
- for key in self.keys():
- name = id + key
- configlet = queryUtility(IConfiglet, name)
- if configlet is not None:
- items.append((key, configlet))
- return items
-
- def __len__(self):
- return len(self.keys())
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlet.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/configlet.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlet.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlet.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,110 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" Configlet implementation
+
+$Id$
+"""
+from zope import schema, interface
+from zope.location import Location
+from zope.component import getUtility, queryUtility
+from zope.security.proxy import removeSecurityProxy
+from zope.interface.common.mapping import IEnumerableMapping
+
+from interfaces import IConfiglet, IConfigletData
+
+_marker = object()
+
+
+class Configlet(Location):
+ interface.implements(IConfiglet, IEnumerableMapping)
+
+ def __init__(self, tests=()):
+ self.__name__ = self.__id__.rsplit('.', 1)[-1]
+ self.__tests__ = tests
+ self.__subgroups__ = ()
+
+ @property
+ def data(self):
+ return IConfigletData(self)
+
+ def isAvailable(self):
+ for test in self.__tests__:
+ if not test(self):
+ return False
+
+ if IConfiglet.providedBy(self.__parent__):
+ if not self.__parent__.isAvailable():
+ return False
+
+ return True
+
+ def add(self, name):
+ if name not in self.__subgroups__:
+ self.__subgroups__ = self.__subgroups__ + (name,)
+
+ def remove(self, name):
+ if name in self.__subgroups__:
+ names = list(self.__subgroups__)
+ names.remove(name)
+ self.__subgroups__ = tuple(names)
+
+ # implementation of IEnumerableMapping interface
+ def __getitem__(self, key):
+ obj = self.get(key, _marker)
+ if obj is _marker:
+ raise KeyError(key)
+ return obj
+
+ def get(self, key, default=None):
+ id = self.__id__ and self.__id__ + '.' + key or key
+ configlet = queryUtility(IConfiglet, id, default)
+ if configlet is default:
+ return default
+ return configlet
+
+ def __contains__(self, key):
+ return key in self.keys()
+
+ def keys(self):
+ return self.__subgroups__
+
+ def __iter__(self):
+ id = self.__id__
+ if id:
+ id = id + '.'
+
+ for key in self.keys():
+ name = id + key
+ configlet = queryUtility(IConfiglet, name)
+ if configlet is not None:
+ yield configlet
+
+ def values(self):
+ return [group for id, group in self.items()]
+
+ def items(self):
+ id = self.__id__
+ if id:
+ id = id + '.'
+
+ items = []
+ for key in self.keys():
+ name = id + key
+ configlet = queryUtility(IConfiglet, name)
+ if configlet is not None:
+ items.append((key, configlet))
+ return items
+
+ def __len__(self):
+ return len(self.keys())
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlettype.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/configlettype.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlettype.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,198 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Configlet metaclass
-
-$Id$
-"""
-import sys
-from zope.schema import getFields
-
-from z3ext.controlpanel.interfaces import _
-from z3ext.controlpanel.configlet import Configlet
-
-
-_marker = object()
-
-
-class ConfigletType(type):
- """ Metaclass for all configlets
-
- >>> from zope import interface, schema
- >>> from z3ext.controlpanel import configlettype
-
- >>> class IMyConfiglet(interface.Interface):
- ... title = schema.TextLine(title = u'Title')
-
- >>> class MyConfiglet(object):
- ... pass
-
- >>> ConfigletClass = configlettype.ConfigletType(
- ... 'myconfiglet', IMyConfiglet, MyConfiglet, 'MyConfiglet', '')
-
- New class avilable by it's cname in z3ext.controlpanel.configlettype module
-
- >>> getattr(configlettype, 'Configlet<myconfiglet>') is ConfigletClass
- True
-
- Automaticly generate schema fields to ConfigletProperty
-
- >>> ConfigletClass.title
- <z3ext.controlpanel.configlettype.ConfigletProperty object at ...>
-
- >>> configlet = ConfigletClass()
- >>> configlet
- <z3ext.controlpanel.configlettype.Configlet<myconfiglet> object at ...>
-
- >>> isinstance(configlet, MyConfiglet)
- True
-
- >>> isinstance(configlet, configlettype.Configlet)
- True
-
- We also can use number of base classes
-
- >>> class MyConfiglet2(object):
- ... pass
-
- >>> ConfigletClass = configlettype.ConfigletType(
- ... 'myconfiglet', IMyConfiglet,
- ... (MyConfiglet, MyConfiglet2), 'MyConfiglet', '')
-
- """
-
- def __new__(cls, name, schema, class_=None, *args, **kw):
- cname = 'Configlet<%s>'%name
- if type(class_) is tuple:
- bases = class_ + (Configlet,)
- elif class_ is not None:
- bases = (class_, Configlet)
- else:
- bases = (Configlet,)
-
- tp = type.__new__(cls, str(cname), bases, {})
- setattr(sys.modules['z3ext.controlpanel.configlettype'], cname, tp)
-
- return tp
-
- def __init__(cls, name, schema, class_=None, title='', description=''):
- for f_id in getFields(schema):
- if not hasattr(cls, f_id):
- setattr(cls, f_id, ConfigletProperty(schema[f_id]))
-
- cls.__id__ = unicode(name)
- cls.__title__ = title
- cls.__description__ = description
- cls.__schema__ = DataProperty(schema)
-
-
-class DataProperty(object):
-
- def __init__(self, schema):
- self.schema = schema
-
- def __get__(self, inst, klass):
- return self.schema
-
- def __set__(self, inst, value):
- raise AttributeError("Can't set __schema__")
-
-
-class ConfigletProperty(object):
- """ Special property thats reads and writes values from
- instance's 'data' attribute
-
- Let's define simple schema field
-
- >>> from zope import schema
- >>> field = schema.TextLine(
- ... title = u'Test',
- ... default = u'default value')
- >>> field.__name__ = 'attr1'
-
- Now we need content class
-
- >>> from z3ext.controlpanel.storage import ConfigletData
- >>> from z3ext.controlpanel.configlettype import ConfigletProperty
- >>> class Content(object):
- ...
- ... attr1 = ConfigletProperty(field)
-
- Lets create class instance and add field values storage
-
- >>> ob = Content()
- >>> ob.data = ConfigletData()
-
- By default we should get field default value
-
- >>> ob.attr1
- u'default value'
-
- We can set only valid value
-
- >>> ob.attr1 = 'value1'
- Traceback (most recent call last):
- ...
- WrongType: ('value1', <type 'unicode'>)
-
- >>> ob.attr1 = u'value1'
- >>> ob.attr1
- u'value1'
-
- >>> ob.data['attr1']
- u'value1'
-
- If storage contains field value we shuld get it
-
- >>> ob.data['attr1'] = u'value2'
- >>> ob.attr1
- u'value2'
-
- We can't set value for readonly fields
-
- >>> field.readonly = True
- >>> ob.attr1 = u'value1'
- Traceback (most recent call last):
- ...
- ValueError: ('attr1', u'Field is readonly')
-
- """
-
- def __init__(self, field, name=None):
- if name is None:
- name = field.__name__
-
- self.__field = field
- self.__name = name
-
- def __get__(self, inst, klass):
- if inst is None:
- return self
-
- value = inst.data.get(self.__name, _marker)
- if value is _marker:
- return self.__field.default
-
- return value
-
- def __set__(self, inst, value):
- field = self.__field.bind(inst)
- field.validate(value)
- if field.readonly and \
- inst.data.get(self.__name, _marker) is not _marker:
- raise ValueError(self.__name, _(u'Field is readonly'))
-
- inst.data[self.__name] = value
-
- def __delete__(self, inst):
- del inst.data[self.__name]
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlettype.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/configlettype.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlettype.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/configlettype.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,198 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" Configlet metaclass
+
+$Id$
+"""
+import sys
+from zope.schema import getFields
+
+from z3ext.controlpanel.interfaces import _
+from z3ext.controlpanel.configlet import Configlet
+
+
+_marker = object()
+
+
+class ConfigletType(type):
+ """ Metaclass for all configlets
+
+ >>> from zope import interface, schema
+ >>> from z3ext.controlpanel import configlettype
+
+ >>> class IMyConfiglet(interface.Interface):
+ ... title = schema.TextLine(title = u'Title')
+
+ >>> class MyConfiglet(object):
+ ... pass
+
+ >>> ConfigletClass = configlettype.ConfigletType(
+ ... 'myconfiglet', IMyConfiglet, MyConfiglet, 'MyConfiglet', '')
+
+ New class avilable by it's cname in z3ext.controlpanel.configlettype module
+
+ >>> getattr(configlettype, 'Configlet<myconfiglet>') is ConfigletClass
+ True
+
+ Automaticly generate schema fields to ConfigletProperty
+
+ >>> ConfigletClass.title
+ <z3ext.controlpanel.configlettype.ConfigletProperty object at ...>
+
+ >>> configlet = ConfigletClass()
+ >>> configlet
+ <z3ext.controlpanel.configlettype.Configlet<myconfiglet> object at ...>
+
+ >>> isinstance(configlet, MyConfiglet)
+ True
+
+ >>> isinstance(configlet, configlettype.Configlet)
+ True
+
+ We also can use number of base classes
+
+ >>> class MyConfiglet2(object):
+ ... pass
+
+ >>> ConfigletClass = configlettype.ConfigletType(
+ ... 'myconfiglet', IMyConfiglet,
+ ... (MyConfiglet, MyConfiglet2), 'MyConfiglet', '')
+
+ """
+
+ def __new__(cls, name, schema, class_=None, *args, **kw):
+ cname = 'Configlet<%s>'%name
+ if type(class_) is tuple:
+ bases = class_ + (Configlet,)
+ elif class_ is not None:
+ bases = (class_, Configlet)
+ else:
+ bases = (Configlet,)
+
+ tp = type.__new__(cls, str(cname), bases, {})
+ setattr(sys.modules['z3ext.controlpanel.configlettype'], cname, tp)
+
+ return tp
+
+ def __init__(cls, name, schema, class_=None, title='', description=''):
+ for f_id in getFields(schema):
+ if not hasattr(cls, f_id):
+ setattr(cls, f_id, ConfigletProperty(schema[f_id]))
+
+ cls.__id__ = unicode(name)
+ cls.__title__ = title
+ cls.__description__ = description
+ cls.__schema__ = DataProperty(schema)
+
+
+class DataProperty(object):
+
+ def __init__(self, schema):
+ self.schema = schema
+
+ def __get__(self, inst, klass):
+ return self.schema
+
+ def __set__(self, inst, value):
+ raise AttributeError("Can't set __schema__")
+
+
+class ConfigletProperty(object):
+ """ Special property thats reads and writes values from
+ instance's 'data' attribute
+
+ Let's define simple schema field
+
+ >>> from zope import schema
+ >>> field = schema.TextLine(
+ ... title = u'Test',
+ ... default = u'default value')
+ >>> field.__name__ = 'attr1'
+
+ Now we need content class
+
+ >>> from z3ext.controlpanel.storage import ConfigletData
+ >>> from z3ext.controlpanel.configlettype import ConfigletProperty
+ >>> class Content(object):
+ ...
+ ... attr1 = ConfigletProperty(field)
+
+ Lets create class instance and add field values storage
+
+ >>> ob = Content()
+ >>> ob.data = ConfigletData()
+
+ By default we should get field default value
+
+ >>> ob.attr1
+ u'default value'
+
+ We can set only valid value
+
+ >>> ob.attr1 = 'value1'
+ Traceback (most recent call last):
+ ...
+ WrongType: ('value1', <type 'unicode'>)
+
+ >>> ob.attr1 = u'value1'
+ >>> ob.attr1
+ u'value1'
+
+ >>> ob.data['attr1']
+ u'value1'
+
+ If storage contains field value we shuld get it
+
+ >>> ob.data['attr1'] = u'value2'
+ >>> ob.attr1
+ u'value2'
+
+ We can't set value for readonly fields
+
+ >>> field.readonly = True
+ >>> ob.attr1 = u'value1'
+ Traceback (most recent call last):
+ ...
+ ValueError: ('attr1', u'Field is readonly')
+
+ """
+
+ def __init__(self, field, name=None):
+ if name is None:
+ name = field.__name__
+
+ self.__field = field
+ self.__name = name
+
+ def __get__(self, inst, klass):
+ if inst is None:
+ return self
+
+ value = inst.data.get(self.__name, _marker)
+ if value is _marker:
+ return self.__field.default
+
+ return value
+
+ def __set__(self, inst, value):
+ field = self.__field.bind(inst)
+ field.validate(value)
+ if field.readonly and \
+ inst.data.get(self.__name, _marker) is not _marker:
+ raise ValueError(self.__name, _(u'Field is readonly'))
+
+ inst.data[self.__name] = value
+
+ def __delete__(self, inst):
+ del inst.data[self.__name]
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/generations/__init__.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/generations/__init__.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/generations/__init__.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,23 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-from zope.app.generations.generations import SchemaManager
-
-schemaManager = SchemaManager(
- minimum_generation=0,
- generation=0,
- package_name='z3ext.controlpanel.generations')
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/generations/__init__.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/generations/__init__.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/generations/__init__.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/generations/__init__.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,23 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+from zope.app.generations.generations import SchemaManager
+
+schemaManager = SchemaManager(
+ minimum_generation=0,
+ generation=0,
+ package_name='z3ext.controlpanel.generations')
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/interfaces.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/interfaces.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/interfaces.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,82 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" z3ext.controlpanel interfaces
-
-$Id$
-"""
-from zope import schema, interface
-from zope.location.interfaces import ILocation
-from zope.i18nmessageid import MessageFactory
-
-_ = MessageFactory('z3ext.controlpanel')
-
-
-class ICategory(interface.Interface):
- """ settings category """
-
-
-class IRootConfiglet(interface.Interface):
- """ root settings configlet """
-
-
-class ISystemConfiglet(interface.Interface):
- """This area allows you to configure system."""
-
-
-class IContentConfiglet(interface.Interface):
- """This area allows you to configure portal content types."""
-
-
-class IPrincipalsManagement(interface.Interface):
- """ Portal principals related settings """
-
-
-class IUIConfiguration(interface.Interface):
- """ Portal UI related settings """
-
-
-class IConfiglet(ILocation):
- """A group of settings."""
-
- __id__ = schema.TextLine(
- title = u"Id",
- description = u"The id of the configlet.",
- required = True)
-
- __title__ = schema.TextLine(
- title = u"Title",
- description = u"The title of the configlet used in the UI.",
- required = True)
-
- __description__ = schema.TextLine(
- title = u"Description",
- description = u"The description of the configlet used in the UI.",
- required = False)
-
- __schema__ = interface.Attribute('Configlet schema (readonly)')
-
- def isAvailable():
- """ is configlet available in current site """
-
-
-class IConfigletData(interface.Interface):
- """ configlet data storage """
-
-
-class IConfigletDataFactory(interface.Interface):
- """ configlet data factory """
-
-
-class IConfigletDataStorage(interface.Interface):
- """ container for IConfigletData """
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/interfaces.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/interfaces.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/interfaces.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/interfaces.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,82 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" z3ext.controlpanel interfaces
+
+$Id$
+"""
+from zope import schema, interface
+from zope.location.interfaces import ILocation
+from zope.i18nmessageid import MessageFactory
+
+_ = MessageFactory('z3ext.controlpanel')
+
+
+class ICategory(interface.Interface):
+ """ settings category """
+
+
+class IRootConfiglet(interface.Interface):
+ """ root settings configlet """
+
+
+class ISystemConfiglet(interface.Interface):
+ """This area allows you to configure system."""
+
+
+class IContentConfiglet(interface.Interface):
+ """This area allows you to configure portal content types."""
+
+
+class IPrincipalsManagement(interface.Interface):
+ """ Portal principals related settings """
+
+
+class IUIConfiguration(interface.Interface):
+ """ Portal UI related settings """
+
+
+class IConfiglet(ILocation):
+ """A group of settings."""
+
+ __id__ = schema.TextLine(
+ title = u"Id",
+ description = u"The id of the configlet.",
+ required = True)
+
+ __title__ = schema.TextLine(
+ title = u"Title",
+ description = u"The title of the configlet used in the UI.",
+ required = True)
+
+ __description__ = schema.TextLine(
+ title = u"Description",
+ description = u"The description of the configlet used in the UI.",
+ required = False)
+
+ __schema__ = interface.Attribute('Configlet schema (readonly)')
+
+ def isAvailable():
+ """ is configlet available in current site """
+
+
+class IConfigletData(interface.Interface):
+ """ configlet data storage """
+
+
+class IConfigletDataFactory(interface.Interface):
+ """ configlet data factory """
+
+
+class IConfigletDataStorage(interface.Interface):
+ """ container for IConfigletData """
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/nl/LC_MESSAGES/z3ext.controlpanel.po
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/locales/nl/LC_MESSAGES/z3ext.controlpanel.po 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/nl/LC_MESSAGES/z3ext.controlpanel.po 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,63 +0,0 @@
-###############################################################################
-#
-# Copyright (c) 2003-2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-# #############################################################################
-msgid ""
-msgstr ""
-"Project-Id-Version: Development/Unknown\n"
-"POT-Creation-Date: Wed Oct 22 13:17:55 2008\n"
-"PO-Revision-Date: 2008-10-14 17:25+0100\n"
-"Last-Translator: F. Kooman <fkooman at tuxed.net>\n"
-"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: zope/app/locales/extract.py\n"
-
-#: src/z3ext/controlpanel/browser/category.pt:8
-msgid "There are no configlets in this category."
-msgstr ""
-
-#: src/z3ext/controlpanel/browser/configure.zcml:24
-msgid "View"
-msgstr "Bekijk"
-
-#: src/z3ext/controlpanel/configlettype.py:193
-msgid "Field is readonly"
-msgstr ""
-
-#: src/z3ext/controlpanel/configure.zcml:42
-msgid "This area allows you to configure system."
-msgstr "In dit gebied kunt u het systeem configureren."
-
-#: src/z3ext/controlpanel/configure.zcml:42
-msgid "System configuration"
-msgstr "Systeemconfiguratie"
-
-#: src/z3ext/controlpanel/configure.zcml:50
-msgid "User interface configuration"
-msgstr "Uiterlijk configuratie"
-
-#: src/z3ext/controlpanel/configure.zcml:50
-msgid "This area allows you to configure portal look&feel."
-msgstr "Configureren uiterlijk van uw website "
-
-#: src/z3ext/controlpanel/configure.zcml:9
-msgid "Configure control panel's configlets."
-msgstr "Configure bedieningspaneel configlets."
-
-#: src/z3ext/controlpanel/root.py:36
-#: src/z3ext/controlpanel/browser/configure.zcml:53
-#: src/z3ext/controlpanel/browser/configure.zcml:60
-msgid "System settings"
-msgstr "Systeeminstellingen"
-
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/nl/LC_MESSAGES/z3ext.controlpanel.po (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/locales/nl/LC_MESSAGES/z3ext.controlpanel.po)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/nl/LC_MESSAGES/z3ext.controlpanel.po (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/nl/LC_MESSAGES/z3ext.controlpanel.po 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,63 @@
+###############################################################################
+#
+# Copyright (c) 2003-2004 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+# #############################################################################
+msgid ""
+msgstr ""
+"Project-Id-Version: Development/Unknown\n"
+"POT-Creation-Date: Wed Oct 22 13:17:55 2008\n"
+"PO-Revision-Date: 2008-10-14 17:25+0100\n"
+"Last-Translator: F. Kooman <fkooman at tuxed.net>\n"
+"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: zope/app/locales/extract.py\n"
+
+#: src/z3ext/controlpanel/browser/category.pt:8
+msgid "There are no configlets in this category."
+msgstr ""
+
+#: src/z3ext/controlpanel/browser/configure.zcml:24
+msgid "View"
+msgstr "Bekijk"
+
+#: src/z3ext/controlpanel/configlettype.py:193
+msgid "Field is readonly"
+msgstr ""
+
+#: src/z3ext/controlpanel/configure.zcml:42
+msgid "This area allows you to configure system."
+msgstr "In dit gebied kunt u het systeem configureren."
+
+#: src/z3ext/controlpanel/configure.zcml:42
+msgid "System configuration"
+msgstr "Systeemconfiguratie"
+
+#: src/z3ext/controlpanel/configure.zcml:50
+msgid "User interface configuration"
+msgstr "Uiterlijk configuratie"
+
+#: src/z3ext/controlpanel/configure.zcml:50
+msgid "This area allows you to configure portal look&feel."
+msgstr "Configureren uiterlijk van uw website "
+
+#: src/z3ext/controlpanel/configure.zcml:9
+msgid "Configure control panel's configlets."
+msgstr "Configure bedieningspaneel configlets."
+
+#: src/z3ext/controlpanel/root.py:36
+#: src/z3ext/controlpanel/browser/configure.zcml:53
+#: src/z3ext/controlpanel/browser/configure.zcml:60
+msgid "System settings"
+msgstr "Systeeminstellingen"
+
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/ru/LC_MESSAGES/z3ext.controlpanel.po
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/locales/ru/LC_MESSAGES/z3ext.controlpanel.po 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/ru/LC_MESSAGES/z3ext.controlpanel.po 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,62 +0,0 @@
-# #############################################################################
-#
-# Copyright (c) 2003-2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-# #############################################################################
-msgid ""
-msgstr ""
-"Project-Id-Version: z3ext.controlpanel\n"
-"POT-Creation-Date: Wed Oct 22 13:17:55 2008\n"
-"PO-Revision-Date: 2008-10-22 13:22+0600\n"
-"Last-Translator: Nikolay Kim <fafhrd91 at gmail.com>\n"
-"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: zope/app/locales/extract.py\n"
-
-#: src/z3ext/controlpanel/browser/category.pt:8
-msgid "There are no configlets in this category."
-msgstr "Ð ÑÑой каÑегоÑии Ð½ÐµÑ ÐºÐ¾Ð½ÑиглеÑов."
-
-#: src/z3ext/controlpanel/browser/configure.zcml:24
-msgid "View"
-msgstr "ÐÑоÑмоÑÑ"
-
-#: src/z3ext/controlpanel/configlettype.py:193
-msgid "Field is readonly"
-msgstr "Ðоле ÑолÑко Ð´Ð»Ñ ÑÑениÑ"
-
-#: src/z3ext/controlpanel/configure.zcml:42
-msgid "This area allows you to configure system."
-msgstr "ÐонÑиглеÑÑ Ð² ÑÑой каÑегоÑии позволÑÑÑ Ð²Ð°Ð¼ конÑигÑÑиÑоваÑÑ ÑиÑÑемÑ."
-
-#: src/z3ext/controlpanel/configure.zcml:42
-msgid "System configuration"
-msgstr "ÐонÑигÑÑаÑÐ¸Ñ ÑиÑÑемÑ"
-
-#: src/z3ext/controlpanel/configure.zcml:50
-msgid "User interface configuration"
-msgstr "ÐонÑигÑÑаÑÐ¸Ñ Ð¿Ð¾Ð»ÑзоваÑелÑÑкого инÑеÑÑейÑа"
-
-#: src/z3ext/controlpanel/configure.zcml:50
-msgid "This area allows you to configure portal look&feel."
-msgstr "ÐонÑиглеÑÑ Ð² ÑÑой каÑегоÑии позволÑÑÑ Ð²Ð°Ð¼ конÑигÑÑиÑоваÑÑ ÐºÐ°Ðº вÑглÑÐ´Ð¸Ñ ÑайÑ."
-
-#: src/z3ext/controlpanel/configure.zcml:9
-msgid "Configure control panel's configlets."
-msgstr ""
-
-#: src/z3ext/controlpanel/root.py:36
-#: src/z3ext/controlpanel/browser/configure.zcml:53
-#: src/z3ext/controlpanel/browser/configure.zcml:60
-msgid "System settings"
-msgstr "СиÑÑемнÑе ÑÑÑановки"
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/ru/LC_MESSAGES/z3ext.controlpanel.po (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/locales/ru/LC_MESSAGES/z3ext.controlpanel.po)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/ru/LC_MESSAGES/z3ext.controlpanel.po (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/ru/LC_MESSAGES/z3ext.controlpanel.po 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,62 @@
+# #############################################################################
+#
+# Copyright (c) 2003-2004 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+# #############################################################################
+msgid ""
+msgstr ""
+"Project-Id-Version: z3ext.controlpanel\n"
+"POT-Creation-Date: Wed Oct 22 13:17:55 2008\n"
+"PO-Revision-Date: 2008-10-22 13:22+0600\n"
+"Last-Translator: Nikolay Kim <fafhrd91 at gmail.com>\n"
+"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: zope/app/locales/extract.py\n"
+
+#: src/z3ext/controlpanel/browser/category.pt:8
+msgid "There are no configlets in this category."
+msgstr "Ð ÑÑой каÑегоÑии Ð½ÐµÑ ÐºÐ¾Ð½ÑиглеÑов."
+
+#: src/z3ext/controlpanel/browser/configure.zcml:24
+msgid "View"
+msgstr "ÐÑоÑмоÑÑ"
+
+#: src/z3ext/controlpanel/configlettype.py:193
+msgid "Field is readonly"
+msgstr "Ðоле ÑолÑко Ð´Ð»Ñ ÑÑениÑ"
+
+#: src/z3ext/controlpanel/configure.zcml:42
+msgid "This area allows you to configure system."
+msgstr "ÐонÑиглеÑÑ Ð² ÑÑой каÑегоÑии позволÑÑÑ Ð²Ð°Ð¼ конÑигÑÑиÑоваÑÑ ÑиÑÑемÑ."
+
+#: src/z3ext/controlpanel/configure.zcml:42
+msgid "System configuration"
+msgstr "ÐонÑигÑÑаÑÐ¸Ñ ÑиÑÑемÑ"
+
+#: src/z3ext/controlpanel/configure.zcml:50
+msgid "User interface configuration"
+msgstr "ÐонÑигÑÑаÑÐ¸Ñ Ð¿Ð¾Ð»ÑзоваÑелÑÑкого инÑеÑÑейÑа"
+
+#: src/z3ext/controlpanel/configure.zcml:50
+msgid "This area allows you to configure portal look&feel."
+msgstr "ÐонÑиглеÑÑ Ð² ÑÑой каÑегоÑии позволÑÑÑ Ð²Ð°Ð¼ конÑигÑÑиÑоваÑÑ ÐºÐ°Ðº вÑглÑÐ´Ð¸Ñ ÑайÑ."
+
+#: src/z3ext/controlpanel/configure.zcml:9
+msgid "Configure control panel's configlets."
+msgstr ""
+
+#: src/z3ext/controlpanel/root.py:36
+#: src/z3ext/controlpanel/browser/configure.zcml:53
+#: src/z3ext/controlpanel/browser/configure.zcml:60
+msgid "System settings"
+msgstr "СиÑÑемнÑе ÑÑÑановки"
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/z3ext.controlpanel.pot
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/locales/z3ext.controlpanel.pot 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/z3ext.controlpanel.pot 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,63 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2003-2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-msgid ""
-msgstr ""
-"Project-Id-Version: Development/Unknown\n"
-"POT-Creation-Date: Wed Oct 22 13:26:20 2008\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: zope/app/locales/extract.py\n"
-
-#: src/z3ext/controlpanel/browser/category.pt:8
-msgid "There are no configlets in this category."
-msgstr ""
-
-#: src/z3ext/controlpanel/browser/configure.zcml:24
-msgid "View"
-msgstr ""
-
-#: src/z3ext/controlpanel/configlettype.py:193
-msgid "Field is readonly"
-msgstr ""
-
-#: src/z3ext/controlpanel/configure.zcml:42
-msgid "This area allows you to configure system."
-msgstr ""
-
-#: src/z3ext/controlpanel/configure.zcml:42
-msgid "System configuration"
-msgstr ""
-
-#: src/z3ext/controlpanel/configure.zcml:50
-msgid "User interface configuration"
-msgstr ""
-
-#: src/z3ext/controlpanel/configure.zcml:50
-msgid "This area allows you to configure portal look&feel."
-msgstr ""
-
-#: src/z3ext/controlpanel/configure.zcml:9
-msgid "Configure control panel's configlets."
-msgstr ""
-
-#: src/z3ext/controlpanel/root.py:36
-#: src/z3ext/controlpanel/browser/configure.zcml:53
-#: src/z3ext/controlpanel/browser/configure.zcml:60
-msgid "System settings"
-msgstr ""
-
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/z3ext.controlpanel.pot (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/locales/z3ext.controlpanel.pot)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/z3ext.controlpanel.pot (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/locales/z3ext.controlpanel.pot 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,63 @@
+##############################################################################
+#
+# Copyright (c) 2003-2004 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+msgid ""
+msgstr ""
+"Project-Id-Version: Development/Unknown\n"
+"POT-Creation-Date: Wed Oct 22 13:26:20 2008\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: zope/app/locales/extract.py\n"
+
+#: src/z3ext/controlpanel/browser/category.pt:8
+msgid "There are no configlets in this category."
+msgstr ""
+
+#: src/z3ext/controlpanel/browser/configure.zcml:24
+msgid "View"
+msgstr ""
+
+#: src/z3ext/controlpanel/configlettype.py:193
+msgid "Field is readonly"
+msgstr ""
+
+#: src/z3ext/controlpanel/configure.zcml:42
+msgid "This area allows you to configure system."
+msgstr ""
+
+#: src/z3ext/controlpanel/configure.zcml:42
+msgid "System configuration"
+msgstr ""
+
+#: src/z3ext/controlpanel/configure.zcml:50
+msgid "User interface configuration"
+msgstr ""
+
+#: src/z3ext/controlpanel/configure.zcml:50
+msgid "This area allows you to configure portal look&feel."
+msgstr ""
+
+#: src/z3ext/controlpanel/configure.zcml:9
+msgid "Configure control panel's configlets."
+msgstr ""
+
+#: src/z3ext/controlpanel/root.py:36
+#: src/z3ext/controlpanel/browser/configure.zcml:53
+#: src/z3ext/controlpanel/browser/configure.zcml:60
+msgid "System settings"
+msgstr ""
+
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/root.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/root.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/root.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,56 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Root configlet
-
-$Id$
-"""
-from zope import interface, component
-from zope.component import getUtility
-from zope.security import checkPermission
-from zope.security.interfaces import Unauthorized
-from zope.traversing.adapters import DefaultTraversable
-
-from zope.app.component.hooks import getSite
-from zope.app.component.interfaces import ISite
-
-from configlet import Configlet
-from interfaces import _, IConfiglet, IRootConfiglet, ICategory
-
-
-class RootConfiglet(Configlet):
- interface.implements(ICategory, IRootConfiglet)
-
- __id__ = ''
- __name__ = 'settings'
- __title__ = _(u'System settings')
- __description__ = ''
- __schema__ = IRootConfiglet
-
- def __init__(self):
- self.__subgroups__ = ()
-
- def isAvailable(self):
- return True
-
- @property
- def __parent__(self):
- return getSite()
-
-
- at interface.implementer(interface.Interface)
- at component.adapter(ISite, interface.Interface)
-def getSettings(site, request):
- if not checkPermission('z3ext.Configure', site):
- raise Unauthorized('settings')
- return getUtility(IConfiglet)
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/root.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/root.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/root.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/root.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,56 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" Root configlet
+
+$Id$
+"""
+from zope import interface, component
+from zope.component import getUtility
+from zope.security import checkPermission
+from zope.security.interfaces import Unauthorized
+from zope.traversing.adapters import DefaultTraversable
+
+from zope.app.component.hooks import getSite
+from zope.app.component.interfaces import ISite
+
+from configlet import Configlet
+from interfaces import _, IConfiglet, IRootConfiglet, ICategory
+
+
+class RootConfiglet(Configlet):
+ interface.implements(ICategory, IRootConfiglet)
+
+ __id__ = ''
+ __name__ = 'settings'
+ __title__ = _(u'System settings')
+ __description__ = ''
+ __schema__ = IRootConfiglet
+
+ def __init__(self):
+ self.__subgroups__ = ()
+
+ def isAvailable(self):
+ return True
+
+ @property
+ def __parent__(self):
+ return getSite()
+
+
+ at interface.implementer(interface.Interface)
+ at component.adapter(ISite, interface.Interface)
+def getSettings(site, request):
+ if not checkPermission('z3ext.Configure', site):
+ raise Unauthorized('settings')
+ return getUtility(IConfiglet)
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/storage.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/storage.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/storage.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,193 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" configlet storage implementation
-
-$Id$
-"""
-from zope import interface, component, event
-from zope.security.proxy import removeSecurityProxy
-from zope.location.interfaces import ILocation
-from zope.lifecycleevent import ObjectCreatedEvent
-from zope.app.container.btree import BTreeContainer
-from zope.app.component.hooks import getSite
-from zope.app.component.interfaces import ILocalSiteManager
-from zope.annotation.interfaces import IAttributeAnnotatable
-
-from interfaces import IConfiglet, IConfigletData, IRootConfiglet
-from interfaces import IConfigletDataStorage, IConfigletDataFactory
-
-
-class ConfigletDataStorage(BTreeContainer):
- interface.implements(IConfigletDataStorage)
-
-
-class ConfigletData(BTreeContainer):
- """
- >>> data = ConfigletData()
-
- Simple values saved as object attributes
-
- >>> data['attr1'] = 'value1'
- >>> data['attr1']
- 'value1'
-
- >>> data.get('attr1')
- 'value1'
-
- >>> getattr(data, 'attr1')
- 'value1'
-
- >>> 'attr1' in data
- False
-
- >>> del data['attr1']
-
- >>> getattr(data, 'attr1', None) is None
- True
-
- >>> data['attr1']
- Traceback (most recent call last):
- ...
- KeyError: 'attr1'
-
-
- Locatable objects saved as container items
-
- >>> class Test(object):
- ... interface.implements(ILocation)
- ... __parent__ = __name__ = None
-
- >>> data['attr2'] = Test()
-
- >>> data['attr2']
- <z3ext.controlpanel.storage.Test ...>
-
- >>> data.get('attr2')
- <z3ext.controlpanel.storage.Test ...>
-
- >>> hasattr(data, 'attr2')
- False
-
- >>> 'attr2' in data
- True
-
- >>> data['attr2'].__parent__ is data
- True
-
- >>> del data['attr2']
-
- >>> 'attr2' in data
- False
-
- >>> data['attr2']
- Traceback (most recent call last):
- ...
- KeyError: 'attr2'
-
-
- """
-
- interface.implements(IConfigletData, IAttributeAnnotatable)
-
- def get(self, name, default=None):
- if name in self:
- return super(ConfigletData, self).__getitem__(name)
-
- elif hasattr(self, name):
- return getattr(self, name, default)
-
- else:
- return default
-
- def __getitem__(self, name):
- if name in self:
- return super(ConfigletData, self).__getitem__(name)
-
- elif hasattr(self, name):
- return getattr(self, name)
-
- raise KeyError(name)
-
- def __setitem__(self, name, value):
- if ILocation.providedBy(value):
- super(ConfigletData, self).__setitem__(name, value)
-
- if hasattr(self, name):
- delattr(self, name)
-
- else:
- setattr(self, name, value)
-
- def __delitem__(self, name):
- if name in self:
- super(ConfigletData, self).__delitem__(name)
-
- if hasattr(self, name):
- delattr(self, name)
-
-
- at component.adapter(IConfiglet)
- at interface.implementer(IConfigletData)
-def getConfigletData(configlet):
- site = getSite()
-
- storage = None
- if site is not None:
- storage = IConfigletDataStorage(site.getSiteManager())
-
- if storage is None:
- return IConfigletDataFactory(configlet)()
-
- if configlet.__id__ not in storage:
- data = IConfigletDataFactory(configlet)()
- event.notify(ObjectCreatedEvent(data))
-
- if IRootConfiglet.providedBy(configlet):
- if '__rootconfiglet__' not in storage:
- storage['__rootconfiglet__'] = data
- return storage['__rootconfiglet__']
- else:
- storage[configlet.__id__] = data
-
- return storage[configlet.__id__]
-
-
- at component.adapter(ILocalSiteManager)
- at interface.implementer(IConfigletDataStorage)
-def getConfigletDataStorage(siteManager):
- sm = removeSecurityProxy(siteManager)
-
- storage = sm.get('controlpanel', None)
- if storage is None or not IConfigletDataStorage.providedBy(storage):
- if storage is not None:
- del sm['controlpanel']
-
- storage = ConfigletDataStorage()
- event.notify(ObjectCreatedEvent(storage))
- sm['controlpanel'] = storage
-
- storage = sm['controlpanel']
-
- return storage
-
-
-class DefaultConfigletDataFactory(object):
- component.adapts(IConfiglet)
- interface.implements(IConfigletDataFactory)
-
- def __init__(self, configlet):
- self.configlet = configlet
-
- def __call__(self, *args, **kw):
- return ConfigletData(*args, **kw)
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/storage.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/storage.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/storage.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/storage.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,193 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" configlet storage implementation
+
+$Id$
+"""
+from zope import interface, component, event
+from zope.security.proxy import removeSecurityProxy
+from zope.location.interfaces import ILocation
+from zope.lifecycleevent import ObjectCreatedEvent
+from zope.app.container.btree import BTreeContainer
+from zope.app.component.hooks import getSite
+from zope.app.component.interfaces import ILocalSiteManager
+from zope.annotation.interfaces import IAttributeAnnotatable
+
+from interfaces import IConfiglet, IConfigletData, IRootConfiglet
+from interfaces import IConfigletDataStorage, IConfigletDataFactory
+
+
+class ConfigletDataStorage(BTreeContainer):
+ interface.implements(IConfigletDataStorage)
+
+
+class ConfigletData(BTreeContainer):
+ """
+ >>> data = ConfigletData()
+
+ Simple values saved as object attributes
+
+ >>> data['attr1'] = 'value1'
+ >>> data['attr1']
+ 'value1'
+
+ >>> data.get('attr1')
+ 'value1'
+
+ >>> getattr(data, 'attr1')
+ 'value1'
+
+ >>> 'attr1' in data
+ False
+
+ >>> del data['attr1']
+
+ >>> getattr(data, 'attr1', None) is None
+ True
+
+ >>> data['attr1']
+ Traceback (most recent call last):
+ ...
+ KeyError: 'attr1'
+
+
+ Locatable objects saved as container items
+
+ >>> class Test(object):
+ ... interface.implements(ILocation)
+ ... __parent__ = __name__ = None
+
+ >>> data['attr2'] = Test()
+
+ >>> data['attr2']
+ <z3ext.controlpanel.storage.Test ...>
+
+ >>> data.get('attr2')
+ <z3ext.controlpanel.storage.Test ...>
+
+ >>> hasattr(data, 'attr2')
+ False
+
+ >>> 'attr2' in data
+ True
+
+ >>> data['attr2'].__parent__ is data
+ True
+
+ >>> del data['attr2']
+
+ >>> 'attr2' in data
+ False
+
+ >>> data['attr2']
+ Traceback (most recent call last):
+ ...
+ KeyError: 'attr2'
+
+
+ """
+
+ interface.implements(IConfigletData, IAttributeAnnotatable)
+
+ def get(self, name, default=None):
+ if name in self:
+ return super(ConfigletData, self).__getitem__(name)
+
+ elif hasattr(self, name):
+ return getattr(self, name, default)
+
+ else:
+ return default
+
+ def __getitem__(self, name):
+ if name in self:
+ return super(ConfigletData, self).__getitem__(name)
+
+ elif hasattr(self, name):
+ return getattr(self, name)
+
+ raise KeyError(name)
+
+ def __setitem__(self, name, value):
+ if ILocation.providedBy(value):
+ super(ConfigletData, self).__setitem__(name, value)
+
+ if hasattr(self, name):
+ delattr(self, name)
+
+ else:
+ setattr(self, name, value)
+
+ def __delitem__(self, name):
+ if name in self:
+ super(ConfigletData, self).__delitem__(name)
+
+ if hasattr(self, name):
+ delattr(self, name)
+
+
+ at component.adapter(IConfiglet)
+ at interface.implementer(IConfigletData)
+def getConfigletData(configlet):
+ site = getSite()
+
+ storage = None
+ if site is not None:
+ storage = IConfigletDataStorage(site.getSiteManager())
+
+ if storage is None:
+ return IConfigletDataFactory(configlet)()
+
+ if configlet.__id__ not in storage:
+ data = IConfigletDataFactory(configlet)()
+ event.notify(ObjectCreatedEvent(data))
+
+ if IRootConfiglet.providedBy(configlet):
+ if '__rootconfiglet__' not in storage:
+ storage['__rootconfiglet__'] = data
+ return storage['__rootconfiglet__']
+ else:
+ storage[configlet.__id__] = data
+
+ return storage[configlet.__id__]
+
+
+ at component.adapter(ILocalSiteManager)
+ at interface.implementer(IConfigletDataStorage)
+def getConfigletDataStorage(siteManager):
+ sm = removeSecurityProxy(siteManager)
+
+ storage = sm.get('controlpanel', None)
+ if storage is None or not IConfigletDataStorage.providedBy(storage):
+ if storage is not None:
+ del sm['controlpanel']
+
+ storage = ConfigletDataStorage()
+ event.notify(ObjectCreatedEvent(storage))
+ sm['controlpanel'] = storage
+
+ storage = sm['controlpanel']
+
+ return storage
+
+
+class DefaultConfigletDataFactory(object):
+ component.adapts(IConfiglet)
+ interface.implements(IConfigletDataFactory)
+
+ def __init__(self, configlet):
+ self.configlet = configlet
+
+ def __call__(self, *args, **kw):
+ return ConfigletData(*args, **kw)
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/testing.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/testing.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/testing.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,49 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" setup z3ext.controlpanel
-
-$Id$
-"""
-from zope import component, interface
-from zope.app.testing import setup
-from zope.annotation.attribute import AttributeAnnotations
-from zope.app.component.hooks import getSite, setSite
-
-from z3ext.controlpanel import storage, root, interfaces
-
-
-controlPanelData = None
-
- at component.adapter(interface.Interface)
- at interface.implementer(interfaces.IConfigletDataStorage)
-def getConfigletDataStorage(siteManager):
- global controlPanelData
- if controlPanelData is None:
- controlPanelData = storage.ConfigletDataStorage()
- return controlPanelData
-
-
-def setUpControlPanel():
- setup.setUpTraversal()
- setup.setUpSiteManagerLookup()
-
- component.provideAdapter(root.getSettings, name='settings')
- component.provideAdapter(AttributeAnnotations)
- component.provideUtility(root.RootConfiglet(), interfaces.IConfiglet)
-
- global controlPanelData
- controlPanelData = None
- component.provideAdapter(storage.getConfigletData)
- component.provideAdapter(getConfigletDataStorage)
- component.provideAdapter(storage.DefaultConfigletDataFactory)
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/testing.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/testing.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/testing.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/testing.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,49 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" setup z3ext.controlpanel
+
+$Id$
+"""
+from zope import component, interface
+from zope.app.testing import setup
+from zope.annotation.attribute import AttributeAnnotations
+from zope.app.component.hooks import getSite, setSite
+
+from z3ext.controlpanel import storage, root, interfaces
+
+
+controlPanelData = None
+
+ at component.adapter(interface.Interface)
+ at interface.implementer(interfaces.IConfigletDataStorage)
+def getConfigletDataStorage(siteManager):
+ global controlPanelData
+ if controlPanelData is None:
+ controlPanelData = storage.ConfigletDataStorage()
+ return controlPanelData
+
+
+def setUpControlPanel():
+ setup.setUpTraversal()
+ setup.setUpSiteManagerLookup()
+
+ component.provideAdapter(root.getSettings, name='settings')
+ component.provideAdapter(AttributeAnnotations)
+ component.provideUtility(root.RootConfiglet(), interfaces.IConfiglet)
+
+ global controlPanelData
+ controlPanelData = None
+ component.provideAdapter(storage.getConfigletData)
+ component.provideAdapter(getConfigletDataStorage)
+ component.provideAdapter(storage.DefaultConfigletDataFactory)
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/interfaces.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/tests/interfaces.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/interfaces.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,66 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-from zope import schema, interface
-from zope.app.rotterdam import Rotterdam
-from z3ext.layoutform.interfaces import ILayoutFormLayer
-
-
-class IDefaultSkin(ILayoutFormLayer, Rotterdam):
- """ my skin """
-
-
-class ICategory1(interface.Interface):
- """ test category 1 """
-
-
-class ICategory2(interface.Interface):
- """ test category 2 """
-
-
-class IConfiglet1(interface.Interface):
-
- param1 = schema.TextLine(
- title = u'param1',
- default = u'default param1')
-
- param2 = schema.Int(
- title = u'param2',
- default = 10)
-
-
-class IConfiglet2(interface.Interface):
-
- param1 = schema.TextLine(
- title = u'param1',
- default = u'default param1')
-
- param2 = schema.Int(
- title = u'param2',
- default = 10)
-
- param3 = schema.TextLine(
- title = u'param3',
- default = u'default param3')
-
-
-class IConfiglet3(interface.Interface):
- pass
-
-
-def notAvailable(*args):
- return False
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/interfaces.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/tests/interfaces.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/interfaces.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/interfaces.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,66 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+from zope import schema, interface
+from zope.app.rotterdam import Rotterdam
+from z3ext.layoutform.interfaces import ILayoutFormLayer
+
+
+class IDefaultSkin(ILayoutFormLayer, Rotterdam):
+ """ my skin """
+
+
+class ICategory1(interface.Interface):
+ """ test category 1 """
+
+
+class ICategory2(interface.Interface):
+ """ test category 2 """
+
+
+class IConfiglet1(interface.Interface):
+
+ param1 = schema.TextLine(
+ title = u'param1',
+ default = u'default param1')
+
+ param2 = schema.Int(
+ title = u'param2',
+ default = 10)
+
+
+class IConfiglet2(interface.Interface):
+
+ param1 = schema.TextLine(
+ title = u'param1',
+ default = u'default param1')
+
+ param2 = schema.Int(
+ title = u'param2',
+ default = 10)
+
+ param3 = schema.TextLine(
+ title = u'param3',
+ default = u'default param3')
+
+
+class IConfiglet3(interface.Interface):
+ pass
+
+
+def notAvailable(*args):
+ return False
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/tests.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/tests/tests.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/tests.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,81 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" z3ext Control Panel tests
-
-$Id$
-"""
-__docformat__ = "reStructuredText"
-
-import os, unittest, doctest
-from zope import interface, component
-from zope.app.testing import setup, functional
-from zope.copypastemove import ObjectCopier
-from zope.component.event import objectEventNotify
-from zope.location.interfaces import ILocation
-from zope.app.component.site import changeSiteConfigurationAfterMove
-from zope.app.component.interfaces import ISite
-from zope.app.container.interfaces import IObjectMovedEvent
-from zope.app.container.contained import dispatchToSublocations
-
-from z3ext.controlpanel.configlet import Configlet
-from z3ext.controlpanel.testing import setUpControlPanel
-
-
-z3extControlPanelLayer = functional.ZCMLLayer(
- os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
- __name__, 'z3extControlPanelLayer', allow_teardown=True)
-
-
-def setUp(test):
- setup.placefulSetUp(True)
-
- component.provideAdapter(ObjectCopier)
- component.provideHandler(objectEventNotify)
- component.provideHandler(
- changeSiteConfigurationAfterMove, (ISite, IObjectMovedEvent))
- component.provideHandler(
- dispatchToSublocations, (ILocation, IObjectMovedEvent))
-
- setUpControlPanel()
- setup.setUpTestAsModule(test, 'z3ext.controlpanel.README')
-
-
-def tearDown(test):
- setup.placefulTearDown()
- setup.tearDownTestAsModule(test)
-
-
-def test_suite():
- testbrowser = functional.FunctionalDocFileSuite(
- "testbrowser.txt",
- optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE)
- testbrowser.layer = z3extControlPanelLayer
-
- return unittest.TestSuite((
- testbrowser,
- doctest.DocFileSuite(
- '../README.txt',
- setUp=setUp, tearDown=tearDown,
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
- doctest.DocFileSuite(
- 'site.txt',
- setUp=setUp, tearDown=tearDown,
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
- doctest.DocTestSuite(
- 'z3ext.controlpanel.storage',
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
- doctest.DocTestSuite(
- 'z3ext.controlpanel.configlettype',
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
- ))
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/tests.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/tests/tests.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/tests.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/tests/tests.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,81 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" z3ext Control Panel tests
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+
+import os, unittest, doctest
+from zope import interface, component
+from zope.app.testing import setup, functional
+from zope.copypastemove import ObjectCopier
+from zope.component.event import objectEventNotify
+from zope.location.interfaces import ILocation
+from zope.app.component.site import changeSiteConfigurationAfterMove
+from zope.app.component.interfaces import ISite
+from zope.app.container.interfaces import IObjectMovedEvent
+from zope.app.container.contained import dispatchToSublocations
+
+from z3ext.controlpanel.configlet import Configlet
+from z3ext.controlpanel.testing import setUpControlPanel
+
+
+z3extControlPanelLayer = functional.ZCMLLayer(
+ os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+ __name__, 'z3extControlPanelLayer', allow_teardown=True)
+
+
+def setUp(test):
+ setup.placefulSetUp(True)
+
+ component.provideAdapter(ObjectCopier)
+ component.provideHandler(objectEventNotify)
+ component.provideHandler(
+ changeSiteConfigurationAfterMove, (ISite, IObjectMovedEvent))
+ component.provideHandler(
+ dispatchToSublocations, (ILocation, IObjectMovedEvent))
+
+ setUpControlPanel()
+ setup.setUpTestAsModule(test, 'z3ext.controlpanel.README')
+
+
+def tearDown(test):
+ setup.placefulTearDown()
+ setup.tearDownTestAsModule(test)
+
+
+def test_suite():
+ testbrowser = functional.FunctionalDocFileSuite(
+ "testbrowser.txt",
+ optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE)
+ testbrowser.layer = z3extControlPanelLayer
+
+ return unittest.TestSuite((
+ testbrowser,
+ doctest.DocFileSuite(
+ '../README.txt',
+ setUp=setUp, tearDown=tearDown,
+ optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
+ doctest.DocFileSuite(
+ 'site.txt',
+ setUp=setUp, tearDown=tearDown,
+ optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
+ doctest.DocTestSuite(
+ 'z3ext.controlpanel.storage',
+ optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
+ doctest.DocTestSuite(
+ 'z3ext.controlpanel.configlettype',
+ optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
+ ))
Deleted: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/zcml.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/zcml.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/zcml.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -1,227 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" z3ext:configlet directive
-
-$Id$
-"""
-from zope import interface
-from zope.schema import getFields
-from zope.interface.common.mapping import IEnumerableMapping
-
-from zope.component import queryUtility, getGlobalSiteManager
-
-from zope.component.zcml import utility
-from zope.component.interface import provideInterface
-
-from zope.schema.interfaces import IField
-
-from zope.security import checkPermission
-from zope.security.zcml import Permission
-from zope.security.checker import Checker, CheckerPublic
-
-from zope.configuration import fields
-from zope.configuration.exceptions import ConfigurationError
-
-from zope.app.security.protectclass import protectName, protectSetAttribute
-
-from configlet import Configlet
-from configlettype import ConfigletType
-from interfaces import IConfiglet
-
-
-class IConfigletDirective(interface.Interface):
-
- name = fields.PythonIdentifier(
- title = u"Name",
- description = u"Name of the configlet used to access the settings.",
- required = True)
-
- schema = fields.GlobalInterface(
- title = u"Configlet schema",
- description = u"This attribute specifies the schema of the configlet",
- required = True)
-
- title = fields.MessageID(
- title = u"Title",
- description = u"Title of the configlet used in UIs.",
- required = True)
-
- description = fields.MessageID(
- title = u"Description",
- description = u"Description of the configlet used in UIs.",
- required = False)
-
- class_ = fields.GlobalObject(
- title = u"Class",
- description = u'Custom configlet class',
- required = False)
-
- provides = fields.Tokens(
- title = u'Provides',
- required = False,
- value_type = fields.GlobalInterface())
-
- permission = Permission(
- title = u'Permission',
- description = u'Default access permission.',
- required = False)
-
- tests = fields.Tokens(
- title = u"Tests",
- description = u'Tests for check availability.',
- value_type = fields.GlobalObject(),
- required = False)
-
-
-class ConfigletDirective(object):
-
- def __init__(self, _context, name, schema, title,
- description='', class_=None, provides=(),
- permission='z3ext.Configure', tests=(), install_schema_utility=True):
-
- ConfigletClass = ConfigletType(
- str(name), schema, class_, title, description)
-
- for test in tests:
- if not callable(test):
- raise ConfigurationError("Test should be callable.")
-
- if permission == 'zope.Public':
- configlet = ConfigletClass(tuple(tests))
- else:
- configlet = ConfigletClass((
- PermissionChecker(permission),) + tuple(tests))
-
- utility(_context, IConfiglet, configlet, name=name)
-
- if install_schema_utility:
- utility(_context, schema, configlet)
-
- interface.classImplements(ConfigletClass, schema, *provides)
-
- self._class = ConfigletClass
- self._context = _context
- self._configlet = configlet
- self._permission = permission
-
- self.require(_context, permission,
- interface=(IConfiglet, schema), set_schema=(schema,))
- self.require(_context, CheckerPublic, interface=(IEnumerableMapping,))
- self.require(_context, CheckerPublic, attributes=('isAvailable',))
-
- _context.action(
- discriminator=('z3ext:controlpanel', configlet),
- callable=addSubgroup, args=(configlet,))
-
- def require(self, _context,
- permission=None, attributes=None, interface=None,
- like_class=None, set_attributes=None, set_schema=None):
- """Require a permission to access a specific aspect"""
- if not (interface or attributes or set_attributes or set_schema):
- raise ConfigurationError("Nothing required")
-
- if not permission:
- raise ConfigurationError("No permission specified")
-
- if interface:
- for i in interface:
- if i:
- self.__protectByInterface(i, permission)
-
- if attributes:
- self.__protectNames(attributes, permission)
-
- if set_attributes:
- self.__protectSetAttributes(set_attributes, permission)
-
- if set_schema:
- for s in set_schema:
- self.__protectSetSchema(s, permission)
-
- def allow(self, _context, attributes=None, interface=None):
- """Like require, but with permission_id zope.Public"""
- return self.require(_context, self._permission, attributes, interface)
-
- def __protectByInterface(self, interface, permission_id):
- "Set a permission on names in an interface."
- for n, d in interface.namesAndDescriptions(1):
- self.__protectName(n, permission_id)
-
- self._context.action(
- discriminator = None,
- callable = provideInterface,
- args = (interface.__module__+'.'+interface.getName(), interface))
-
- def __protectName(self, name, permission_id):
- "Set a permission on a particular name."
- self._context.action(
- discriminator = ('z3ext:controlpanel:protectName',
- self._class, name, object()),
- callable = protectName,
- args = (self._class, name, permission_id))
-
- def __protectNames(self, names, permission_id):
- "Set a permission on a bunch of names."
- for name in names:
- self.__protectName(name, permission_id)
-
- def __protectSetAttributes(self, names, permission_id):
- "Set a permission on a bunch of names."
- for name in names:
- self._context.action(
- discriminator = ('z3ext:controlpanel:protectSetAttribute',
- self._class, name, object()),
- callable = protectSetAttribute,
- args = (self._class, name, permission_id))
-
- def __protectSetSchema(self, schema, permission_id):
- "Set a permission on a bunch of names."
- _context = self._context
-
- for name in schema:
- field = schema[name]
- if IField.providedBy(field) and not field.readonly:
- _context.action(
- discriminator = ('z3ext:controlpanel:protectSetAttribute',
- self._class, name, object()),
- callable = protectSetAttribute,
- args = (self._class, name, permission_id))
-
- _context.action(
- discriminator = None,
- callable = provideInterface,
- args = (schema.__module__+'.'+schema.getName(), schema))
-
-
-def addSubgroup(configlet):
- if '.' in configlet.__id__:
- parentId = configlet.__id__.rsplit('.', 1)[0]
- else:
- parentId = ''
-
- parent = queryUtility(IConfiglet, parentId)
- if parent is None:
- parent = getGlobalSiteManager().getUtility(IConfiglet, parentId)
-
- parent.add(configlet.__name__)
- configlet.__parent__ = parent
-
-
-class PermissionChecker(object):
-
- def __init__(self, permission):
- self.permission = permission
-
- def __call__(self, configlet):
- return checkPermission(self.permission, configlet)
Copied: z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/zcml.py (from rev 102651, z3ext.controlpanel/trunk/src/z3ext/controlpanel/zcml.py)
===================================================================
--- z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/zcml.py (rev 0)
+++ z3ext.controlpanel/tags/1.5.0/src/z3ext/controlpanel/zcml.py 2009-08-11 08:54:54 UTC (rev 102653)
@@ -0,0 +1,227 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" z3ext:configlet directive
+
+$Id$
+"""
+from zope import interface
+from zope.schema import getFields
+from zope.interface.common.mapping import IEnumerableMapping
+
+from zope.component import queryUtility, getGlobalSiteManager
+
+from zope.component.zcml import utility
+from zope.component.interface import provideInterface
+
+from zope.schema.interfaces import IField
+
+from zope.security import checkPermission
+from zope.security.zcml import Permission
+from zope.security.checker import Checker, CheckerPublic
+
+from zope.configuration import fields
+from zope.configuration.exceptions import ConfigurationError
+
+from zope.app.security.protectclass import protectName, protectSetAttribute
+
+from configlet import Configlet
+from configlettype import ConfigletType
+from interfaces import IConfiglet
+
+
+class IConfigletDirective(interface.Interface):
+
+ name = fields.PythonIdentifier(
+ title = u"Name",
+ description = u"Name of the configlet used to access the settings.",
+ required = True)
+
+ schema = fields.GlobalInterface(
+ title = u"Configlet schema",
+ description = u"This attribute specifies the schema of the configlet",
+ required = True)
+
+ title = fields.MessageID(
+ title = u"Title",
+ description = u"Title of the configlet used in UIs.",
+ required = True)
+
+ description = fields.MessageID(
+ title = u"Description",
+ description = u"Description of the configlet used in UIs.",
+ required = False)
+
+ class_ = fields.GlobalObject(
+ title = u"Class",
+ description = u'Custom configlet class',
+ required = False)
+
+ provides = fields.Tokens(
+ title = u'Provides',
+ required = False,
+ value_type = fields.GlobalInterface())
+
+ permission = Permission(
+ title = u'Permission',
+ description = u'Default access permission.',
+ required = False)
+
+ tests = fields.Tokens(
+ title = u"Tests",
+ description = u'Tests for check availability.',
+ value_type = fields.GlobalObject(),
+ required = False)
+
+
+class ConfigletDirective(object):
+
+ def __init__(self, _context, name, schema, title,
+ description='', class_=None, provides=(),
+ permission='z3ext.Configure', tests=(), install_schema_utility=True):
+
+ ConfigletClass = ConfigletType(
+ str(name), schema, class_, title, description)
+
+ for test in tests:
+ if not callable(test):
+ raise ConfigurationError("Test should be callable.")
+
+ if permission == 'zope.Public':
+ configlet = ConfigletClass(tuple(tests))
+ else:
+ configlet = ConfigletClass((
+ PermissionChecker(permission),) + tuple(tests))
+
+ utility(_context, IConfiglet, configlet, name=name)
+
+ if install_schema_utility:
+ utility(_context, schema, configlet)
+
+ interface.classImplements(ConfigletClass, schema, *provides)
+
+ self._class = ConfigletClass
+ self._context = _context
+ self._configlet = configlet
+ self._permission = permission
+
+ self.require(_context, permission,
+ interface=(IConfiglet, schema), set_schema=(schema,))
+ self.require(_context, CheckerPublic, interface=(IEnumerableMapping,))
+ self.require(_context, CheckerPublic, attributes=('isAvailable',))
+
+ _context.action(
+ discriminator=('z3ext:controlpanel', configlet),
+ callable=addSubgroup, args=(configlet,))
+
+ def require(self, _context,
+ permission=None, attributes=None, interface=None,
+ like_class=None, set_attributes=None, set_schema=None):
+ """Require a permission to access a specific aspect"""
+ if not (interface or attributes or set_attributes or set_schema):
+ raise ConfigurationError("Nothing required")
+
+ if not permission:
+ raise ConfigurationError("No permission specified")
+
+ if interface:
+ for i in interface:
+ if i:
+ self.__protectByInterface(i, permission)
+
+ if attributes:
+ self.__protectNames(attributes, permission)
+
+ if set_attributes:
+ self.__protectSetAttributes(set_attributes, permission)
+
+ if set_schema:
+ for s in set_schema:
+ self.__protectSetSchema(s, permission)
+
+ def allow(self, _context, attributes=None, interface=None):
+ """Like require, but with permission_id zope.Public"""
+ return self.require(_context, self._permission, attributes, interface)
+
+ def __protectByInterface(self, interface, permission_id):
+ "Set a permission on names in an interface."
+ for n, d in interface.namesAndDescriptions(1):
+ self.__protectName(n, permission_id)
+
+ self._context.action(
+ discriminator = None,
+ callable = provideInterface,
+ args = (interface.__module__+'.'+interface.getName(), interface))
+
+ def __protectName(self, name, permission_id):
+ "Set a permission on a particular name."
+ self._context.action(
+ discriminator = ('z3ext:controlpanel:protectName',
+ self._class, name, object()),
+ callable = protectName,
+ args = (self._class, name, permission_id))
+
+ def __protectNames(self, names, permission_id):
+ "Set a permission on a bunch of names."
+ for name in names:
+ self.__protectName(name, permission_id)
+
+ def __protectSetAttributes(self, names, permission_id):
+ "Set a permission on a bunch of names."
+ for name in names:
+ self._context.action(
+ discriminator = ('z3ext:controlpanel:protectSetAttribute',
+ self._class, name, object()),
+ callable = protectSetAttribute,
+ args = (self._class, name, permission_id))
+
+ def __protectSetSchema(self, schema, permission_id):
+ "Set a permission on a bunch of names."
+ _context = self._context
+
+ for name in schema:
+ field = schema[name]
+ if IField.providedBy(field) and not field.readonly:
+ _context.action(
+ discriminator = ('z3ext:controlpanel:protectSetAttribute',
+ self._class, name, object()),
+ callable = protectSetAttribute,
+ args = (self._class, name, permission_id))
+
+ _context.action(
+ discriminator = None,
+ callable = provideInterface,
+ args = (schema.__module__+'.'+schema.getName(), schema))
+
+
+def addSubgroup(configlet):
+ if '.' in configlet.__id__:
+ parentId = configlet.__id__.rsplit('.', 1)[0]
+ else:
+ parentId = ''
+
+ parent = queryUtility(IConfiglet, parentId)
+ if parent is None:
+ parent = getGlobalSiteManager().getUtility(IConfiglet, parentId)
+
+ parent.add(configlet.__name__)
+ configlet.__parent__ = parent
+
+
+class PermissionChecker(object):
+
+ def __init__(self, permission):
+ self.permission = permission
+
+ def __call__(self, configlet):
+ return checkPermission(self.permission, configlet)
More information about the Checkins
mailing list