Allow easier customization of partners dashboard

This adds some blocks in the template and extracts the business logic part
of the partner user link view so that custom installations can modify this
behaviour with minimal code and template duplication.

Fixes #971