Giter Site home page Giter Site logo

claytonc / plone.app.versioningbehavior Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plone/plone.app.versioningbehavior

0.0 1.0 0.0 528 KB

Behavior enabling CMFEditions versioning functionality for dexterity contents

Python 99.71% Shell 0.29%

plone.app.versioningbehavior's Introduction

Introduction

The IVersionable behavior is used for enabling the CMFEditions functionality for dexterity contents. It adds a changeNote-field to the edit- and add-forms and creates a new version when the content is edited, if enabled for the content type.

It's based on Products.CMFEditions. For listing the versions of an object use CMFEdtions' view versions_history_form or the history viewlet (see default @@view).

Usage

Just use the behavior plone.app.versioningbehavior.behaviors.IVersionable in your dexterity content type.

In your profiles/default/types/YOURTYPE.xml add the behavior:

<?xml version="1.0"?>
<object name="example.conference.presenter" meta_type="Dexterity FTI"
   i18n:domain="example.conference" xmlns:i18n="http://xml.zope.org/namespaces/i18n">

 <!-- enabled behaviors -->
 <property name="behaviors">
     <element value="plone.app.versioningbehavior.behaviors.IVersionable" />
 </property>

</object>

The IVersionable behavior just adds versioning support to your content type, but it does not enable it.

You have to set the "versioning" option in the Plone types control panel (/@@types-controlpanel) to either "Manual" or "Automatic" for activating versioning.

If you want to automatically enable versioning for your custom content types through generic setup you have to create a file "repositorytool.xml" in your gs profile (e.g. "profiles/default") with the following content:

<?xml version="1.0"?>
<repositorytool>
    <policymap>
        <type name="MyType">
            <policy name="at_edit_autoversion"/>
            <policy name="version_on_revert"/>
        </type>
        <type name="AnotherType">
            <policy name="at_edit_autoversion"/>
            <policy name="version_on_revert"/>
        </type>
    </policymap>
</repositorytool>

See http://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-4.0-to-4.1/updating-add-on-products-for-plone-4.1/use-generic-setup-for-defining-versioning-policies for more details.

More Information

For more information about how the versioning works see the documentation of Products.CMFEditions:

plone.app.versioningbehavior's People

Contributors

jone avatar tisto avatar buchi avatar esteele avatar rpatterson avatar davisagli avatar lukasgraf avatar lrowe avatar dorneles avatar garbas avatar jensens avatar hvelarde avatar tomgross avatar mauritsvanrees avatar cekk avatar gforcada avatar vincentfretin avatar tkimnguyen avatar rafaelbco avatar erral avatar malthe avatar alecpm avatar bosim avatar encolpe avatar kingel avatar jianaijun avatar optilude avatar mikerhodes avatar bloodbare avatar tmog avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.