backport of https://github.com/owncloud/gallery/pull/31 to OC6
Merge pull request #1789 from owncloud/backport-gallery-pill-31-stable6

backport of https://github.com/owncloud/gallery/pull/31 to OC6