Show domains, not owners against brands

The owner is often repetetive, eg

> *Hackney Council*
> Default for Hackney Council

Instead it’s more useful to reflect what the person setting up the brand
has entered – the domain.

This also adds an empty hint for non-default brands so that the page is
evenly spaced and nothing overlaps.
This commit is contained in:
Chris Hill-Scott
2019-01-23 14:16:44 +00:00
parent a9effaa82e
commit 88f868c57d
3 changed files with 17 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ def email_branding():
return render_template(
'views/email-branding/select-branding.html',
email_brandings=_add_domain_info(brandings),
email_brandings=brandings,
search_form=SearchTemplatesForm(),
show_search_box=len(brandings) > 9,
agreement_info=AgreementInfo,
@@ -129,11 +129,3 @@ def create_email_branding(logo=None):
cdn_url=get_logo_cdn_domain(),
logo=logo
)
def _add_domain_info(email_brands):
for brand in email_brands:
yield dict(
domain_owner=AgreementInfo(brand.get('domain') or '').owner,
**brand
)