First commit
authorThierry Florac <thierry.florac@onf.fr>
Thu, 19 Feb 2015 10:25:12 +0100
changeset 0 9131229e2982
child 1 3e9b0f7d068b
First commit
.hgignore
.installed.cfg
LICENSE
MANIFEST.in
bootstrap.py
buildout.cfg
docs/HISTORY.txt
docs/README.txt
setup.py
src/pyams_zmi.egg-info/PKG-INFO
src/pyams_zmi.egg-info/SOURCES.txt
src/pyams_zmi.egg-info/dependency_links.txt
src/pyams_zmi.egg-info/entry_points.txt
src/pyams_zmi.egg-info/namespace_packages.txt
src/pyams_zmi.egg-info/not-zip-safe
src/pyams_zmi.egg-info/requires.txt
src/pyams_zmi.egg-info/top_level.txt
src/pyams_zmi/__init__.py
src/pyams_zmi/admin.py
src/pyams_zmi/configure.zcml
src/pyams_zmi/control_panel.py
src/pyams_zmi/doctests/README.txt
src/pyams_zmi/form.py
src/pyams_zmi/interfaces/__init__.py
src/pyams_zmi/interfaces/menu.py
src/pyams_zmi/layer.py
src/pyams_zmi/locales/fr/LC_MESSAGES/pyams_zmi.mo
src/pyams_zmi/locales/fr/LC_MESSAGES/pyams_zmi.po
src/pyams_zmi/locales/pyams_zmi.pot
src/pyams_zmi/site.py
src/pyams_zmi/skin.py
src/pyams_zmi/templates/admin.pt
src/pyams_zmi/tests/__init__.py
src/pyams_zmi/tests/test_utilsdocs.py
src/pyams_zmi/tests/test_utilsdocstrings.py
src/pyams_zmi/view.py
src/pyams_zmi/viewlet/__init__.py
src/pyams_zmi/viewlet/menu/__init__.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,19 @@
+
+syntax: regexp
+^develop-eggs$
+syntax: regexp
+^parts$
+syntax: regexp
+^bin$
+syntax: regexp
+^\.installed\.cfg$
+syntax: regexp
+^\.settings$
+syntax: regexp
+^build$
+syntax: regexp
+^dist$
+syntax: regexp
+^\.idea$
+syntax: regexp
+.*\.pyc$
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.installed.cfg	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,71 @@
+[buildout]
+installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-zmi.egg-link
+parts = package i18n pyflakes test
+
+[package]
+__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/prequest
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pviews
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/ptweens
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pcreate
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/proutes
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pserve
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pdistreport
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pshell
+__buildout_signature__ = zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.5-py3.4.egg zc.buildout-2.3.1-py3.4.egg
+_b = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin
+_d = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs
+_e = /var/local/env/pyams/eggs
+bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin
+develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs
+eggs = pyams_zmi
+	pyramid
+	zope.component
+	zope.interface
+eggs-directory = /var/local/env/pyams/eggs
+recipe = zc.recipe.egg
+
+[i18n]
+__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pybabel
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pot-create
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/polint
+__buildout_signature__ = zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.5-py3.4.egg zc.buildout-2.3.1-py3.4.egg
+_b = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin
+_d = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs
+_e = /var/local/env/pyams/eggs
+bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin
+develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs
+eggs = babel
+	lingua
+eggs-directory = /var/local/env/pyams/eggs
+recipe = zc.recipe.egg
+
+[pyflakes]
+__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pyflakes
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pyflakes
+__buildout_signature__ = zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.5-py3.4.egg zc.buildout-2.3.1-py3.4.egg
+_b = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin
+_d = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs
+_e = /var/local/env/pyams/eggs
+bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin
+develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs
+eggs = pyflakes
+eggs-directory = /var/local/env/pyams/eggs
+entry-points = pyflakes=pyflakes.scripts.pyflakes:main
+initialization = if not sys.argv[1:]: sys.argv[1:] = ["src"]
+recipe = zc.recipe.egg
+scripts = pyflakes
+
+[test]
+__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/parts/test
+	/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/test
+__buildout_signature__ = zc.recipe.testrunner-2.0.0-py3.4.egg zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.5-py3.4.egg zope.testrunner-4.4.6-py3.4.egg zc.buildout-2.3.1-py3.4.egg zope.interface-4.1.2-py3.4-linux-x86_64.egg zope.exceptions-4.0.7-py3.4.egg six-1482e89f68d85eea27f4ed7749df2819
+_b = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin
+_d = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs
+_e = /var/local/env/pyams/eggs
+bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin
+develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs
+eggs = pyams_zmi [test]
+eggs-directory = /var/local/env/pyams/eggs
+location = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/parts/test
+recipe = zc.recipe.testrunner
+script = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/test
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LICENSE	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,42 @@
+Zope Public License (ZPL) Version 2.1
+=====================================
+
+A copyright notice accompanies this license document that identifies
+the copyright holders.
+
+This license has been certified as open source. It has also been designated
+as GPL compatible by the Free Software Foundation (FSF).
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions in source code must retain the accompanying copyright
+      notice, this list of conditions, and the following disclaimer.
+   2. Redistributions in binary form must reproduce the accompanying copyright
+      notice, this list of conditions, and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+   3. Names of the copyright holders must not be used to endorse or promote
+      products derived from this software without prior written permission
+      from the copyright holders.
+   4. The right to distribute this software or to use it for any purpose does
+      not give you the right to use Servicemarks (sm) or Trademarks (tm) of the
+      copyright holders. Use of them is covered by separate agreement with the
+      copyright holders.
+   5. If any files are modified, you must cause the modified files to carry
+      prominent notices stating that you changed the files and the date of any
+      change.
+
+
+Disclaimer
+==========
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MANIFEST.in	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,5 @@
+include *.txt
+recursive-include docs *
+recursive-include src *
+global-exclude *.pyc
+global-exclude *.*~
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bootstrap.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,178 @@
+##############################################################################
+#
+# 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.
+"""
+
+import os
+import shutil
+import sys
+import tempfile
+
+from optparse import OptionParser
+
+tmpeggs = tempfile.mkdtemp()
+
+usage = '''\
+[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
+
+Bootstraps a buildout-based project.
+
+Simply run this script in a directory containing a buildout.cfg, using the
+Python that you want bin/buildout to use.
+
+Note that by using --find-links to point to local resources, you can keep 
+this script from going over the network.
+'''
+
+parser = OptionParser(usage=usage)
+parser.add_option("-v", "--version", help="use a specific zc.buildout version")
+
+parser.add_option("-t", "--accept-buildout-test-releases",
+                  dest='accept_buildout_test_releases',
+                  action="store_true", default=False,
+                  help=("Normally, if you do not specify a --version, the "
+                        "bootstrap script and buildout gets the newest "
+                        "*final* versions of zc.buildout and its recipes and "
+                        "extensions for you.  If you use this flag, "
+                        "bootstrap and buildout will get the newest releases "
+                        "even if they are alphas or betas."))
+parser.add_option("-c", "--config-file",
+                  help=("Specify the path to the buildout configuration "
+                        "file to be used."))
+parser.add_option("-f", "--find-links",
+                  help=("Specify a URL to search for buildout releases"))
+parser.add_option("--allow-site-packages",
+                  action="store_true", default=False,
+                  help=("Let bootstrap.py use existing site packages"))
+
+
+options, args = parser.parse_args()
+
+######################################################################
+# load/install setuptools
+
+try:
+    if options.allow_site_packages:
+        import setuptools
+        import pkg_resources
+    from urllib.request import urlopen
+except ImportError:
+    from urllib2 import urlopen
+
+ez = {}
+exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez)
+
+if not options.allow_site_packages:
+    # ez_setup imports site, which adds site packages
+    # this will remove them from the path to ensure that incompatible versions 
+    # of setuptools are not in the path
+    import site
+    # inside a virtualenv, there is no 'getsitepackages'. 
+    # We can't remove these reliably
+    if hasattr(site, 'getsitepackages'):
+        for sitepackage_path in site.getsitepackages():
+            sys.path[:] = [x for x in sys.path if sitepackage_path not in x]
+
+setup_args = dict(to_dir=tmpeggs, download_delay=0)
+ez['use_setuptools'](**setup_args)
+import setuptools
+import pkg_resources
+
+# This does not (always?) update the default working set.  We will
+# do it.
+for path in sys.path:
+    if path not in pkg_resources.working_set.entries:
+        pkg_resources.working_set.add_entry(path)
+
+######################################################################
+# Install buildout
+
+ws = pkg_resources.working_set
+
+cmd = [sys.executable, '-c',
+       'from setuptools.command.easy_install import main; main()',
+       '-mZqNxd', tmpeggs]
+
+find_links = os.environ.get(
+    'bootstrap-testing-find-links',
+    options.find_links or
+    ('http://downloads.buildout.org/'
+     if options.accept_buildout_test_releases else None)
+    )
+if find_links:
+    cmd.extend(['-f', find_links])
+
+setuptools_path = ws.find(
+    pkg_resources.Requirement.parse('setuptools')).location
+
+requirement = 'zc.buildout'
+version = options.version
+if version is None and not options.accept_buildout_test_releases:
+    # Figure out the most recent final version of zc.buildout.
+    import setuptools.package_index
+    _final_parts = '*final-', '*final'
+
+    def _final_version(parsed_version):
+        for part in parsed_version:
+            if (part[:1] == '*') and (part not in _final_parts):
+                return False
+        return True
+    index = setuptools.package_index.PackageIndex(
+        search_path=[setuptools_path])
+    if find_links:
+        index.add_find_links((find_links,))
+    req = pkg_resources.Requirement.parse(requirement)
+    if index.obtain(req) is not None:
+        best = []
+        bestv = None
+        for dist in index[req.project_name]:
+            distv = dist.parsed_version
+            if _final_version(distv):
+                if bestv is None or distv > bestv:
+                    best = [dist]
+                    bestv = distv
+                elif distv == bestv:
+                    best.append(dist)
+        if best:
+            best.sort()
+            version = best[-1].version
+if version:
+    requirement = '=='.join((requirement, version))
+cmd.append(requirement)
+
+import subprocess
+if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0:
+    raise Exception(
+        "Failed to execute command:\n%s" % repr(cmd)[1:-1])
+
+######################################################################
+# Import and run buildout
+
+ws.add_entry(tmpeggs)
+ws.require(requirement)
+import zc.buildout.buildout
+
+if not [a for a in args if '=' not in a]:
+    args.append('bootstrap')
+
+# if -c was provided, we push it back into args for buildout' main function
+if options.config_file is not None:
+    args[0:0] = ['-c', options.config_file]
+
+zc.buildout.buildout.main(args)
+shutil.rmtree(tmpeggs)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildout.cfg	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,67 @@
+[buildout]
+eggs-directory = /var/local/env/pyams/eggs
+
+socket-timeout = 3
+show-picked-versions = true
+newest = false
+
+allow-hosts =
+    bitbucket.org
+    *.python.org
+    *.sourceforge.net
+    github.com
+
+#extends = http://download.ztfy.org/webapp/ztfy.webapp.dev.cfg
+versions = versions
+newest = false
+#allow-picked-versions = false
+
+src = src
+develop = .
+
+parts =
+    package
+    i18n
+    pyflakes
+    test
+
+[package]
+recipe = zc.recipe.egg
+eggs =
+    pyams_form
+    pyams_pagelet
+    pyams_skin
+    pyams_template
+    pyams_utils
+    pyams_viewlet
+    pyams_zmi
+    pyramid
+    z3c.form
+    z3c.table
+    zope.component
+    zope.interface
+
+[i18n]
+recipe = zc.recipe.egg
+eggs =
+    babel
+    lingua
+
+[pyflakes]
+recipe = zc.recipe.egg
+eggs = pyflakes
+scripts = pyflakes
+entry-points = pyflakes=pyflakes.scripts.pyflakes:main
+initialization = if not sys.argv[1:]: sys.argv[1:] = ["${buildout:src}"]
+
+[pyflakesrun]
+recipe = collective.recipe.cmd
+on_install = true
+cmds = ${buildout:develop}/bin/${pyflakes:scripts}
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = pyams_zmi [test]
+
+[versions]
+pyams_base = 0.1.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setup.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,75 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+"""
+This module contains pyams_zmi package
+"""
+import os
+from setuptools import setup, find_packages
+
+DOCS = os.path.join(os.path.dirname(__file__),
+                    'docs')
+
+README = os.path.join(DOCS, 'README.txt')
+HISTORY = os.path.join(DOCS, 'HISTORY.txt')
+
+version = '0.1.0'
+long_description = open(README).read() + '\n\n' + open(HISTORY).read()
+
+tests_require = []
+
+setup(name='pyams_zmi',
+      version=version,
+      description="PyAMS base management interface",
+      long_description=long_description,
+      classifiers=[
+          "License :: OSI Approved :: Zope Public License",
+          "Development Status :: 4 - Beta",
+          "Programming Language :: Python",
+          "Framework :: Pyramid",
+          "Topic :: Software Development :: Libraries :: Python Modules",
+      ],
+      keywords='Pyramid PyAMS ZMI',
+      author='Thierry Florac',
+      author_email='tflorac@ulthar.net',
+      url='http://hg.ztfy.org/pyams/pyams_zmi',
+      license='ZPL',
+      packages=find_packages('src'),
+      package_dir={'': 'src'},
+      namespace_packages=[],
+      include_package_data=True,
+      package_data={'': ['*.zcml', '*.txt', '*.pt', '*.pot', '*.po', '*.mo', '*.png', '*.gif', '*.jpeg', '*.jpg', '*.css', '*.js']},
+      zip_safe=False,
+      # uncomment this to be able to run tests with setup.py
+      test_suite="pyams_zmi.tests.test_utilsdocs.test_suite",
+      tests_require=tests_require,
+      extras_require=dict(test=tests_require),
+      install_requires=[
+          'setuptools',
+          # -*- Extra requirements: -*-
+          'pyams_form',
+          'pyams_pagelet',
+          'pyams_skin',
+          'pyams_template',
+          'pyams_utils',
+          'pyams_viewlet',
+          'pyams_zmi',
+          'pyramid',
+          'z3c.form',
+          'z3c.table',
+          'zope.component',
+          'zope.interface',
+      ],
+      entry_points="""
+      # -*- Entry points: -*-
+      """,
+      )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi.egg-info/PKG-INFO	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,18 @@
+Metadata-Version: 1.1
+Name: pyams-zmi
+Version: 0.1.0
+Summary: PyAMS base management interface
+Home-page: http://hg.ztfy.org/pyams/pyams_zmi
+Author: Thierry Florac
+Author-email: tflorac@ulthar.net
+License: ZPL
+Description: 
+        
+        
+Keywords: Pyramid PyAMS ZMI
+Platform: UNKNOWN
+Classifier: License :: OSI Approved :: Zope Public License
+Classifier: Development Status :: 4 - Beta
+Classifier: Programming Language :: Python
+Classifier: Framework :: Pyramid
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi.egg-info/SOURCES.txt	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,33 @@
+MANIFEST.in
+setup.py
+docs/HISTORY.txt
+docs/README.txt
+src/pyams_zmi/__init__.py
+src/pyams_zmi/admin.py
+src/pyams_zmi/configure.zcml
+src/pyams_zmi/control_panel.py
+src/pyams_zmi/form.py
+src/pyams_zmi/layer.py
+src/pyams_zmi/site.py
+src/pyams_zmi/skin.py
+src/pyams_zmi/view.py
+src/pyams_zmi.egg-info/PKG-INFO
+src/pyams_zmi.egg-info/SOURCES.txt
+src/pyams_zmi.egg-info/dependency_links.txt
+src/pyams_zmi.egg-info/entry_points.txt
+src/pyams_zmi.egg-info/namespace_packages.txt
+src/pyams_zmi.egg-info/not-zip-safe
+src/pyams_zmi.egg-info/requires.txt
+src/pyams_zmi.egg-info/top_level.txt
+src/pyams_zmi/doctests/README.txt
+src/pyams_zmi/interfaces/__init__.py
+src/pyams_zmi/interfaces/menu.py
+src/pyams_zmi/locales/pyams_zmi.pot
+src/pyams_zmi/locales/fr/LC_MESSAGES/pyams_zmi.mo
+src/pyams_zmi/locales/fr/LC_MESSAGES/pyams_zmi.po
+src/pyams_zmi/templates/admin.pt
+src/pyams_zmi/tests/__init__.py
+src/pyams_zmi/tests/test_utilsdocs.py
+src/pyams_zmi/tests/test_utilsdocstrings.py
+src/pyams_zmi/viewlet/__init__.py
+src/pyams_zmi/viewlet/menu/__init__.py
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi.egg-info/dependency_links.txt	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,1 @@
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi.egg-info/entry_points.txt	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,3 @@
+
+      # -*- Entry points: -*-
+      
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi.egg-info/namespace_packages.txt	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,1 @@
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi.egg-info/not-zip-safe	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,1 @@
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi.egg-info/requires.txt	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,15 @@
+setuptools
+pyams_form
+pyams_pagelet
+pyams_skin
+pyams_template
+pyams_utils
+pyams_viewlet
+pyams_zmi
+pyramid
+z3c.form
+z3c.table
+zope.component
+zope.interface
+
+[test]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi.egg-info/top_level.txt	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,1 @@
+pyams_zmi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/__init__.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+from pyramid.i18n import TranslationStringFactory
+_ = TranslationStringFactory('pyams_zmi')
+
+
+def includeme(config):
+    """Pyramid include"""
+
+    # add translations
+    config.add_translation_dirs('pyams_zmi:locales')
+
+    # load registry components
+    config.scan()
+
+    if hasattr(config, 'load_zcml'):
+        config.load_zcml('configure.zcml')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/admin.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_skin.layer import IPyAMSLayer
+from pyams_utils.interfaces.site import ISiteRoot
+from pyams_zmi.layer import IAdminLayer
+
+# import packages
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_template.template import template_config
+from pyams_zmi.view import AdminView
+
+
+@pagelet_config(name='admin.html', layer=IPyAMSLayer, context=ISiteRoot, permission='system.view')
+@template_config(template='templates/admin.pt', layer=IAdminLayer)
+class MainAdminPage(AdminView):
+    """Main administration page"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/configure.zcml	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,6 @@
+<configure
+	xmlns="http://pylonshq.com/pyramid">
+
+	<include package="pyramid_zcml" />
+
+</configure>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/control_panel.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,202 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_skin.interfaces import IInnerPage, IPageHeader, IContentHelp
+from pyams_skin.layer import IPyAMSLayer
+from pyams_zmi.interfaces.menu import IControlPanelMenu, IUtilitiesMenu
+from pyams_zmi.layer import IAdminLayer
+from z3c.table.interfaces import IValues, IColumn
+from zope.component.interfaces import ISite
+
+# import packages
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.container import ContainerView
+from pyams_skin.help import ContentHelp
+from pyams_skin.table import BaseTable
+from pyams_skin.viewlet.menu import MenuItem
+from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config
+from pyams_utils.text import text_to_html
+from pyams_viewlet.manager import viewletmanager_config
+from pyams_viewlet.viewlet import viewlet_config
+from pyams_zmi.view import AdminView
+from z3c.table.column import GetAttrColumn
+from zope.interface import implementer
+
+from pyams_zmi import _
+
+
+#
+# Utilities views and adapters
+#
+
+@viewlet_config(name='utilities.menu', layer=IAdminLayer, context=ISite, manager=IControlPanelMenu,
+                permission='system.view', weight=1)
+@viewletmanager_config(name='utilities.menu', layer=IAdminLayer, context=ISite, provides=IUtilitiesMenu)
+@implementer(IUtilitiesMenu)
+class UtilitiesMenuItem(MenuItem):
+    """Utilities menu"""
+
+    label = _("Utilities")
+    icon_class = 'fa fa-fw fa-codepen'
+    url = '#utilities.html'
+
+
+class UtilitiesTable(BaseTable):
+    """Utilities table"""
+
+    id = 'utilities_table'
+    title = _("Site utilities")
+    cssClasses = {'table': 'table table-bordered table-striped table-hover table-tight datatable'}
+
+
+@adapter_config(context=(ISite, IAdminLayer, UtilitiesTable), provides=IValues)
+class UtilitiesValuesAdapter(ContextRequestViewAdapter):
+    """Utilities values adapter"""
+
+    @property
+    def values(self):
+        return list(self.context.getSiteManager().values())
+
+
+@pagelet_config(name='utilities.html', context=ISite, layer=IPyAMSLayer, permission='system.view')
+@implementer(IInnerPage)
+class UtilitiesView(AdminView, ContainerView):
+    """Control panel view"""
+
+    table_class = UtilitiesTable
+
+    def __init__(self, context, request):
+        super(UtilitiesView, self).__init__(context, request)
+
+
+@adapter_config(context=(ISite, IAdminLayer, UtilitiesView), provides=IPageHeader)
+class UtilitiesHeaderAdapter(ContextRequestViewAdapter):
+    """Utilities header adapter"""
+
+    icon_class = 'fa fa-fw fa-codepen'
+    title = _("Control panel")
+    subtitle = _("Utilities")
+
+
+#
+# Registrations views and adapters
+#
+
+@viewlet_config(name='registrations.menu', layer=IAdminLayer, context=ISite, manager=IUtilitiesMenu,
+                permission='system.view', weight=1)
+class RegistrationsMenuItem(MenuItem):
+    """Registrations menu"""
+
+    label = _("Registrations")
+    url = '#registrations.html'
+
+
+class RegistrationsTable(BaseTable):
+    """Utilities registrations table"""
+
+    id = 'registrations_table'
+    title = _("Utilities registrations")
+
+    data_attributes = {}
+
+
+@adapter_config(context=(ISite, IAdminLayer, RegistrationsTable), provides=IValues)
+class RegistrationsValuesAdapter(ContextRequestViewAdapter):
+    """Utilities values adapter"""
+
+    @property
+    def values(self):
+        return list(self.context.getSiteManager().registeredUtilities())
+
+
+@adapter_config(name='component', context=(ISite, IAdminLayer, RegistrationsTable), provides=IColumn)
+class RegistrationsComponentColumn(GetAttrColumn):
+    """Registrations component column"""
+
+    _header = _("Component")
+    weight = 1
+
+    @property
+    def header(self):
+        return self.request.localizer.translate(self._header)
+
+    def getValue(self, obj):
+        return obj.component.__name__
+
+
+@adapter_config(name='interface', context=(ISite, IAdminLayer, RegistrationsTable), provides=IColumn)
+class RegistrationsInterfaceColumn(GetAttrColumn):
+    """Registrations interface column"""
+
+    _header = _("Registered interface")
+    weight = 5
+
+    @property
+    def header(self):
+        return self.request.localizer.translate(self._header)
+
+    def getValue(self, obj):
+        return text_to_html(str(obj.provided))
+
+
+@adapter_config(name='name', context=(ISite, IAdminLayer, RegistrationsTable), provides=IColumn)
+class RegistrationsNameColumn(GetAttrColumn):
+    """Registrations name column"""
+
+    _header = _("Name")
+    weight = 10
+
+    @property
+    def header(self):
+        return self.request.localizer.translate(self._header)
+
+    def getValue(self, obj):
+        return obj.name or _('< no name >')
+
+
+@pagelet_config(name='registrations.html', context=ISite, layer=IPyAMSLayer, permission='system.view')
+@implementer(IInnerPage)
+class RegistrationsView(AdminView, ContainerView):
+    """Registrations view"""
+
+    table_class = RegistrationsTable
+
+    def __init__(self, context, request):
+        super(RegistrationsView, self).__init__(context, request)
+
+
+@adapter_config(context=(ISite, IAdminLayer, RegistrationsView), provides=IPageHeader)
+class RegistrationsHeaderAdapter(ContextRequestViewAdapter):
+    """Registrations header adapter"""
+
+    icon_class = 'fa fa-fw fa-codepen'
+    title = _("Control panel")
+    subtitle = _("Local utilities registry")
+
+
+@adapter_config(context=(ISite, IAdminLayer, RegistrationsView), provides=IContentHelp)
+class RegistrationsHelpAdapter(ContentHelp):
+    """Registrations help adapter"""
+
+    header = _("Local registry utilities")
+    message = _("""A local registry is a registry defining utilities stored into
+site's Object Database (ZODB).
+
+You can manage these utilities and modify their properties and site's behaviour without
+modifying the application.""")
+    message_format = 'rest'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/doctests/README.txt	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,3 @@
+=================
+pyams_zmi package
+=================
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/form.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,71 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_pagelet.interfaces import PageletCreatedEvent
+
+# import packages
+from pyams_form.form import AddForm, DialogAddForm, EditForm, DialogEditForm, DisplayForm, DialogDisplayForm
+from pyams_zmi.view import AdminView
+
+
+class AdminAddForm(AdminView, AddForm):
+    """Admin add form"""
+
+    def update(self):
+        self.request.registry.notify(PageletCreatedEvent(self))
+        super(AdminAddForm, self).update()
+
+
+class AdminDialogAddForm(AdminView, DialogAddForm):
+    """Admin dialog add form"""
+
+    def update(self):
+        self.request.registry.notify(PageletCreatedEvent(self))
+        super(AdminDialogAddForm, self).update()
+
+
+class AdminEditForm(AdminView, EditForm):
+    """Admin edit form"""
+
+    def update(self):
+        self.request.registry.notify(PageletCreatedEvent(self))
+        super(AdminEditForm, self).update()
+
+
+class AdminDialogEditForm(AdminView, DialogEditForm):
+    """Admin dialog edit form"""
+
+    def update(self):
+        self.request.registry.notify(PageletCreatedEvent(self))
+        super(AdminDialogEditForm, self).update()
+
+
+class AdminDisplayForm(AdminView, DisplayForm):
+    """Admin dialog display form"""
+
+    def update(self):
+        self.request.registry.notify(PageletCreatedEvent(self))
+        super(AdminDisplayForm, self).update()
+
+
+class AdminDialogDisplayForm(AdminView, DialogDisplayForm):
+    """Admin dialog display form"""
+
+    def update(self):
+        self.request.registry.notify(PageletCreatedEvent(self))
+        super(AdminDialogDisplayForm, self).update()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/interfaces/__init__.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+# import standard library
+
+# import interfaces
+from zope.interface import Interface
+
+# import packages
+
+
+class IAdminView(Interface):
+    """Marker interface for administration views"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/interfaces/menu.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_skin.interfaces.viewlet import IMenu, IMenuItem
+
+# import packages
+
+
+class ISiteManagementMenu(IMenu):
+    """Site management menu"""
+
+
+class IPropertiesMenu(IMenuItem):
+    """Properties menu"""
+
+
+class IControlPanelMenu(IMenu):
+    """Control panel menu"""
+
+
+class IUtilitiesMenu(IMenuItem):
+    """Utilities menu"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/layer.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_form.interfaces.form import IFormLayer
+from pyams_skin.layer import IPyAMSLayer
+
+# import packages
+
+
+class IAdminLayer(IPyAMSLayer, IFormLayer):
+    """PyAMS administration layer"""
Binary file src/pyams_zmi/locales/fr/LC_MESSAGES/pyams_zmi.mo has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/locales/fr/LC_MESSAGES/pyams_zmi.po	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,101 @@
+#
+# French translations for PACKAGE package
+# This file is distributed under the same license as the PACKAGE package.
+# Thierry Florac <tflorac@ulthar.net>, 2015.
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE 1.0\n"
+"POT-Creation-Date: 2015-02-04 11:00+0100\n"
+"PO-Revision-Date: 2015-02-04 09:50+0100\n"
+"Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
+"Language-Team: French <traduc@traduc.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Lingua 3.8\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: src/pyams_zmi/skin.py:32
+msgid "PyAMS management skin"
+msgstr "Skin d'administration PyAMS"
+
+#: src/pyams_zmi/control_panel.py:54 src/pyams_zmi/control_panel.py:94
+msgid "Utilities"
+msgstr "Utilitaires"
+
+#: src/pyams_zmi/control_panel.py:63
+msgid "Site utilities"
+msgstr "Utilitaires du site"
+
+#: src/pyams_zmi/control_panel.py:93 src/pyams_zmi/control_panel.py:193
+#: src/pyams_zmi/viewlet/menu/__init__.py:47
+msgid "Control panel"
+msgstr "Panneau de configuration"
+
+#: src/pyams_zmi/control_panel.py:105
+msgid "Registrations"
+msgstr "Inscriptions dans le registre"
+
+#: src/pyams_zmi/control_panel.py:113
+msgid "Utilities registrations"
+msgstr "Utilitaires inscrits dans le registre local"
+
+#: src/pyams_zmi/control_panel.py:133
+msgid "Component"
+msgstr "Composant"
+
+#: src/pyams_zmi/control_panel.py:149
+msgid "Registered interface"
+msgstr "Interface enregistrée"
+
+#: src/pyams_zmi/control_panel.py:165
+msgid "Name"
+msgstr "Nom"
+
+#: src/pyams_zmi/control_panel.py:194
+msgid "Local utilities registry"
+msgstr "Registre local des composants"
+
+#: src/pyams_zmi/control_panel.py:202
+msgid "Local registry utilities"
+msgstr "Le registre local des composants"
+
+#: src/pyams_zmi/control_panel.py:203
+msgid ""
+"A local registry is a registry defining utilities stored into\n"
+"site's Object Database (ZODB).\n"
+"\n"
+"You can manage these utilities and modify their properties and site's "
+"behaviour without\n"
+"modifying the application."
+msgstr ""
+"Un registre local est une liste de composants stockés dans la base "
+"de données du site (ZODB).\n"
+"\n"
+"Chaque composant peut être inscrit une ou plusieurs fois pour fournir une "
+"ou plusieurs interfaces. Un composant présent dans la liste des utilitaires "
+"mais non inscrit dans le registre est le plus souvent inutilisé !\n"
+"\n"
+"Vous pouvez gérer ces composants et modifier leurs propriétés pour changer "
+"le comportement du site sans modifier l'application."
+
+#: src/pyams_zmi/control_panel.py:173
+msgid "< no name >"
+msgstr "< pas de nom >"
+
+#: src/pyams_zmi/site.py:49
+msgid "Properties"
+msgstr "Propriétés"
+
+#: src/pyams_zmi/site.py:59
+msgid "Update main site properties"
+msgstr "Mise à jour des propriétés de base du site"
+
+#: src/pyams_zmi/site.py:82 src/pyams_zmi/viewlet/menu/__init__.py:38
+msgid "Site management"
+msgstr "Gérer le site"
+
+#: src/pyams_zmi/site.py:83
+msgid "Site properties"
+msgstr "Propriétés"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/locales/pyams_zmi.pot	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,91 @@
+# 
+# SOME DESCRIPTIVE TITLE
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE 1.0\n"
+"POT-Creation-Date: 2015-02-04 11:00+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Lingua 3.8\n"
+
+#: ./src/pyams_zmi/skin.py:32
+msgid "PyAMS management skin"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:54 ./src/pyams_zmi/control_panel.py:94
+msgid "Utilities"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:63
+msgid "Site utilities"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:93 ./src/pyams_zmi/control_panel.py:193
+#: ./src/pyams_zmi/viewlet/menu/__init__.py:47
+msgid "Control panel"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:105
+msgid "Registrations"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:113
+msgid "Utilities registrations"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:133
+msgid "Component"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:149
+msgid "Registered interface"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:165
+msgid "Name"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:194
+msgid "Local utilities registry"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:202
+msgid "Local registry utilities"
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:203
+msgid ""
+"A local registry is a registry defining utilities stored into\n"
+"site's Object Database (ZODB).\n"
+"\n"
+"You can manage these utilities and modify their properties and site's behaviour without\n"
+"modifying the application."
+msgstr ""
+
+#: ./src/pyams_zmi/control_panel.py:173
+msgid "< no name >"
+msgstr ""
+
+#: ./src/pyams_zmi/site.py:49
+msgid "Properties"
+msgstr ""
+
+#: ./src/pyams_zmi/site.py:59
+msgid "Update main site properties"
+msgstr ""
+
+#: ./src/pyams_zmi/site.py:82 ./src/pyams_zmi/viewlet/menu/__init__.py:38
+msgid "Site management"
+msgstr ""
+
+#: ./src/pyams_zmi/site.py:83
+msgid "Site properties"
+msgstr ""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/site.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,104 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_form.interfaces.form import IWidgetForm
+from pyams_pagelet.interfaces import PageletCreatedEvent
+from pyams_skin.interfaces import IInnerPage, IPageHeader
+from pyams_skin.interfaces.configuration import IConfiguration
+from pyams_skin.layer import IPyAMSLayer
+from pyams_utils.interfaces.site import ISiteRoot
+from pyams_zmi.interfaces.menu import ISiteManagementMenu, IPropertiesMenu
+from pyams_zmi.layer import IAdminLayer
+
+# import packages
+from pyams_form.form import EditForm, AJAXEditForm
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.viewlet.menu import MenuItem
+from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config
+from pyams_viewlet.manager import viewletmanager_config
+from pyams_viewlet.viewlet import viewlet_config
+from pyams_zmi.view import AdminView
+from pyramid.decorator import reify
+from pyramid.view import view_config
+from z3c.form import field
+from zope.interface import implementer, implementedBy, Interface
+
+from pyams_zmi import _
+
+
+@viewlet_config(name='properties.menu', layer=IAdminLayer, context=ISiteRoot, manager=ISiteManagementMenu,
+                permission='system.view', weight=1)
+@viewletmanager_config(name='properties.menu', layer=IAdminLayer, context=ISiteRoot, provides=IPropertiesMenu)
+class PropertiesMenuItem(MenuItem):
+    """Properties menu"""
+
+    label = _("Properties")
+    icon_class = 'fa fa-fw fa-twitch'
+    url = '#properties.html'
+
+
+@pagelet_config(name='properties.html', context=ISiteRoot, layer=IPyAMSLayer, permission='system.view')
+@implementer(IWidgetForm, IInnerPage)
+class PropertiesEditForm(AdminView, EditForm):
+    """Properties edit form"""
+
+    legend = _("Update main site properties")
+    ajax_handler = 'edit_properties.json'
+    edit_permission = 'system.manage'
+
+    @reify
+    def fields(self):
+
+        def get_configuration_interface(context):
+            for interface in implementedBy(context.__class__).interfaces():
+                if issubclass(interface, IConfiguration):
+                    return interface
+
+        content = self.getContent()
+        return field.Fields(get_configuration_interface(content)).omit('__name__')
+
+    def update(self):
+        self.request.registry.notify(PageletCreatedEvent(self))
+        super(PropertiesEditForm, self).update()
+
+    def getContent(self):
+        return IConfiguration(self.context)
+
+
+@view_config(name='edit_properties.json', context=ISiteRoot, request_type=IPyAMSLayer,
+             permission='system.manage', renderer='json', xhr=True)
+class PropertiesAJAXEditForm(AJAXEditForm, PropertiesEditForm):
+    """Properties edit form, AJAX renderer"""
+
+    def get_ajax_output(self, changes):
+        if changes:
+            return {'status': 'reload',
+                    'location': '#properties.html',
+                    'smallbox': self.request.localizer.translate(self.successMessage),
+                    'smallbox_status': 'success'}
+        else:
+            return AJAXEditForm.get_ajax_output(self, changes)
+
+
+@adapter_config(context=(Interface, IPyAMSLayer, PropertiesEditForm), provides=IPageHeader)
+class PropertiesEditFormHeaderAdapter(ContextRequestViewAdapter):
+    """Utilities header adapter"""
+
+    icon_class = 'fa fa-fw fa-twitch'
+    title = _("Site management")
+    subtitle = _("Site properties")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/skin.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,33 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_skin.interfaces import ISkin
+from pyams_zmi.layer import IAdminLayer
+
+# import packages
+from pyams_utils.registry import utility_config
+
+from pyams_skin import _
+
+
+@utility_config(name='PyAMS admin skin', provides=ISkin)
+class AdminSkin(object):
+    """PyAMS administration skin"""
+
+    label = _("PyAMS management skin")
+    layer = IAdminLayer
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/templates/admin.pt	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,3 @@
+<div class="margin-20 padding-20 text-align-center">
+	<i class="fa fa-4x fa-cog fa-spin"></i>
+</div>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/tests/__init__.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,1 @@
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/tests/test_utilsdocs.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,59 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+"""
+Generic Test case for pyams_zmi doctest
+"""
+__docformat__ = 'restructuredtext'
+
+import unittest
+import doctest
+import sys
+import os
+
+
+current_dir = os.path.dirname(__file__)
+
+def doc_suite(test_dir, setUp=None, tearDown=None, globs=None):
+    """Returns a test suite, based on doctests found in /doctest."""
+    suite = []
+    if globs is None:
+        globs = globals()
+
+    flags = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE |
+             doctest.REPORT_ONLY_FIRST_FAILURE)
+
+    package_dir = os.path.split(test_dir)[0]
+    if package_dir not in sys.path:
+        sys.path.append(package_dir)
+
+    doctest_dir = os.path.join(package_dir, 'doctests')
+
+    # filtering files on extension
+    docs = [os.path.join(doctest_dir, doc) for doc in
+            os.listdir(doctest_dir) if doc.endswith('.txt')]
+
+    for test in docs:
+        suite.append(doctest.DocFileSuite(test, optionflags=flags,
+                                          globs=globs, setUp=setUp,
+                                          tearDown=tearDown,
+                                          module_relative=False))
+
+    return unittest.TestSuite(suite)
+
+def test_suite():
+    """returns the test suite"""
+    return doc_suite(current_dir)
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/tests/test_utilsdocstrings.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,62 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+"""
+Generic Test case for pyams_zmi doc strings
+"""
+__docformat__ = 'restructuredtext'
+
+import unittest
+import doctest
+import sys
+import os
+
+
+current_dir = os.path.abspath(os.path.dirname(__file__))
+
+def doc_suite(test_dir, globs=None):
+    """Returns a test suite, based on doc tests strings found in /*.py"""
+    suite = []
+    if globs is None:
+        globs = globals()
+
+    flags = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE |
+             doctest.REPORT_ONLY_FIRST_FAILURE)
+
+    package_dir = os.path.split(test_dir)[0]
+    if package_dir not in sys.path:
+        sys.path.append(package_dir)
+
+    # filtering files on extension
+    docs = [doc for doc in
+            os.listdir(package_dir) if doc.endswith('.py')]
+    docs = [doc for doc in docs if not doc.startswith('__')]
+
+    for test in docs:
+        fd = open(os.path.join(package_dir, test))
+        content = fd.read()
+        fd.close()
+        if '>>> ' not in content:
+            continue
+        test = test.replace('.py', '')
+        location = 'pyams_zmi.%s' % test
+        suite.append(doctest.DocTestSuite(location, optionflags=flags,
+                                          globs=globs))
+
+    return unittest.TestSuite(suite)
+
+def test_suite():
+    """returns the test suite"""
+    return doc_suite(current_dir)
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/view.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+# import standard library
+
+# import interfaces
+from pyams_pagelet.interfaces import IPageletCreatedEvent
+from pyams_zmi.interfaces import IAdminView
+
+# import packages
+from pyams_skin.skin import apply_skin
+from pyramid.events import subscriber
+from zope.interface import implementer
+
+
+@implementer(IAdminView)
+class AdminView(object):
+    """Base admin view"""
+
+
+@subscriber(IPageletCreatedEvent, context_selector=IAdminView)
+def handle_admin_view(event):
+    """Set admin skin for admin pages"""
+    apply_skin(event.object.request, 'PyAMS admin skin')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/viewlet/__init__.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+
+# import packages
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_zmi/viewlet/menu/__init__.py	Thu Feb 19 10:25:12 2015 +0100
@@ -0,0 +1,49 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_skin.interfaces.viewlet import IMainMenusViewletManager
+from pyams_zmi.interfaces.menu import ISiteManagementMenu, IControlPanelMenu
+from pyams_zmi.layer import IAdminLayer
+
+# import packages
+from pyams_skin.viewlet.menu import Menu
+from pyams_viewlet.manager import viewletmanager_config
+from pyams_viewlet.viewlet import viewlet_config
+from zope.interface import implementer
+
+from pyams_zmi import _
+
+
+@viewlet_config(name='manage.menu', layer=IAdminLayer, manager=IMainMenusViewletManager,
+                permission='manage', weight=1)
+@viewletmanager_config(name='manage.menu', layer=IAdminLayer, provides=ISiteManagementMenu)
+@implementer(ISiteManagementMenu)
+class SiteManagementMenu(Menu):
+    """Site management menu"""
+
+    header = _("Site management")
+
+
+@viewlet_config(name='control-panel.menu', layer=IAdminLayer, manager=IMainMenusViewletManager,
+                permission='system.view', weight=9999)
+@viewletmanager_config(name='control-panel.menu', layer=IAdminLayer, provides=IControlPanelMenu)
+@implementer(IControlPanelMenu)
+class ControlPanelMenu(Menu):
+    """Control panel menu"""
+
+    header = _("Control panel")