diff --git a/emails/base.html b/emails/base.html index b6b70c704..41e3f7bd6 100644 --- a/emails/base.html +++ b/emails/base.html @@ -53,6 +53,7 @@ + {% if hosted %} @@ -65,5 +66,6 @@
Quay [ builds, analyzes, distributes ] your container imagesQuay.io
+ {% endif %} diff --git a/tools/email-viewer/emails.py b/tools/email-viewer/emails.py index 9af305dcc..996970b48 100644 --- a/tools/email-viewer/emails.py +++ b/tools/email-viewer/emails.py @@ -27,6 +27,7 @@ app.jinja_env.filters['admin_reference'] = admin_reference app.jinja_env.filters['repository_reference'] = repository_reference app.jinja_env.filters['team_reference'] = team_reference +app_title = 'Quay.io (local)' def app_link_handler(url=None, title=None): """ Just because it is in the original email tempaltes """ @@ -37,7 +38,8 @@ def render_with_options(template=None): return render_template(template, username="exampleuser", user_reference="testing", app_logo="https://quay.io/static/img/quay-horizontal-color.svg", token="sdf8SdfKGRME9dse_dfdf", app_link=app_link_handler, namespace="booboo", repository="foobar", organization="buynlarge", - admin_usernames=["lazercat", "booboocoreos"], teamname="creators", inviter="devtable") + admin_usernames=["lazercat", "booboocoreos"], teamname="creators", inviter="devtable", + hosted = "Quay" in app_title, app_title = app_title) def get_templates(): """ Return a list of the available templates """ diff --git a/util/useremails.py b/util/useremails.py index a82255281..44efa9568 100644 --- a/util/useremails.py +++ b/util/useremails.py @@ -61,6 +61,7 @@ def send_email(recipient, subject, template_file, parameters, action=None): 'app_logo': 'https://quay.io/static/img/quay-logo.png', # TODO: make this pull from config 'app_url': app_url, 'app_title': app_title, + 'hosted': 'Quay' in app_title, 'app_link': app_link_handler, 'action_metadata': json.dumps(action.metadata) if action else None })