emails: Add onboarding_zulip_guide_url to the "unspecified" org_types.

Update the onboarding_zulip_guide email functionality to handle cases
where there is no dedicated marketing page for the organization's
type or when the type is unspecified. In such cases, the email now
includes an introduction text inviting users to explore Zulip features
and provides a link to https://zulip.com/use-cases/.

fixes #26868.
This commit is contained in:
sujal 2024-03-15 01:06:34 +05:30
parent f4d58f1ba6
commit 421547f6ac
4 changed files with 40 additions and 6 deletions

View File

@ -6,7 +6,11 @@
{% block content %}
<p>{{ _("As you are getting started with Zulip, we'd love to help you discover how it can work best for your needs. Check out this guide to key Zulip features for organizations like yours!") }}</p>
{% if organization_type in ["government", "political_group", "personal", "other"] %}
<p>{{ _("As you are getting started with Zulip, we'd love to help you discover how it can work best for your needs. Check out our guides to key Zulip features!") }}</p>
{% else %}
<p>{{ _("As you are getting started with Zulip, we'd love to help you discover how it can work best for your needs. Check out this guide to key Zulip features.") }}</p>
{% endif %}
{% if organization_type == "business" %}
@ -23,6 +27,16 @@
<a class="button" href="{{ zulip_guide_link }}">{{ _("View Zulip guide for non-profits") }}</a>
{% elif organization_type == "community" %}
<a class="button" href="{{ zulip_guide_link }}">{{ _("View Zulip guide for communities") }}</a>
{% elif organization_type == "unspecified" %}
<a class="button" href="{{ zulip_guide_link }}">{{ _("View Zulip guide") }}</a>
{% elif organization_type == "government" %}
<a class="button" href="{{ zulip_guide_link }}">{{ _("View Zulip guide") }}</a>
{% elif organization_type == "political_group" %}
<a class="button" href="{{ zulip_guide_link }}">{{ _("View Zulip guide") }}</a>
{% elif organization_type == "personal" %}
<a class="button" href="{{ zulip_guide_link }}">{{ _("View Zulip guide") }}</a>
{% elif organization_type == "other" %}
<a class="button" href="{{ zulip_guide_link }}">{{ _("View Zulip guide") }}</a>
{% endif %}
<p>

View File

@ -12,4 +12,14 @@
{{ _("Zulip guide for non-profits") }}
{% elif organization_type == "community" %}
{{ _("Zulip guide for communities") }}
{% elif organization_type == "unspecified" %}
{{ _("Zulip guide") }}
{% elif organization_type == "government" %}
{{ _("Zulip guide") }}
{% elif organization_type == "political_group" %}
{{ _("Zulip guide") }}
{% elif organization_type == "personal" %}
{{ _("Zulip guide") }}
{% elif organization_type == "other" %}
{{ _("Zulip guide") }}
{% endif %}

View File

@ -14,6 +14,16 @@
{{ _("View Zulip guide for non-profits") }}:
{% elif organization_type == "community" %}
{{ _("View Zulip guide for communities") }}:
{% elif organization_type == "unspecified" %}
{{ _("View Zulip guide") }}:
{% elif organization_type == "government" %}
{{ _("View Zulip guide") }}:
{% elif organization_type == "political_group" %}
{{ _("View Zulip guide") }}:
{% elif organization_type == "personal" %}
{{ _("View Zulip guide") }}:
{% elif organization_type == "other" %}
{{ _("View Zulip guide") }}:
{% endif %}
<{{ zulip_guide_link }}>

View File

@ -379,7 +379,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
"id": OrgTypeEnum.Unspecified.value,
"hidden": True,
"display_order": 0,
"onboarding_zulip_guide_url": None,
"onboarding_zulip_guide_url": "https://zulip.com/use-cases/",
},
"business": {
"name": "Business",
@ -435,14 +435,14 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
"id": OrgTypeEnum.Government.value,
"hidden": False,
"display_order": 8,
"onboarding_zulip_guide_url": None,
"onboarding_zulip_guide_url": "https://zulip.com/use-cases/",
},
"political_group": {
"name": "Political group",
"id": OrgTypeEnum.PoliticalGroup.value,
"hidden": False,
"display_order": 9,
"onboarding_zulip_guide_url": None,
"onboarding_zulip_guide_url": "https://zulip.com/use-cases/",
},
"community": {
"name": "Community",
@ -456,14 +456,14 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
"id": OrgTypeEnum.Personal.value,
"hidden": False,
"display_order": 100,
"onboarding_zulip_guide_url": None,
"onboarding_zulip_guide_url": "https://zulip.com/use-cases/",
},
"other": {
"name": "Other",
"id": OrgTypeEnum.Other.value,
"hidden": False,
"display_order": 1000,
"onboarding_zulip_guide_url": None,
"onboarding_zulip_guide_url": "https://zulip.com/use-cases/",
},
}