-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from plone/core-addon
Turn this into a core addon
- Loading branch information
Showing
37 changed files
with
591 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Move this package in the space of Plone Core add-ons. | ||
It now depends on Products.CMFPlone and is no longer installed by default. | ||
It is still available in the default Plone distribution, but can be omitted in customizations. | ||
[jensens] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix redirection after comment edit to main content, preventing NotFound. [@jensens] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Add missing icon on comments' `view` action | ||
Register contenttype icon for comments. | ||
[gforcada, maurits] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from plone.autoform import directives | ||
from plone.autoform.interfaces import IFormFieldProvider | ||
from plone.base import PloneMessageFactory as _ | ||
from plone.supermodel import model | ||
from z3c.form.interfaces import IAddForm | ||
from z3c.form.interfaces import IEditForm | ||
from zope import schema | ||
from zope.interface import provider | ||
from zope.schema.vocabulary import SimpleTerm | ||
from zope.schema.vocabulary import SimpleVocabulary | ||
|
||
|
||
options = SimpleVocabulary( | ||
[ | ||
SimpleTerm(value=True, title=_("Yes")), | ||
SimpleTerm(value=False, title=_("No")), | ||
] | ||
) | ||
|
||
|
||
@provider(IFormFieldProvider) | ||
class IAllowDiscussion(model.Schema): | ||
model.fieldset( | ||
"settings", | ||
label=_("Settings"), | ||
fields=["allow_discussion"], | ||
) | ||
|
||
allow_discussion = schema.Choice( | ||
title=_("Allow discussion"), | ||
description=_("Allow discussion for this content object."), | ||
vocabulary=options, | ||
required=False, | ||
default=None, | ||
) | ||
|
||
directives.omitted("allow_discussion") | ||
directives.no_omit(IEditForm, "allow_discussion") | ||
directives.no_omit(IAddForm, "allow_discussion") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<configure | ||
xmlns="http://namespaces.zope.org/zope" | ||
xmlns:plone="http://namespaces.plone.org/plone" | ||
xmlns:zcml="http://namespaces.zope.org/zcml" | ||
i18n_domain="plone" | ||
> | ||
|
||
<include | ||
package="plone.behavior" | ||
file="meta.zcml" | ||
/> | ||
|
||
<!--Allow discussion --> | ||
<plone:behavior | ||
name="plone.allowdiscussion" | ||
title="Allow discussion" | ||
description="Allow discussion on this item" | ||
provides=".behavior.IAllowDiscussion" | ||
name_only="yes" | ||
former_dotted_names="plone.app.dexterity.behaviors.discussion.IAllowDiscussion" | ||
/> | ||
|
||
</configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.