Moved reindering of grid thumbnails to a partial template