Twig extension to render type and priority labels

That function returns a raw HTML that will be rendered in the twig template. Maybe we should be more explicit there