Cart-like end-user support for batching.
Project description
An add-on for batch processing of objects in a Plone site. Objects can be added to a “cart” and then various batch actions can be perfomed on them with a single click, such as download, delete and copy.
Installation
To install slc.cart you simply add slc.cart to the list of eggs in your buildout, run buildout and restart Plone. Then, install slc.cart using the Add-ons control panel.
Usage
After successful installation two changes immediately become visible:
In site’s Personal tools menu a link to Cart becomes available. This link also displays the current number of items in cart (in parentheses).
Add to Cart / Remove from Cart links appear in document byline of those objects, for which the link is applicable.
The link in Personal tools menu points to a new @@cart view, which lists the curent Cart contents and provides links to various actions that can be performed in batch on all items in Cart.
List of Actions
- Copy
Add items in cart to clipboard. This is similar to Plone’s copy operation with the advantage that items (objects) being copied do not have to reside in the same container, they can be scattered all over the site.
- Cut
Very similar to Copy action, but items in cart are cut to clipboard instead. The difference becomes apparent on subsequent Paste operation - if the items have been cut, they will be removed from their original containers, while the copy operation would not touch the original object instances in their containers.
- Download
Download all items currently in cart (packed in a ZIP archive).
NOTE: Only items that are “downloadable” will be included in the archive. For example images, PDF documents and other files are all fine, while content types such as News Items and Folders will be skipped.
- Delete
Delete all items that are currently in cart from the portal. Also empty the cart itself along the way. Be careful not to accidentally delete something you really didn’t intend to.
- Clear Cart
This one is self-explanatory. Remove all items from cart so that it becomes empty, while not affecting items themselves in any way.
Providing a custom action
You can provide your own Cart action in your own package by creating an adapter for ISiteRoot that provides the ICartAction interface. All actions in slc.cart are already made this way so take them as a point of reference.
Changelog
1.1 (2012-11-13)
Support for newer versions of grokcore.* packages. [zupo]
1.0.1 (2012-11-05)
Missing egg description. [zupo]
1.0 (2012-11-05)
Initial release. [jcerjak, plamut, zupo]
License (3-clause BSD)
Copyright (c) 2012, Syslab All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Syslab nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SYSLAB BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.