support: Show sponsorship and discount headers for Zulip Cloud.

This commit is contained in:
Lauryn Menard 2024-08-07 21:13:56 +02:00 committed by Tim Abbott
parent 391c52639f
commit 73029c8348
2 changed files with 7 additions and 0 deletions

View File

@ -549,6 +549,7 @@ def support(
realm_data = get_data_for_cloud_support_view(billing_session)
realm_support_data[realm.id] = realm_data
context["realm_support_data"] = realm_support_data
context["SPONSORED_PLAN_TYPE"] = Realm.PLAN_TYPE_STANDARD_FREE
def get_realm_owner_emails_as_string(realm: Realm) -> str:
return ", ".join(

View File

@ -1,6 +1,12 @@
<div class="realm-support-information">
<span class="cloud-label">Cloud realm</span>
<h3><img src="{{ realm_icon_url(realm) }}" class="support-realm-icon" /> {{ realm.name }}</h3>
{% if realm.plan_type == SPONSORED_PLAN_TYPE %}
<p class="support-section-header">On 100% sponsored Zulip Standard Free 🎉</p>
{% endif %}
{% if realm_support_data[realm.id].sponsorship_data.has_discount %}
<p class="support-section-header">Has a discount 💸</p>
{% endif %}
<b>URL</b>: <a target="_blank" rel="noopener noreferrer" href="{{ realm.url }}">{{ realm.url }}</a> |
<a target="_blank" rel="noopener noreferrer" href="/stats/realm/{{ realm.string_id }}/">stats</a> |
<a target="_blank" rel="noopener noreferrer" href="/realm_activity/{{ realm.string_id }}/">activity</a><br />