Add helper function for filtering templates by type
Add helper function for filtering templates by type

This code was making the view method more cluttered than it needed to
be. Moving it will help make space for the `post` request handling code.

alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin