Raptus/raptus.article.core — pull request #6 by frisi (2014-05-24 00:52:11+00:00)
Title: add link to cropping editor to manageable views

this pull request adds a cropping action to the list of manageable items if a component adds a `crop` key to all items in the list.

this is how it looks like:
![cropping](https://cloud.githubusercontent.com/assets/1120517/3073193/92e9b186-e2dd-11e3-8a05-5a3fdffee05e.png)

example usage: https://github.com/webmeisterei/raptus.article.imageslider/commit/42239479d232a7c0dc35e56d96ddd089050a875f

i first wanted to add these links in raptus.article.core.manageable directly (so components need not add the crop key) but ran into a problem
basically this is what i tried to do:

```python
try:
import plone.app.imagecropping
CROPPING_AVAILABLE = True
except ImportError:
CROPPING_AVAILABLE = False

from raptus.article.core.interfaces import IComponents
component = getAdapter(self.context, interfaces.IComponent, name='imageslider.teaser')

#add a crop key to the item dict if it's an image, cropping is available and we're using a scale
#pseudo-code
'crop': IImage.providedBy(obj) and modify and CROPPING_AVAILABLE and safe_hasattr(component, 'scale') and '%s/@@croppingeditor?scalename=%s' % (brain.getURL(), component.scale)
```

the scale property however, is available on the viewlet, and not the component.
(since it's configurable via a property)
https://github.com/webmeisterei/raptus.article.imageslider/blob/master/raptus/article/imageslider/browser/slider.py#L59