[Checkins] SVN: zamplugin.sitemanager/ Move implementation form
private repos to svn.zope.org
Roger Ineichen
roger at projekt01.ch
Sat Feb 16 11:20:42 EST 2008
Log message for revision 83911:
Move implementation form private repos to svn.zope.org
Changed:
A zamplugin.sitemanager/branches/
A zamplugin.sitemanager/tags/
A zamplugin.sitemanager/trunk/
A zamplugin.sitemanager/trunk/CHANGES.txt
A zamplugin.sitemanager/trunk/README.txt
A zamplugin.sitemanager/trunk/bootstrap.py
A zamplugin.sitemanager/trunk/buildout.cfg
A zamplugin.sitemanager/trunk/externals/
A zamplugin.sitemanager/trunk/setup.py
A zamplugin.sitemanager/trunk/src/
A zamplugin.sitemanager/trunk/src/zamplugin/
A zamplugin.sitemanager/trunk/src/zamplugin/__init__.py
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/README.txt
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/__init__.py
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/browser.zcml
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/configure.zcml
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/contents.pt
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/ftesting.zcml
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/menu.py
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/menu.zcml
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/plugin.py
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/plugin.zcml
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/sitemanager.pt
A zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/tests.py
-=-
Added: zamplugin.sitemanager/trunk/CHANGES.txt
===================================================================
--- zamplugin.sitemanager/trunk/CHANGES.txt (rev 0)
+++ zamplugin.sitemanager/trunk/CHANGES.txt 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,8 @@
+=======
+CHANGES
+=======
+
+Version 0.5.0 (unreleased)
+-------------------------
+
+- Initial Release
Property changes on: zamplugin.sitemanager/trunk/CHANGES.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/README.txt
===================================================================
--- zamplugin.sitemanager/trunk/README.txt (rev 0)
+++ zamplugin.sitemanager/trunk/README.txt 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1 @@
+This package provides a site management for ZAM (Zope 3 Application Management).
Property changes on: zamplugin.sitemanager/trunk/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/bootstrap.py
===================================================================
--- zamplugin.sitemanager/trunk/bootstrap.py (rev 0)
+++ zamplugin.sitemanager/trunk/bootstrap.py 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+"""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: bootstrap.py 75940 2007-05-24 14:45:00Z srichter $
+"""
+
+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)
Property changes on: zamplugin.sitemanager/trunk/bootstrap.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/buildout.cfg
===================================================================
--- zamplugin.sitemanager/trunk/buildout.cfg (rev 0)
+++ zamplugin.sitemanager/trunk/buildout.cfg 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,279 @@
+[buildout]
+develop = .
+ externals/z3c.batching
+ externals/z3c.contents
+ externals/z3c.menu.ready2go
+ externals/z3c.table
+ externals/zam.api
+ externals/zam.skin
+
+parts = app var test checker coverage
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = zamplugin.sitemanager [test]
+
+[checker]
+recipe = lovely.recipe:importchecker
+path = src/zamplugin/sitemanager
+
+[coverage]
+recipe = zc.recipe.egg
+eggs = z3c.coverage
+
+
+[app]
+recipe = z3c.recipe.dev:app
+eggs = zamplugin.sitemanager
+server = zserver
+zope.conf =
+ ${var:zconfig}
+
+ interrupt-check-interval 50
+
+ <server>
+ type WSGI-HTTP
+ address 8080
+ </server>
+
+ <eventlog>
+ <logfile>
+ path access.log
+ </logfile>
+ <logfile>
+ path STDOUT
+ formatter zope.exceptions.log.Formatter
+ </logfile>
+ </eventlog>
+
+ <accesslog>
+ <logfile>
+ path access.log
+ </logfile>
+ <logfile>
+ path STDOUT
+ </logfile>
+ </accesslog>
+
+ devmode on
+
+site.zcml =
+ <!-- Turn on the devmode -->
+ <configure
+ xmlns:meta="http://namespaces.zope.org/meta"
+ xmlns:browser="http://namespaces.zope.org/browser"
+ xmlns:mail="http://namespaces.zope.org/mail"
+ i18n_domain="zope">
+
+ <!-- Turn on the devmode -->
+ <meta:provides feature="devmode" />
+
+ <!-- load meta configuration for exclude -->
+ <include package="zc.configuration" file="meta.zcml" />
+
+
+ <!-- exclude will prevent from include -->
+ <exclude package="zope.app.authentication" file="ftpplugins.zcml" />
+ <exclude package="zope.app.authentication" file="groupfolder.zcml" />
+ <exclude package="zope.app.authentication" file="principalfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" />
+ <exclude package="zope.app.authentication.browser" file="configure.zcml" />
+ <exclude package="zope.app.authentication.browser" file="groupfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" file="httpplugins.zcml" />
+ <exclude package="zope.app.authentication.browser" file="principalfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" file="session.zcml" />
+ <exclude package="zope.app.broken" file="browser.zcml" />
+ <exclude package="zope.app.container.browser" />
+ <exclude package="zope.app.error.browser" />
+ <exclude package="zope.app.folder.browser" />
+ <exclude package="zope.app.i18n" />
+ <exclude package="zope.app.intid.browser" />
+ <exclude package="zope.app.securitypolicy.browser" />
+ <exclude package="zope.app.session" file="browser.zcml" />
+ <exclude package="zope.dublincore.browser" />
+
+
+ <!-- load zope meta configuration -->
+ <include package="zope.app.component" file="meta.zcml" />
+ <include package="zope.app.component.browser" file="meta.zcml" />
+ <include package="zope.app.container.browser" file="meta.zcml" />
+ <include package="zope.app.pagetemplate" file="meta.zcml" />
+ <include package="zope.app.publication" file="meta.zcml" />
+ <include package="zope.app.publisher" file="meta.zcml" />
+ <include package="zope.app.security" file="meta.zcml" />
+ <include package="zope.i18n" file="meta.zcml" />
+ <include package="zope.security" file="meta.zcml" />
+ <include package="zope.securitypolicy" file="meta.zcml" />
+ <include package="zope.viewlet" file="meta.zcml" />
+
+
+ <!-- load 3rd party meta configuration -->
+ <include package="z3c.baseregistry" file="meta.zcml" />
+ <include package="z3c.form" file="meta.zcml" />
+ <include package="z3c.macro" file="meta.zcml" />
+ <include package="z3c.pagelet" file="meta.zcml" />
+ <include package="z3c.template" file="meta.zcml" />
+ <include package="z3c.zrtresource" file="meta.zcml" />
+
+
+ <!-- vocabulary setup, that's bad and weird, because this is meta configuration -->
+ <include package="zope.app.schema" />
+
+
+ <!-- bootstrap Database -->
+ <include package="zope.app.appsetup" />
+ <include package="zope.app.zopeappgenerations" />
+
+ <!-- zope server -->
+ <include package="zope.app.server" />
+ <include package="zope.app.twisted" />
+ <include package="zope.app.wsgi" />
+
+
+ <!-- zope packages -->
+ <include package="zope.annotation" />
+ <include package="zope.component" />
+ <include package="zope.contentprovider" />
+ <include package="zope.copypastemove" />
+ <include package="zope.dublincore" />
+ <include package="zope.error" />
+ <include package="zope.location" />
+ <include package="zope.publisher" />
+ <include package="zope.securitypolicy" />
+ <include package="zope.session" />
+ <include package="zope.traversing" />
+ <include package="zope.traversing.browser" />
+
+
+ <!-- load zope package configuration -->
+ <include package="zope.app.authentication" />
+ <include package="zope.app.broken" />
+ <include package="zope.app.component" />
+ <include package="zope.app.container" />
+ <include package="zope.app.folder" />
+ <include package="zope.app.http" />
+ <include package="zope.app.intid" />
+ <include package="zope.app.keyreference" />
+ <include package="zope.app.principalannotation" />
+ <include package="zope.app.publication" />
+ <include package="zope.app.publisher" />
+ <include package="zope.app.publisher.browser" />
+ <include package="zope.app.security" />
+ <include package="zope.app.securitypolicy" />
+ <include package="zope.app.session" />
+
+
+ <!-- load 3rd party configuration -->
+ <include package="z3c.breadcrumb" />
+ <include package="z3c.form" />
+ <include package="z3c.formui" />
+ <include package="z3c.layer.pagelet" />
+ <include package="z3c.layer.ready2go" />
+ <include package="z3c.menu.ready2go" />
+ <include package="z3c.macro" />
+ <include package="z3c.pagelet" />
+ <include package="z3c.contents" />
+
+
+ <!-- zam configuration -->
+ <include package="zam.api" />
+ <include package="zam.skin" />
+ <include package="zamplugin.sitemanager" />
+
+
+ <!-- from zope.app.i18n move this to another package -->
+ <!-- Setup language negotiation -->
+ <utility
+ provides="zope.i18n.interfaces.INegotiator"
+ component="zope.i18n.negotiator.negotiator"
+ />
+
+ <!-- Setup charset negotiation -->
+ <adapter
+ factory="zope.publisher.http.HTTPCharsets"
+ for="zope.publisher.interfaces.http.IHTTPRequest"
+ provides="zope.i18n.interfaces.IUserPreferredCharsets"
+ />
+
+ <!-- Setup charset negotiation -->
+ <adapter
+ factory="zope.app.publisher.browser.ModifiableBrowserLanguages"
+ for="zope.publisher.interfaces.http.IHTTPRequest"
+ provides="zope.i18n.interfaces.IModifiableUserPreferredLanguages"
+ />
+
+ <class class="zope.publisher.http.HTTPRequest">
+ <implements
+ interface="zope.annotation.interfaces.IAttributeAnnotatable"
+ />
+ </class>
+
+
+ <!-- load other zcml files -->
+ <include file="securitypolicy.zcml" />
+ <include file="principals.zcml" />
+
+ <browser:defaultView name="index.html" />
+ <browser:defaultSkin name="ZAM" />
+
+ </configure>
+
+principals.zcml =
+ <unauthenticatedPrincipal
+ id="lovelybooks.anybody"
+ title="Unauthenticated User"
+ />
+
+ <unauthenticatedGroup
+ id="zope.Anybody"
+ title="Unauthenticated Users"
+ />
+
+ <authenticatedGroup
+ id="zope.Authenticated"
+ title="Authenticated Users"
+ />
+
+ <everybodyGroup
+ id="zope.Everybody"
+ title="All Users"
+ />
+
+ <principal
+ id="zope.manager"
+ title="Manager"
+ login="Manager"
+ password="password"
+ />
+
+ <grant
+ role="zope.Manager"
+ principal="zope.manager"
+ />
+
+securitypolicy.zcml =
+ <include package="zope.app.securitypolicy" />
+
+ <securityPolicy
+ component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+ <role id="zope.Anonymous" title="Everybody"
+ description="All users have this role implicitly" />
+ <role id="zope.Manager" title="Site Manager" />
+ <role id="zope.Member" title="Site Member" />
+
+ <!-- Replace the following directive if you don't want public access -->
+ <grant
+ permission="zope.View"
+ role="zope.Anonymous"
+ />
+ <grant
+ permission="zope.app.dublincore.view"
+ role="zope.Anonymous"
+ />
+
+ <grantAll role="zope.Manager" />
+
+
+[var]
+recipe = zc.recipe.filestorage
Added: zamplugin.sitemanager/trunk/setup.py
===================================================================
--- zamplugin.sitemanager/trunk/setup.py (rev 0)
+++ zamplugin.sitemanager/trunk/setup.py 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,104 @@
+##############################################################################
+#
+# 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
+
+$Id:$
+"""
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+setup (
+ name='zamplugin.sitemanager',
+ version='0.5.0',
+ author = "Roger Ineichen and the Zope Community",
+ author_email = "zope3-dev at zope.org",
+ description = "Site manager support for Zope Application Management",
+ long_description=(
+ read('README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ license = "ZPL 2.1",
+ keywords = "zope3 site manager application management user interface",
+ classifiers = [
+ 'Development Status :: 4 - Beta',
+ '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'],
+ url = 'http://cheeseshop.python.org/pypi/zamplugin.sitemanager',
+ packages = find_packages('src'),
+ include_package_data = True,
+ package_dir = {'':'src'},
+ namespace_packages = ['zamplugin'],
+ extras_require = dict(
+ test = [
+ 'z3c.coverage',
+ 'z3c.testing',
+ 'zope.app.appsetup',
+ 'zope.app.authentication',
+ 'zope.app.component',
+ 'zope.app.keyreference',
+ 'zope.app.publication',
+ 'zope.app.schema',
+ 'zope.app.testing',
+ 'zope.copypastemove',
+ 'zope.i18n',
+ 'zope.publisher',
+ 'zope.schema',
+ 'zope.security',
+ 'zope.securitypolicy',
+ 'zope.session',
+ 'zope.testing',
+ 'zope.testbrowser',
+ ],
+ ),
+ install_requires = [
+ 'setuptools',
+ 'z3c.baseregistry',
+ 'z3c.form',
+ 'z3c.formui',
+ 'z3c.layer.pagelet',
+ 'z3c.layer.ready2go',
+ 'z3c.menu.ready2go',
+ 'z3c.pagelet',
+ 'z3c.table',
+ 'z3c.contents',
+ 'z3c.batching',
+ 'z3c.zrtresource',
+ 'zam.api',
+ 'zam.skin',
+ 'zc.configuration',
+ 'zope.app.component',
+ 'zope.app.http',
+ 'zope.app.intid',
+ 'zope.app.publisher',
+ 'zope.app.securitypolicy',
+ 'zope.app.server',
+ 'zope.app.twisted',
+ 'zope.configuration',
+ 'zope.interface',
+ 'zope.publisher',
+ 'zope.traversing',
+ 'zope.viewlet',
+ ],
+ zip_safe = False,
+)
Property changes on: zamplugin.sitemanager/trunk/setup.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/__init__.py
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/__init__.py (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/__init__.py 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,7 @@
+# this is a namespace package
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/__init__.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/README.txt
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/README.txt (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/README.txt 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,23 @@
+======
+README
+======
+
+This package contains the site manager part for the Zope Application
+Management.
+
+Login as manager first:
+
+ >>> from zope.testbrowser.testing import Browser
+ >>> manager = Browser()
+ >>> manager.addHeader('Authorization', 'Basic mgr:mgrpw')
+
+Check if we can access the page.html view which is registred in the
+ftesting.zcml file with our skin:
+
+ >>> manager = Browser()
+ >>> manager.handleErrors = False
+ >>> manager.addHeader('Authorization', 'Basic mgr:mgrpw')
+ >>> skinURL = 'http://localhost/++skin++ZAM/index.html'
+ >>> manager.open(skinURL)
+ >>> manager.url
+ 'http://localhost/++skin++ZAM/index.html'
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/__init__.py
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/__init__.py (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/__init__.py 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1 @@
+# Make a package.
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/__init__.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/browser.zcml
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/browser.zcml (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/browser.zcml 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,35 @@
+<configure
+ xmlns:zope="http://namespaces.zope.org/zope"
+ xmlns="http://namespaces.zope.org/browser"
+ xmlns:z3c="http://namespaces.zope.org/z3c"
+ i18n_domain="zam">
+
+ <z3c:pagelet
+ name="contents.html"
+ for="zope.app.component.interfaces.ISiteManagementFolder"
+ class="z3c.contents.browser.ContentsPage"
+ permission="zope.ManageSite"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ />
+
+ <defaultView
+ for="zope.app.component.interfaces.ISiteManagementFolder"
+ name="contents.html"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ />
+
+ <z3c:pagelet
+ name="contents.html"
+ for="zope.app.component.interfaces.ILocalSiteManager"
+ class="z3c.contents.browser.ContentsPage"
+ permission="zope.ManageSite"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ />
+
+ <defaultView
+ for="zope.app.component.interfaces.ILocalSiteManager"
+ name="contents.html"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ />
+
+</configure>
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/browser.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/configure.zcml
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/configure.zcml (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/configure.zcml 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,20 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ i18n_domain="zam">
+
+ <include file="plugin.zcml" />
+
+ <registerIn registry="zamplugin.sitemanager.plugin.SiteManagerBaseRegistry">
+ <view
+ name="etc"
+ type="zam.api.layer.IZAMBrowserLayer"
+ provides="zope.traversing.interfaces.ITraversable" for="*"
+ factory="zope.traversing.namespace.etc"
+ />
+
+ <include file="browser.zcml" />
+ <include file="menu.zcml" />
+
+ </registerIn>
+
+</configure>
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/configure.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/contents.pt
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/contents.pt (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/contents.pt 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,97 @@
+ <form name="containerContentsForm" method="post" action="."
+ tal:attributes="action request/URL"
+ tal:define="container_contents view/listContentInfo">
+
+ <input type="hidden" name="type_name" value=""
+ tal:attributes="value request/type_name"
+ tal:condition="request/type_name|nothing"
+ />
+ <input type="hidden" name="retitle_id" value=""
+ tal:attributes="value request/retitle_id"
+ tal:condition="request/retitle_id|nothing"
+ />
+
+ <div class="page_error"
+ tal:condition="view/error"
+ tal:content="view/error"
+ i18n:translate="">
+ Error message
+ </div>
+
+ <table id="sortable" class="listing" summary="Content listing"
+ i18n:attributes="summary">
+
+ <thead>
+ <tr>
+ <th>X</th>
+ <th i18n:translate="">Name</th>
+ <th i18n:translate="">Title</th>
+ <th i18n:translate="">Size</th>
+ <th i18n:translate="">Created</th>
+ <th i18n:translate="">Modified</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+ <metal:block tal:define="supportsRename view/supportsRename"
+ tal:repeat="item container_contents">
+ <tr tal:define="url item/url; oddrow repeat/item/odd"
+ tal:attributes="class python:oddrow and 'even' or 'odd'" >
+ <td>
+ <input type="checkbox" class="noborder slaveBox" name="ids:list" id="#"
+ value="#"
+ tal:attributes="value item/id;
+ id item/cb_id;
+ checked request/ids_checked|nothing;"/>
+ </td>
+ <td><a href="#"
+ tal:attributes="href
+ string:${url}/index.html"
+ tal:content="item/id"
+ >foo</a
+ ></td>
+ <td>
+ <span
+ tal:content="item/title|default"
+ i18n:translate=""
+ > </span>
+ </td>
+
+ <td><span tal:content="item/size/sizeForDisplay|nothing"
+ i18n:translate="">
+ </span></td>
+ <td><span tal:define="created item/created|default"
+ tal:content="created"
+ i18n:translate=""> </span></td>
+ <td><span tal:define="modified item/modified|default"
+ tal:content="modified"
+ i18n:translate=""> </span></td>
+ </tr>
+ </metal:block>
+
+ </tbody>
+ </table>
+
+ <tal:block tal:condition="view/normalButtons">
+ <input type="submit" name="container_paste_button" value="Paste"
+ tal:condition="view/hasClipboardContents"
+ i18n:attributes="value container-paste-button"
+ />
+ <input type="submit" name="container_delete_button" value="Delete"
+ i18n:attributes="value container-delete-button"
+ tal:condition="view/supportsDelete"
+ i18n:domain="zope"
+ />
+ </tal:block>
+
+ <div tal:condition="view/specialButtons">
+ <input type="submit" value="Apply"
+ i18n:attributes="value container-apply-button"
+ />
+ <input type="submit" name="container_cancel_button" value="Cancel"
+ i18n:attributes="value container-cancel-button"
+ />
+ </div>
+
+ </form>
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/contents.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/ftesting.zcml
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/ftesting.zcml (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/ftesting.zcml 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,211 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:meta="http://namespaces.zope.org/meta"
+ xmlns:browser="http://namespaces.zope.org/browser"
+ xmlns:z3c="http://namespaces.zope.org/z3c"
+ i18n_domain="zope">
+
+ <!-- Turn on the devmode -->
+ <meta:provides feature="devmode" />
+
+ <!-- load meta configuration for exclude -->
+ <include package="zc.configuration" file="meta.zcml" />
+
+ <!-- exclude will prevent from include -->
+ <exclude package="zope.app.authentication" file="ftpplugins.zcml" />
+ <exclude package="zope.app.authentication" file="groupfolder.zcml" />
+ <exclude package="zope.app.authentication" file="principalfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" />
+ <exclude package="zope.app.authentication.browser" file="configure.zcml" />
+ <exclude package="zope.app.authentication.browser" file="groupfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" file="httpplugins.zcml" />
+ <exclude package="zope.app.authentication.browser" file="principalfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" file="session.zcml" />
+ <exclude package="zope.app.broken" file="browser.zcml" />
+ <exclude package="zope.app.container.browser" />
+ <exclude package="zope.app.error.browser" />
+ <exclude package="zope.app.folder.browser" />
+ <exclude package="zope.app.i18n.browser" />
+ <exclude package="zope.app.intid.browser" />
+ <exclude package="zope.app.securitypolicy.browser" />
+ <exclude package="zope.app.session" file="browser.zcml" />
+ <exclude package="zope.dublincore.browser" />
+
+
+ <!-- z3c exlude -->
+ <exclude package="z3c.sampledata.browser" />
+
+ <!-- meta configure -->
+ <include package="zope.app.component" file="meta.zcml" />
+ <include package="zope.app.component.browser" file="meta.zcml" />
+ <include package="zope.app.container.browser" file="meta.zcml" />
+ <include package="zope.app.pagetemplate" file="meta.zcml" />
+ <include package="zope.app.publication" file="meta.zcml" />
+ <include package="zope.app.publisher" file="meta.zcml" />
+ <include package="zope.app.security" file="meta.zcml" />
+ <include package="zope.i18n" file="meta.zcml" />
+ <include package="zope.security" file="meta.zcml" />
+ <include package="zope.securitypolicy" file="meta.zcml" />
+ <include package="zope.viewlet" file="meta.zcml" />
+
+
+ <!-- load 3rd party meta configuration -->
+ <include package="z3c.baseregistry" file="meta.zcml" />
+ <include package="z3c.form" file="meta.zcml" />
+ <include package="z3c.macro" file="meta.zcml" />
+ <include package="z3c.pagelet" file="meta.zcml" />
+ <include package="z3c.sampledata" file="meta.zcml" />
+ <include package="z3c.template" file="meta.zcml" />
+ <include package="z3c.zrtresource" file="meta.zcml" />
+
+
+ <!-- vocabulary setup, that's bad and weird, because this is meta configuration -->
+ <include package="zope.app.schema" />
+
+
+ <!-- bootstrap Database -->
+ <include package="zope.app.appsetup" />
+ <include package="zope.app.zopeappgenerations" />
+
+ <!-- zope server -->
+ <include package="zope.app.server" />
+ <include package="zope.app.twisted" />
+ <include package="zope.app.wsgi" />
+
+
+ <!-- zope packages -->
+ <include package="zope.annotation" />
+ <include package="zope.component" />
+ <include package="zope.contentprovider" />
+ <include package="zope.dublincore" />
+ <include package="zope.error" />
+ <include package="zope.location" />
+ <include package="zope.publisher" />
+ <include package="zope.securitypolicy" />
+ <include package="zope.session" />
+ <include package="zope.traversing" />
+ <include package="zope.traversing.browser" />
+
+
+ <!-- zope app package configuration -->
+ <include package="zope.app.authentication" />
+ <include package="zope.app.broken" />
+ <include package="zope.app.component" />
+ <include package="zope.app.container" />
+ <include package="zope.app.folder" />
+ <include package="zope.app.http" />
+ <include package="zope.app.intid" />
+ <include package="zope.app.keyreference" />
+ <include package="zope.app.principalannotation" />
+ <include package="zope.app.publication" />
+ <include package="zope.app.publisher" />
+ <include package="zope.app.publisher.browser" />
+ <include package="zope.app.security" />
+ <include package="zope.app.securitypolicy" />
+ <include package="zope.app.session" />
+
+
+ <!-- z3c component -->
+ <include package="z3c.breadcrumb" />
+ <include package="z3c.form" />
+ <include package="z3c.formui" />
+ <include package="z3c.layer.pagelet" />
+ <include package="z3c.layer.ready2go" />
+ <include package="z3c.menu.ready2go" />
+ <include package="z3c.macro" />
+ <include package="z3c.pagelet" />
+
+
+ <!-- zam configuration -->
+ <include package="zam.api" />
+ <include package="zam.skin" />
+ <include package="zamplugin.sitemanager" />
+
+
+ <browser:defaultSkin name="ZAM" />
+
+ <!-- default view points to TestPage -->
+ <browser:defaultView name="index.html" />
+
+
+ <!-- from zope.app.i18n move this to another package -->
+ <!-- Setup charset negotiation -->
+ <adapter
+ factory="zope.publisher.http.HTTPCharsets"
+ for="zope.publisher.interfaces.http.IHTTPRequest"
+ provides="zope.i18n.interfaces.IUserPreferredCharsets"
+ />
+
+ <!-- Setup charset negotiation --><!-- move this to another package -->
+ <adapter
+ factory="zope.app.publisher.browser.ModifiableBrowserLanguages"
+ for="zope.publisher.interfaces.http.IHTTPRequest"
+ provides="zope.i18n.interfaces.IModifiableUserPreferredLanguages"
+ />
+
+ <class class="zope.publisher.http.HTTPRequest">
+ <implements
+ interface="zope.annotation.interfaces.IAttributeAnnotatable"
+ />
+ </class>
+
+
+ <!-- load security policy -->
+ <include package="zope.securitypolicy" />
+
+ <securityPolicy
+ component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy"
+ />
+
+ <role id="zope.Anonymous"
+ title="Everybody"
+ description="All users have this role implicitly"
+ />
+ <role id="zope.Manager" title="Site Manager" />
+ <role id="zope.Member" title="Site Member" />
+
+ <grant permission="zope.View"
+ role="zope.Anonymous" />
+ <grant permission="zope.app.dublincore.view"
+ role="zope.Anonymous" />
+
+ <grantAll role="zope.Manager" />
+
+
+ <!-- setup principals -->
+ <unauthenticatedPrincipal
+ id="zope.anybody"
+ title="Unauthenticated User" />
+
+ <unauthenticatedGroup
+ id="zope.Anybody"
+ title="Unauthenticated Users"
+ />
+
+ <authenticatedGroup
+ id="zope.Authenticated"
+ title="Authenticated Users"
+ />
+
+ <everybodyGroup
+ id="zope.Everybody"
+ title="All Users"
+ />
+
+ <principal
+ id="zope.mgr"
+ title="Manager"
+ login="mgr"
+ password="mgrpw" />
+
+ <grant role="zope.Manager" principal="zope.mgr" />
+
+ <principal
+ id="zope.globalmgr"
+ title="Manager"
+ login="globalmgr"
+ password="globalmgrpw" />
+
+ <grant role="zope.Manager" principal="zope.globalmgr" />
+
+</configure>
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/menu.py
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/menu.py (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/menu.py 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,26 @@
+##############################################################################
+#
+# 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: __init__.py 97 2007-03-29 22:58:27Z rineichen $
+"""
+__docformat__ = "reStructuredText"
+
+from z3c.menu.ready2go import item
+
+
+class SiteManagerMenuItem(item.GlobalMenuItem):
+ """Site manager menu item."""
+
+ viewName = '++etc++site'
+ weight = 3
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/menu.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/menu.zcml
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/menu.zcml (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/menu.zcml 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,15 @@
+<configure
+ xmlns:zope="http://namespaces.zope.org/zope"
+ xmlns="http://namespaces.zope.org/browser"
+ i18n_domain="zam">
+
+ <viewlet
+ name="Site Manager"
+ for="*"
+ class=".menu.SiteManagerMenuItem"
+ manager="zam.api.menu.IGlobalMenu"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ permission="zope.ManageServices"
+ />
+
+</configure>
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/menu.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/plugin.py
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/plugin.py (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/plugin.py 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,38 @@
+##############################################################################
+#
+# 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: __init__.py 97 2007-03-29 22:58:27Z rineichen $
+"""
+__docformat__ = "reStructuredText"
+
+import zope.component
+
+from z3c.baseregistry import baseregistry
+
+from zam.api.i18n import MessageFactory as _
+from zam.api import plugin
+
+
+SiteManagerBaseRegistry = baseregistry.BaseComponents(
+ zope.component.globalSiteManager, 'zamplugin.sitemanager')
+
+
+class SiteManagerPlugin(plugin.BaseRegistryPlugin):
+ """ZAM sitemanager plugin."""
+
+ registry = SiteManagerBaseRegistry
+
+ title = _("Site management")
+
+ description = _("ZAM Site Manager.")
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/plugin.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/plugin.zcml
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/plugin.zcml (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/plugin.zcml 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,17 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ i18n_domain="zam">
+
+ <utility
+ component=".plugin.SiteManagerBaseRegistry"
+ provides="zope.component.interfaces.IComponents"
+ name="zamplugin.sitemanager"
+ />
+
+ <utility
+ factory=".plugin.SiteManagerPlugin"
+ provides="zam.api.interfaces.IPlugin"
+ name="zamplugin.sitemanager"
+ />
+
+</configure>
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/plugin.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/sitemanager.pt
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/sitemanager.pt (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/sitemanager.pt 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1 @@
+Sitemanager
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/sitemanager.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/tests.py
===================================================================
--- zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/tests.py (rev 0)
+++ zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/tests.py 2008-02-16 16:20:42 UTC (rev 83911)
@@ -0,0 +1,33 @@
+##############################################################################
+#
+# 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: __init__.py 97 2007-03-29 22:58:27Z rineichen $
+"""
+
+import unittest
+from zope.app.testing import functional
+
+functional.defineLayer('TestLayer', 'ftesting.zcml')
+
+
+def test_suite():
+ suite = unittest.TestSuite()
+ s = functional.FunctionalDocFileSuite('README.txt')
+ s.layer = TestLayer
+ suite.addTest(s)
+
+ return suite
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='test_suite')
Property changes on: zamplugin.sitemanager/trunk/src/zamplugin/sitemanager/tests.py
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the Checkins
mailing list