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 without minimal code and template duplication.