symphonycms/symphony-2 — pull request #1865 by nitriques (2013-11-12 04:46:52+00:00)
Title: Added `Field->prepareAssociationsDrawerXMLElement` function

I just realized that the markup for the association drawer called `prepareTableValue` instead of using some custom formatting. Clever implementation, but it lacked flexibility.

My users really like the Association Drawer and (as usual) wants image in them.

I was able to give image previews everywhere, but this time, it is more complex, since I do not have the full path (hence, I can't load images).

---

My current implementation is a little bit different than what I based my work on, i.e. `prepareTableValue`. I find the `link` parameter kind of weird, in the sense that it is null most of the time. Also, OOP is here to stay, and I prefer to return Objects instead of String. That's my two cents, feel free to comment.

---

The core upload field already adds a 'data-path' attribute on the link, which permits previews. I though of adding the same thing in there too.