Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IOSHAContentSkinLayer registration #244

Open
wants to merge 20 commits into
base: quaive-app
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/osha/oira/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@

<include package="pas.plugins.ldap" />
<include package="euphorie.deployment" />
<include package="plone.restapi" />
<include package=".client" />
<include package=".content" />
<include package=".tiles" />
<include package=".nuplone" />
<include package=".ploneintranet" />
<include package=".upgrade" />
<include package=".statistics" />

Expand All @@ -54,12 +56,6 @@
name="osha.oira.countries"
/>

<interface
interface=".interfaces.IOSHAContentSkinLayer"
type="zope.publisher.interfaces.browser.IBrowserSkinType"
name="OiRA"
/>

<browser:page
name="outdated-tools-view"
for="Products.CMFCore.interfaces.ISiteRoot"
Expand Down
8 changes: 0 additions & 8 deletions src/osha/oira/content/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@
/>

<!-- SurveyGroup -->
<adapter
for="Products.CMFCore.interfaces.IFolderish
osha.oira.interfaces.IOSHAContentSkinLayer
plone.dexterity.interfaces.IDexterityFTI"
provides="zope.publisher.interfaces.browser.IBrowserPage"
factory=".surveygroup.AddView"
name="euphorie.surveygroup"/>

<configure package="plonetheme.nuplone.skin">
<browser:page
name="delete"
Expand Down
10 changes: 0 additions & 10 deletions src/osha/oira/content/browser/surveygroup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
from Acquisition import aq_parent
from euphorie.content import MessageFactory as _
from euphorie.content.browser import surveygroup
from plone import api
from plonetheme.nuplone.skin import actions
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile


class AddForm(surveygroup.AddForm):
template = ViewPageTemplateFile("templates/surveygroup_add.pt")


class AddView(surveygroup.AddView):
form = AddForm


class Delete(actions.Delete):
Expand Down
108 changes: 0 additions & 108 deletions src/osha/oira/content/browser/templates/surveygroup_add.pt

This file was deleted.

10 changes: 9 additions & 1 deletion src/osha/oira/content/country.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from euphorie.content import MessageFactory as _
from htmllaundry.z3cform import HtmlText
from plone.autoform import directives
from plone.autoform.interfaces import IFormFieldProvider
from plone.supermodel import model
Expand All @@ -9,6 +8,15 @@
from zope.interface import Invalid
from zope.interface import invariant

try:
# This needs a merge of https://github.com/euphorie/Euphorie/pull/739
from euphorie.htmllaundry.z3cform import HtmlText
except ImportError:
# BBB This may not work with lxml 5.2+ (Plone 6.0.11+).
# On those versions it needs a merge and release of this PR:
# https://github.com/syslabcom/htmllaundry/pull/2
from htmllaundry.z3cform import HtmlText


class IOSHACountry(model.Schema):
"""Additional fields for the OSHA countries."""
Expand Down
4 changes: 2 additions & 2 deletions src/osha/oira/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from euphorie.content.interfaces import IEuphorieContentLayer
from osha.oira.nuplone.interfaces import IOiRAFormLayer
from plonetheme.nuplone.skin.interfaces import NuPloneSkin
from zope.interface import Interface


Expand All @@ -8,5 +8,5 @@ class IProductLayer(Interface):
installed."""


class IOSHAContentSkinLayer(IOiRAFormLayer, NuPloneSkin):
class IOSHAContentSkinLayer(IOiRAFormLayer, IEuphorieContentLayer):
"""Marker interface for the CMS/Content editing skin."""
Empty file.
138 changes: 138 additions & 0 deletions src/osha/oira/ploneintranet/configure.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="euphorie"
>

<include package=".z3cform" />

<browser:page
name="quaive-edit"
for="euphorie.content.country.ICountry"
class=".quaive_edit.CountryQuaiveEditForm"
template="templates/quaive-edit.pt"
permission="cmf.ModifyPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-edit"
for="euphorie.content.module.IModule"
class=".quaive_edit.ModuleQuaiveEditForm"
template="templates/quaive-edit.pt"
permission="cmf.ModifyPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-edit"
for="euphorie.content.profilequestion.IProfileQuestion"
class=".quaive_edit.ProfileQuestionQuaiveEditForm"
template="templates/quaive-edit.pt"
permission="cmf.ModifyPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-edit"
for="euphorie.content.risk.IRisk"
class=".quaive_edit.RiskQuaiveEditForm"
template="templates/quaive-edit.pt"
permission="cmf.ModifyPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-edit"
for="euphorie.content.sector.ISector"
class=".quaive_edit.SectorQuaiveEditForm"
template="templates/quaive-edit.pt"
permission="cmf.ModifyPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-edit"
for="euphorie.content.solution.ISolution"
class=".quaive_edit.SolutionQuaiveEditForm"
template="templates/quaive-edit.pt"
permission="cmf.ModifyPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-edit"
for="euphorie.content.survey.ISurvey"
class=".quaive_edit.SurveyQuaiveEditForm"
template="templates/quaive-edit.pt"
permission="cmf.ModifyPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>


<browser:page
name="quaive-edit"
for="euphorie.content.surveygroup.ISurveyGroup"
class=".quaive_edit.SurveyGroupQuaiveEditForm"
template="templates/quaive-edit.pt"
permission="cmf.ModifyPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-create-euphorie.sector"
for="*"
class=".quaive_create.QuaiveCreateEuphorieSectorView"
permission="cmf.AddPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-create-euphorie.country"
for="*"
class=".quaive_create.QuaiveCreateEuphorieCountryView"
permission="cmf.AddPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-create-euphorie.risk"
for="*"
class=".quaive_create.QuaiveCreateEuphorieRiskView"
permission="cmf.AddPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-create-euphorie.surveygroup"
for="*"
class=".quaive_create.QuaiveCreateEuphorieSurveyGroupView"
permission="cmf.AddPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-create-euphorie.survey"
for="*"
class=".quaive_create.QuaiveCreateEuphorieSurveyView"
permission="cmf.AddPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-create-euphorie.module"
for="*"
class=".quaive_create.QuaiveCreateEuphorieModuleView"
permission="cmf.AddPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

<browser:page
name="quaive-create-euphorie.solution"
for="*"
class=".quaive_create.QuaiveCreateEuphorieSolutionView"
permission="cmf.AddPortalContent"
layer="osha.oira.interfaces.IOSHAContentSkinLayer"
/>

</configure>
5 changes: 5 additions & 0 deletions src/osha/oira/ploneintranet/interfaces.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from zope.interface import Interface


class IQuaiveForm(Interface):
"""Marker interface for views that are designed to be embedded in Quaive"""
Loading