Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install ecreall.trashcan

How to install ecreall.trashcan

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install ecreall.trashcan
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.3.1
1.4.1Never BuiltWhy not?
1.3.1 Available View build log
1.3.0 Available View build log
1.2.1 Available View build log
1.2 Available View build log
Windows (64-bit)
1.3.1
1.4.1Never BuiltWhy not?
1.3.1 Available View build log
1.3.0 Available View build log
1.2.1 Available View build log
1.2 Available View build log
Mac OS X (10.5+)
1.3.1
1.4.1Never BuiltWhy not?
1.3.1 Available View build log
1.3.0 Available View build log
1.2.1 Available View build log
1.2 Available View build log
Linux (32-bit)
1.4.1 Available View build log
1.3.1 Available View build log
1.3.0 Available View build log
1.2.1 Available View build log
1.2 Available View build log
Linux (64-bit)
1.4.1 Available View build log
1.3.1 Available View build log
1.3.0 Available View build log
1.2.1 Available View build log
1.2 Available View build log
 
License
GPL
Lastest release
version 1.4.1 on Nov 23rd, 2012

This is an implementation of a trashcan for Plone. This product monkey patch PloneCatalog.searchResults and PloneCatalog.__call__. Since version 1.2, this product works only on Plone >= 3.3 (included Plone 4.x).

This product adds a "move to trashcan"/"restore" actions and a "open trashcan"/"close trashcan" links at the bottom of the page.

When you move an object to the trashcan, the object is actually not moved anywhere. It is just hidden from the search. What the action does is setting a marker interface ITrashed on the object and on sub-objects if the object trashed is a folder. It excludes the object from navigation too.

To see the trashed objects, you have to activate the trashcan mode with the "open trashcan" link at the bottom of your page. You can see it as a parallel world. You will see only trashed objects and the search now search only on trashed content.

In this mode you can restore objects. You can't restore object if the parent is trashed. In this case you have to cut and paste the object in a non trashed folder to restore it.

When you are in trashcan mode, there is some verifications which takes place. You can't paste an object in a trashed folder for example.

To come back to the normal mode, click on the "close trashcan" link at the bottom of the page. When trahscan mode is closed, it returns to the nearest parent not trashed.

Code repository: https://svn.ecreall.com/public/ecreall.trashcan/

Integration with CacheFu

In the plone-containers rule, edit "ETag Expression", replace:

python:request.get('__cp',None) is not None

by:

python:str(request.get('__cp',None) is not None) +'|'+ str(request.SESSION.get('trashcan', None))

Integration with plone.app.caching

If you have a cache on folder views with plone.app.caching, add 'trashed' to your etags.

1.4.1 (2012-09-17)

  • Fixed MANIFEST.in.

1.4 (2012-09-17)

  • Optimization: reindex only trashed and object_provides index at trash or restore. [thomasdesvenain]
  • Remove grok dependency. [thomasdesvenain]
  • 4.2.1 Compatibility. [thomasdesvenain]
  • New UI to open / close trashcan. [thomasdesvenain]
  • Fix security issue. [thomasdesvenain]

1.3.1 (2011-12-22)

  • Use BooleanIndex for trashed index. [thomasdesvenain]

1.3.0 (2011-09-22)

  • Plone 4.x compatibility.
  • Added an Etag for plone.app.registry. [thomasdesvenain]
  • We may not acquire a REQUEST in searchResults, fixed it. [vincentfretin]

1.2.1 (2010-09-23)

  • Trashcan message is of 'warning' class.
  • Changed label of trashcan warning: exit trashcan button "may not be at the bottom of the page"
  • Replaced "five:implements class" directive by "class implements" directive.
  • Test if SESSION exists in REQUEST before getting it. It's needed for test environment where you don't have SESSION.

1.2 (2009-12-18)

  • Removed livesearch_reply.py, queryCatalog.py. Now patch directly PloneCatalog with collective.monkeypatcher. This fixes trashed elements seen in collections. This version requires Plone 3.3. [vincentfretin]

1.1 (2009-03-11)

  • Initial public release.
  • Add an empty canTrash script, you can overwrite it in another product.
  • Exclude from nav trashed objects. [vincentfretin]

1.0 (2009-02-23)

  • Created product with ZopeSkel. [Vincent Fretin and Michael Launay]

Subscribe to package updates

Last updated Nov 23rd, 2012

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.