permission="administration") t = configuration.templates configuration.views = [ ViewConf(name="design", attr="design", renderer=t + "form.pt"), ViewConf(name="help", attr="help", renderer=t + "help.pt", permission="read"), ] configuration.widgets = [ WidgetConf(name=_(u"Design"), viewmapper="design", id="admin.design", sort=1500, apply=(IApplication, ), widgetType=IAdminWidgetConf, description=u""), WidgetConf(name=_(u"Help"), viewmapper="help", id="admin.help", sort=50000, apply=(IApplication, ), widgetType=IAdminWidgetConf, description=_(u"Help and documentation.")), ] class CMSAdminView(AdminBasics): def doc(self, template=u"default.pt"):
configuration.views = [ ViewConf(name="wfWidget", attr="widget", renderer="nive.cms.workflow:templates/widget.pt"), ViewConf(name="workflow", attr="workflow", renderer="nive.cms.workflow:templates/editorpage.pt"), ViewConf(name="action", attr="action"), ViewConf(name="pubr", attr="publishRecursive", permission="edit") ] configuration.widgets = [ WidgetConf(name=_("Workflow"), widgetType=IToolboxWidgetConf, apply=(IPage, ), viewmapper="wfWidget", id="cms.wf", sort=250), WidgetConf(name=_("Workflow"), widgetType=IEditorWidgetConf, apply=(IPage, ), viewmapper="workflow", id="editor.wf", sort=250) ] class WorkflowEdit(Editor): def widget(self): wf = self.context.GetWfInfo(self.User()) return {u"wf": wf}
templates = "nive.adminview:", permission = "administration" ) t = configuration.templates configuration.views = [ # User Management Views ViewConf(name = "admin", attr = "view", renderer = t+"root.pt"), ViewConf(name = "basics", attr = "editbasics", renderer = t+"form.pt"), #ViewConf(name = "portal", attr = "editportal", renderer = t+"form.pt"), ViewConf(name = "tools", attr = "tools", renderer = t+"tools.pt"), ViewConf(name = "modules", attr = "view", renderer = t+"modules.pt"), ViewConf(name = "views", attr = "view", renderer = t+"views.pt"), ] configuration.widgets = [ WidgetConf(name=_(u"Basics"), viewmapper="basics", id="admin.basics", sort=1000, apply=(IApplication,), widgetType=IAdminWidgetConf, description=u""), #WidgetConf(name=_(u"Global"), viewmapper="portal", id="admin.portal", sort=300, apply=(IApplication,), widgetType=IAdminWidgetConf), WidgetConf(name=_(u"Tools"), viewmapper="tools", id="admin.tools", sort=5000, apply=(IApplication,), widgetType=IAdminWidgetConf, description=u""), WidgetConf(name=_(u"Modules"), viewmapper="modules", id="admin.modules", sort=10000, apply=(IApplication,), widgetType=IAdminWidgetConf, description=_(u"Read only listing of all registered modules and settings.")), WidgetConf(name=_(u"Views"), viewmapper="views", id="admin.views", sort=15000, apply=(IApplication,), widgetType=IAdminWidgetConf, description=_(u"Read only listing of all registered views grouped by view modules.")), ] """ dbAdminConfiguration -------------------- managing database settings through the web interface makes sense if the values are stored outside the database.
permission="edit"), ViewConf(name="subpagesWidget", attr="tmpl", renderer=t + "widgets/widget_subpages.pt", context=IContainer), ViewConf(name="settingsWidget", attr="tmpl", renderer=t + "widgets/widget_settings.pt", context=IContainer) ] + sort.views + cutcopy.views # toolbox and editor widgets ---------------------------------------------------------------------------------- configuration.widgets = [ WidgetConf(name=_(u"Add new page"), widgetType=IToolboxWidgetConf, apply=(IContainer, ), viewmapper="addpageWidget", id="cms.addpage", sort=100), WidgetConf(name=_(u"Edit page"), widgetType=IToolboxWidgetConf, apply=(IContainer, ), viewmapper="editpageWidget", id="cms.editpage", sort=200), WidgetConf(name=_(u"Sub pages and parent"), widgetType=IToolboxWidgetConf, apply=(IContainer, ), viewmapper="subpagesWidget", id="cms.subpages", sort=300), WidgetConf(name=_(u"Settings"),
permission="edit"), ViewConf(name="@subpagesWidget", attr="tmpl", renderer=t + "widgets/widget_subpages.pt", context=IContainer), ViewConf(name="@settingsWidget", attr="tmpl", renderer=t + "widgets/widget_settings.pt", context=IContainer) ] + sort.views + cutcopy.views # toolbox and editor widgets ---------------------------------------------------------------------------------- configuration.widgets = [ WidgetConf(name=_(u"Add new page"), widgetType=IToolboxWidgetConf, apply=(IContainer, ), viewmapper="@addpageWidget", id="cms.addpage", sort=100), WidgetConf(name=_(u"Edit page"), widgetType=IToolboxWidgetConf, apply=(IPage, ), viewmapper="@editpageWidget", id="cms.editpage", sort=200), WidgetConf(name=_(u"Edit root"), widgetType=IToolboxWidgetConf, apply=(IRoot, ), viewmapper="@editrootWidget", id="cms.editroot", sort=200), WidgetConf(name=_(u"Sub pages and parent"),