Fix click event on documents items

Clicking a document will now open a new gallery panel displaying the
document