Skip to content

Commit

Permalink
Merge branch '1.1.x'
Browse files Browse the repository at this point in the history
Conflicts:
	README.rst
	plone/app/contenttypes/upgrades.py
	travis.cfg
  • Loading branch information
pbauer committed Feb 21, 2014
2 parents 1fa0b07 + 89ad0e8 commit 0c721f4
Show file tree
Hide file tree
Showing 23 changed files with 158 additions and 42 deletions.
9 changes: 9 additions & 0 deletions .coveragerc
@@ -0,0 +1,9 @@
[report]
omit =
/home/*/.buildout/eggs/*
/usr/*
bin/test
buildout-cache/eggs/*
eggs/*
parts/*

12 changes: 11 additions & 1 deletion .travis.yml
Expand Up @@ -13,4 +13,14 @@ install:
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script: bin/test -s plone.app.contenttypes
script:
- bin/test -s plone.app.contenttypes
# - bin/code-analysis
#after_success:
# - bin/createcoverage run bin/test
# - pip install -q coveralls
# - coveralls
after_failure:
- bin/csslint --version
- bin/jshint --version

21 changes: 20 additions & 1 deletion CHANGES.rst
@@ -1,7 +1,25 @@
Changelog
=========

1.1a2 (unreleased)
1.1b2 (unreleased)
------------------

- Fix viewlet warning about ineditable content (fixes #130)
[pbauer]

- Reintroduce the removed schema-files and add upgrade-step to migrate to
behavior-driven richtext-fields (fixes #127)
[pbauer]

- Delete Archetypes Member-folder before creating new default-content
(fixes #128)
[pbauer]

- Remove outdated summary-behavior from event (fixes #129)
[pbauer]


1.1b1 (2014-02-19)
------------------

- Add tests for collections and collection-migrations.
Expand Down Expand Up @@ -45,6 +63,7 @@ Changelog
contains variables (Fix #110).
[rafaelbco]


1.1a1 (2013-11-22)
------------------

Expand Down
54 changes: 39 additions & 15 deletions README.rst
Expand Up @@ -3,19 +3,18 @@
.. image:: https://travis-ci.org/plone/plone.app.contenttypes.png?branch=master
:target: http://travis-ci.org/plone/plone.app.contenttypes

.. image:: https://coveralls.io/repos/plone/plone.app.contenttypes/badge.png?branch=master
:target: https://coveralls.io/r/plone/plone.app.contenttypes

.. image:: https://pypip.in/d/plone.app.contenttypes/badge.png
:target: https://crate.io/packages/plone.app.contenttypes
:target: https://crate.io/packages/plone.app.contenttypes

.. image:: https://pypip.in/v/plone.app.contenttypes/badge.png
:target: https://crate.io/packages/plone.app.contenttypes
:target: https://crate.io/packages/plone.app.contenttypes


Introduction
============



plone.app.contenttypes offers default content types for Plone based on Dexterity. This package replaces ``Products.ATContenttypes`` and will provide the default-types in Plone 5.

It contains the following types:
Expand All @@ -38,12 +37,14 @@ plone.app.contenttypes has been merged into the Plone 5.0 branch and will be shi
**Warning: Using plone.app.contenttypes on a site with existing content requires migrating the sites content. Please see the chapter "Migration". It can be used on a new site without problems.**


Compatability
Compatibility
=============

plone.app.contenttypes is tested with Plone 4.3 and the upcoming Plone 5.0.
Version 1.1b1 is tested with Plone 4.3.x. The versions 1.1.x will stay compatible with Plone 4.3.x.

Version 1.0 and earlier should run with Plone 4.1+ but do not provide the full functionality.
For support of Plone 4.1 and 4.2 please use version 1.0.x. Please note that they do not provide the full functionality.

The future versions 1.2.x will be compatible with Plone 5 only and add support for plone.app.widgets


Installation
Expand All @@ -55,9 +56,11 @@ Add this line in the eggs section of your ``buildout.cfg``::
...
plone.app.contenttypes

If you have a mixed Plone site with Archetypes content and dexterity content use the extra requirement::
If you have a Plone site with mixed Archetypes and Dexterity content use the extra requirement ``atrefs``.::

``plone.app.contenttypes [atrefs]``

``plone.app.contenttypes ['atrefs']``
This also installs the package `plone.app.referenceablebehavior <https://pypi.python.org/pypi/plone.app.referenceablebehavior>`_. You will have to enable the behavior ``plone.app.referenceablebehavior.referenceable.IReferenceable`` for all types that need to be referenced by Archetypes-content.


What happens to existing content?
Expand Down Expand Up @@ -107,7 +110,18 @@ Dependencies

* ``plone.app.portlets >= 2.5a1``. In older version the event-portlet will not work with the new event-type.

These are the version-pinns for Plone 4.3.2:
These are the version-pinns for Plone 4.3.3:

.. code:: ini
[buildout]
versions = versions
[versions]
plone.app.event = 1.1b1
plone.app.portlets = 2.5a1
Plone-versions before 4.3.3 need to pinn more packages:

.. code:: ini
Expand Down Expand Up @@ -171,9 +185,9 @@ Migrating from old versions of plone.app.contenttypes

Before version 1.0a2 the content-items did not implement marker-interfaces. They will break in newer versions since the views are now registered for these interfaces (e.g. ``plone.app.contenttypes.interfaces.IDocument``). To fix this you can call the view ``/@@fix_base_classes`` on your site-root.

Since plone.app.contenttypes 1.1, the Collection type uses the new Collection behavior and the Event type utilizes behaviors from `plone.app.event <http://pypi.python.org/pypi/plone.app.event>`_. In order to upgrade:
Since plone.app.contenttypes 1.1a1, the Collection type uses the new Collection behavior and the Event type utilizes behaviors from `plone.app.event <http://pypi.python.org/pypi/plone.app.event>`_. In order to upgrade:

1) First run the default profile (``plone.app.contenttypes:default``) and
1) First run the default profile (``plone.app.contenttypes:default``) or reinstall plone.app.contenttypes
2) Then run the upgrade steps.


Expand Down Expand Up @@ -352,16 +366,18 @@ Differences to Products.ATContentTypes
- There is no more field ``Location``. If you need georeferenceable consider using ``collective.geo.behaviour``
- The link on the image of the newsitem triggers an overlay
- The link-type now allows the of the variables ``${navigation_root_url}`` and ``${portal_url}`` to construct relative urls.
- The keywords-widget is nit implemented and ootb is only a lines-widget. See the section on widgets.
- The keywords-widget is not implemented and is replaced by a simple lines-widget unless you override it or use plone.app.widgets. Please see the section on widgets.


Toubleshooting
==============

Please report issues in the bugtracker at https://github.com/plone/plone.app.contenttypes/issues.

ValueError on installing
------------------------

When you try to install plone.app.contenttypes in a existing site you might get the following error::
When you try to install plone.app.contenttypes < 1.1a1 in a existing site you might get the following error::

(...)
Module Products.GenericSetup.utils, line 509, in _importBody
Expand All @@ -372,6 +388,14 @@ When you try to install plone.app.contenttypes in a existing site you might get
Before installing plone.app.contenttypes you have to reinstall plone.app.collection to update collections to the version that uses Dexterity.


Branches
========

The master-branch supports Plone 5 only. From this 1.2.x-releases will be cut.

The 1.1.x-branch supports Plone 4.3.x. From this 1.1.x-releases will be cut.


License
=======

Expand Down
@@ -1,3 +1,4 @@
<tal:available condition="view/available">
<dl class="portalMessage alert-box secondary warning"
i18n:domain="plone">
<dt i18n:translate="">Warning</dt>
Expand All @@ -17,4 +18,5 @@

<style type="text/css">
#contentview-edit {display: None;}
</style>
</style>
</tal:available>
14 changes: 14 additions & 0 deletions plone/app/contenttypes/browser/viewlets.py
Expand Up @@ -23,6 +23,20 @@ def update(self):
if not HAS_ARCHETYPES:
return
self.context = aq_inner(self.context)
replaced_types = [
'ATFolder',
'ATDocument',
'ATFile',
'ATImage',
'ATNewsItem',
'ATLink',
'ATEvent',
'ATBlobImage',
'ATBlobFile',
'Collection'
]
if self.context.meta_type not in replaced_types:
return
if not IBaseObject.providedBy(self.context):
return
context_fti = self.context.getTypeInfo()
Expand Down
5 changes: 4 additions & 1 deletion plone/app/contenttypes/profiles/default/types/Collection.xml
Expand Up @@ -11,8 +11,11 @@
<property name="filter_content_types">False</property>
<property name="allowed_content_types" />
<property name="allow_discussion">False</property>
<property name="klass">plone.app.contenttypes.content.Collection</property>
<property name="add_permission">plone.app.contenttypes.addCollection</property>
<property name="klass">plone.app.contenttypes.content.Collection</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:collection.xml</property>
<property name="behaviors">
<element value="plone.app.content.interfaces.INameFromTitle"/>
<element value="plone.app.contenttypes.behaviors.collection.ICollection"/>
Expand Down
3 changes: 3 additions & 0 deletions plone/app/contenttypes/profiles/default/types/Document.xml
Expand Up @@ -19,6 +19,9 @@
<property name="default_view_fallback">False</property>
<property name="add_permission">plone.app.contenttypes.addDocument</property>
<property name="klass">plone.app.contenttypes.content.Document</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:document.xml</property>
<property name="behaviors">
<element value="plone.app.content.interfaces.INameFromTitle"/>
<element value="plone.app.dexterity.behaviors.discussion.IAllowDiscussion"/>
Expand Down
3 changes: 2 additions & 1 deletion plone/app/contenttypes/profiles/default/types/Event.xml
Expand Up @@ -20,6 +20,8 @@
<!-- Schema, class and security -->
<property name="klass">plone.app.contenttypes.content.Event</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:event.xml</property>
<property name="add_permission">plone.app.contenttypes.addEvent</property>

<!-- Enabled behaviors -->
Expand All @@ -29,7 +31,6 @@
<element value="plone.app.event.dx.behaviors.IEventLocation"/>
<element value="plone.app.event.dx.behaviors.IEventAttendees"/>
<element value="plone.app.event.dx.behaviors.IEventContact"/>
<element value="plone.app.event.dx.behaviors.IEventSummary"/>
<element value="plone.app.dexterity.behaviors.metadata.IDublinCore"/>
<element value="plone.app.content.interfaces.INameFromTitle"/>
<element value="plone.app.contenttypes.behaviors.richtext.IRichText"/>
Expand Down
6 changes: 3 additions & 3 deletions plone/app/contenttypes/profiles/default/types/File.xml
Expand Up @@ -19,6 +19,9 @@
<property name="default_view_fallback">False</property>
<property name="add_permission">plone.app.contenttypes.addFile</property>
<property name="klass">plone.app.contenttypes.content.File</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:file.xml</property>
<property name="behaviors">
<element value="plone.app.dexterity.behaviors.metadata.ICategorization"/>
<element value="plone.app.dexterity.behaviors.metadata.IPublication"/>
Expand All @@ -28,9 +31,6 @@
<element value="plone.app.dexterity.behaviors.exclfromnav.IExcludeFromNavigation"/>
<element value="plone.app.relationfield.behavior.IRelatedItems"/>
</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:file.xml</property>
<alias from="(Default)" to="@@display-file"/>
<alias from="edit" to="@@edit"/>
<alias from="sharing" to="@@sharing"/>
Expand Down
6 changes: 3 additions & 3 deletions plone/app/contenttypes/profiles/default/types/Folder.xml
Expand Up @@ -23,6 +23,9 @@
<property name="default_view_fallback">False</property>
<property name="add_permission">plone.app.contenttypes.addFolder</property>
<property name="klass">plone.app.contenttypes.content.Folder</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:folder.xml</property>
<property name="behaviors">
<element value="plone.app.dexterity.behaviors.metadata.IDublinCore"/>
<element value="plone.app.content.interfaces.INameFromTitle"/>
Expand All @@ -33,9 +36,6 @@
<element value="plone.app.relationfield.behavior.IRelatedItems"/>
<element value="plone.app.dexterity.behaviors.nextprevious.INextPreviousToggle"/>
</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:folder.xml</property>
<alias from="(Default)" to="(dynamic view)"/>
<alias from="edit" to="@@edit"/>
<alias from="sharing" to="@@sharing"/>
Expand Down
6 changes: 3 additions & 3 deletions plone/app/contenttypes/profiles/default/types/Image.xml
Expand Up @@ -20,6 +20,9 @@
<property name="default_view_fallback">False</property>
<property name="add_permission">plone.app.contenttypes.addImage</property>
<property name="klass">plone.app.contenttypes.content.Image</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:image.xml</property>
<property name="behaviors">
<element value="plone.app.dexterity.behaviors.metadata.ICategorization"/>
<element value="plone.app.dexterity.behaviors.metadata.IPublication"/>
Expand All @@ -29,9 +32,6 @@
<element value="plone.app.dexterity.behaviors.exclfromnav.IExcludeFromNavigation"/>
<element value="plone.app.relationfield.behavior.IRelatedItems"/>
</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:image.xml</property>
<alias from="(Default)" to="@@display-file"/>
<alias from="edit" to="@@edit"/>
<alias from="sharing" to="@@sharing"/>
Expand Down
6 changes: 3 additions & 3 deletions plone/app/contenttypes/profiles/default/types/Link.xml
Expand Up @@ -19,16 +19,16 @@
<property name="default_view_fallback">False</property>
<property name="add_permission">plone.app.contenttypes.addLink</property>
<property name="klass">plone.app.contenttypes.content.Link</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:link.xml</property>
<property name="behaviors">
<element value="plone.app.dexterity.behaviors.discussion.IAllowDiscussion"/>
<element value="plone.app.dexterity.behaviors.metadata.IDublinCore"/>
<element value="plone.app.content.interfaces.INameFromTitle"/>
<element value="plone.app.dexterity.behaviors.exclfromnav.IExcludeFromNavigation"/>
<element value="plone.app.versioningbehavior.behaviors.IVersionable" />
</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:link.xml</property>
<alias from="(Default)" to="(dynamic view)"/>
<alias from="edit" to="@@edit"/>
<alias from="sharing" to="@@sharing"/>
Expand Down
3 changes: 3 additions & 0 deletions plone/app/contenttypes/profiles/default/types/News_Item.xml
Expand Up @@ -19,6 +19,9 @@
<property name="default_view_fallback">False</property>
<property name="add_permission">plone.app.contenttypes.addNewsItem</property>
<property name="klass">plone.app.contenttypes.content.NewsItem</property>
<property name="schema"></property>
<property name="model_source"></property>
<property name="model_file">plone.app.contenttypes.schema:news_item.xml</property>
<property name="behaviors">
<element value="plone.app.dexterity.behaviors.metadata.IDublinCore"/>
<element value="plone.app.contenttypes.behaviors.richtext.IRichText"/>
Expand Down
4 changes: 4 additions & 0 deletions plone/app/contenttypes/schema/collection.xml
@@ -0,0 +1,4 @@
<model xmlns="http://namespaces.plone.org/supermodel/schema">
<schema>
</schema>
</model>
4 changes: 4 additions & 0 deletions plone/app/contenttypes/schema/document.xml
@@ -0,0 +1,4 @@
<model xmlns="http://namespaces.plone.org/supermodel/schema">
<schema>
</schema>
</model>
4 changes: 4 additions & 0 deletions plone/app/contenttypes/schema/event.xml
@@ -0,0 +1,4 @@
<model xmlns="http://namespaces.plone.org/supermodel/schema">
<schema>
</schema>
</model>
4 changes: 4 additions & 0 deletions plone/app/contenttypes/schema/news_item.xml
@@ -0,0 +1,4 @@
<model xmlns="http://namespaces.plone.org/supermodel/schema">
<schema>
</schema>
</model>
2 changes: 1 addition & 1 deletion plone/app/contenttypes/setuphandlers.py
Expand Up @@ -384,7 +384,7 @@ def _delete_at_example_content(portal):
]
if not [i.id for i in all_content] == expected:
return
to_delete = ['front-page', 'news', 'events']
to_delete = ['front-page', 'news', 'events', 'Members']
for i in to_delete:
obj = portal[i]
if IDexterityContent.providedBy(obj):
Expand Down

1 comment on commit 0c721f4

@mister-roboto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TESTS PASSED
Mr.Roboto url : http://jenkins.plone.org/roboto/get_info?push=1dd0c79c4c8a4b78be71fde1c59baed0
[SUCCESS] kgs-plone.app.contenttypes-plone-5.0-python-2.7 kgs

Please sign in to comment.