--- a/.installed.cfg Wed May 20 12:47:45 2015 +0200
+++ b/.installed.cfg Wed Jun 17 10:02:24 2015 +0200
@@ -1,24 +1,42 @@
[buildout]
-installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-zmi.egg-link
+installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-file.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-template.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-skin.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-pagelet.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-viewlet.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-i18n.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-zmi.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-catalog.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-form.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/develop-eggs/pyams-utils.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
+__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pyams_upgrade
/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pcreate
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pserve
/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/ptweens
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/prequest
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pshell
/home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pdistreport
- /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pshell
+ /home/tflorac/Dropbox/src/PyAMS/pyams_zmi/bin/pviews
__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
+eggs = pyams_form
+ pyams_pagelet
+ pyams_skin
+ pyams_template
+ pyams_utils
+ pyams_viewlet
+ pyams_zmi
pyramid
+ z3c.form
+ z3c.table
zope.component
zope.interface
eggs-directory = /var/local/env/pyams/eggs
@@ -58,7 +76,7 @@
[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
+__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-e6b62e54b4df360c40dfcbb76c1ecf1a
_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
--- a/buildout.cfg Wed May 20 12:47:45 2015 +0200
+++ b/buildout.cfg Wed Jun 17 10:02:24 2015 +0200
@@ -17,7 +17,17 @@
#allow-picked-versions = false
src = src
-develop = .
+develop =
+ .
+ ../pyams_catalog
+ ../pyams_file
+ ../pyams_form
+ ../pyams_i18n
+ ../pyams_pagelet
+ ../pyams_skin
+ ../pyams_template
+ ../pyams_utils
+ ../pyams_viewlet
parts =
package
--- a/src/pyams_zmi.egg-info/SOURCES.txt Wed May 20 12:47:45 2015 +0200
+++ b/src/pyams_zmi.egg-info/SOURCES.txt Wed Jun 17 10:02:24 2015 +0200
@@ -4,7 +4,6 @@
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
--- a/src/pyams_zmi/control_panel.py Wed May 20 12:47:45 2015 +0200
+++ b/src/pyams_zmi/control_panel.py Wed Jun 17 10:02:24 2015 +0200
@@ -30,6 +30,7 @@
from pyams_pagelet.pagelet import pagelet_config
from pyams_skin.container import ContainerView
from pyams_skin.help import ContentHelp
+from pyams_skin.page import DefaultPageHeaderAdapter
from pyams_skin.table import BaseTable, TrashColumn
from pyams_skin.viewlet.menu import MenuItem
from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config
@@ -109,12 +110,11 @@
@adapter_config(context=(ISite, IAdminLayer, UtilitiesView), provides=IPageHeader)
-class UtilitiesHeaderAdapter(ContextRequestViewAdapter):
+class UtilitiesHeaderAdapter(DefaultPageHeaderAdapter):
"""Utilities header adapter"""
icon_class = 'fa fa-fw fa-codepen'
title = _("Control panel")
- subtitle = _("Utilities")
@view_config(name='delete-utility.json', context=ISite, request_type=IPyAMSLayer,
@@ -240,12 +240,11 @@
@adapter_config(context=(ISite, IAdminLayer, LocalRegistrationsView), provides=IPageHeader)
-class LocalRegistrationsHeaderAdapter(ContextRequestViewAdapter):
+class LocalRegistrationsHeaderAdapter(DefaultPageHeaderAdapter):
"""Local registrations header adapter"""
icon_class = 'fa fa-fw fa-codepen'
title = _("Control panel")
- subtitle = _("Local utilities registry")
@adapter_config(context=(ISite, IAdminLayer, LocalRegistrationsView), provides=IContentHelp)
@@ -305,12 +304,11 @@
@adapter_config(context=(ISite, IAdminLayer, GlobalRegistrationsView), provides=IPageHeader)
-class GlobalRegistrationsHeaderAdapter(ContextRequestViewAdapter):
+class GlobalRegistrationsHeaderAdapter(DefaultPageHeaderAdapter):
"""Global registrations header adapter"""
icon_class = 'fa fa-fw fa-codepen'
title = _("Control panel")
- subtitle = _("Global utilities registry")
@adapter_config(context=(ISite, IAdminLayer, GlobalRegistrationsView), provides=IContentHelp)
--- a/src/pyams_zmi/interfaces/menu.py Wed May 20 12:47:45 2015 +0200
+++ b/src/pyams_zmi/interfaces/menu.py Wed Jun 17 10:02:24 2015 +0200
@@ -21,6 +21,10 @@
# import packages
+class IContentManagementMenu(IMenu):
+ """Content management menu"""
+
+
class ISiteManagementMenu(IMenu):
"""Site management menu"""
--- a/src/pyams_zmi/site.py Wed May 20 12:47:45 2015 +0200
+++ b/src/pyams_zmi/site.py Wed Jun 17 10:02:24 2015 +0200
@@ -27,8 +27,9 @@
# import packages
from pyams_form.form import AJAXEditForm
from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.page import DefaultPageHeaderAdapter
from pyams_skin.viewlet.menu import MenuItem
-from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config
+from pyams_utils.adapter import adapter_config
from pyams_viewlet.manager import viewletmanager_config
from pyams_viewlet.viewlet import viewlet_config
from pyams_zmi.form import AdminEditForm
@@ -92,9 +93,12 @@
@adapter_config(context=(Interface, IPyAMSLayer, PropertiesEditForm), provides=IPageHeader)
-class PropertiesEditFormHeaderAdapter(ContextRequestViewAdapter):
+class PropertiesEditFormHeaderAdapter(DefaultPageHeaderAdapter):
"""Utilities header adapter"""
+ @property
+ def title(self):
+ config = IConfiguration(self.context)
+ return config.title
+
icon_class = 'fa fa-fw fa-twitch'
- title = _("Site management")
- subtitle = _("Site properties")
--- a/src/pyams_zmi/viewlet/menu/__init__.py Wed May 20 12:47:45 2015 +0200
+++ b/src/pyams_zmi/viewlet/menu/__init__.py Wed Jun 17 10:02:24 2015 +0200
@@ -17,7 +17,7 @@
# import interfaces
from pyams_skin.interfaces.viewlet import IMainMenusViewletManager
-from pyams_zmi.interfaces.menu import ISiteManagementMenu, IControlPanelMenu
+from pyams_zmi.interfaces.menu import ISiteManagementMenu, IControlPanelMenu, IContentManagementMenu
from pyams_zmi.layer import IAdminLayer
# import packages
@@ -29,8 +29,18 @@
from pyams_zmi import _
+@viewlet_config(name='content.menu', layer=IAdminLayer, manager=IMainMenusViewletManager,
+ permission='system.view', weight=1)
+@viewletmanager_config(name='content.menu', layer=IAdminLayer, provides=IContentManagementMenu)
+@implementer(IContentManagementMenu)
+class ContentManagementMenu(Menu):
+ """Content management menu"""
+
+ header = _("Content management")
+
+
@viewlet_config(name='manage.menu', layer=IAdminLayer, manager=IMainMenusViewletManager,
- permission='system.view', weight=1)
+ permission='system.view', weight=100)
@viewletmanager_config(name='manage.menu', layer=IAdminLayer, provides=ISiteManagementMenu)
@implementer(ISiteManagementMenu)
class SiteManagementMenu(Menu):