Giter Site home page Giter Site logo

claytonc / plone.app.lockingbehavior Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plone/plone.app.lockingbehavior

0.0 1.0 0.0 147 KB

Locking integration for dexterity content objects

Home Page: https://pypi.python.org/pypi/plone.app.lockingbehavior

Python 100.00%

plone.app.lockingbehavior's Introduction

Introduction

The plone.app.lockingbehavior package provides a plone.locking integration for dexterity.

Usage

Just use the behavior plone.app.lockingbehavior.behaviors.ILocking in your dexterity content type. Also check the condition of the "edit" action of your type, it should check if the object is locked.

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

<?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.lockingbehavior.behaviors.ILocking" />
    </property>

    <action action_id="edit"
            visible="True"
            title="Edit"
            category="object"
            url_expr="string:${object_url}/edit"
            condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user|python:True">
        <permission value="Modify portal content"/>
    </action>

</object>

The ILocking behavior enables locking support for your content type. This adds the ITTWLockable interface from plone.locking. The locking viewlet from plone.app.layout is also working for the dexterity content type.

More Information

plone.app.lockingbehavior's People

Contributors

claytonc avatar dorneles avatar fulv avatar garbas avatar jone avatar mauritsvanrees avatar parruc avatar tisto avatar vangheem avatar

Watchers

 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.