From 73029c83483f5e07a42b0b6158931bde31e67488 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Wed, 7 Aug 2024 21:13:56 +0200 Subject: [PATCH] support: Show sponsorship and discount headers for Zulip Cloud. --- corporate/views/support.py | 1 + templates/corporate/support/realm_details.html | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/corporate/views/support.py b/corporate/views/support.py index 4e1461bd30..15745e68eb 100644 --- a/corporate/views/support.py +++ b/corporate/views/support.py @@ -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( diff --git a/templates/corporate/support/realm_details.html b/templates/corporate/support/realm_details.html index 80114d7b1f..1ce081cc50 100644 --- a/templates/corporate/support/realm_details.html +++ b/templates/corporate/support/realm_details.html @@ -1,6 +1,12 @@
Cloud realm

{{ realm.name }}

+ {% if realm.plan_type == SPONSORED_PLAN_TYPE %} +

On 100% sponsored Zulip Standard Free 🎉

+ {% endif %} + {% if realm_support_data[realm.id].sponsorship_data.has_discount %} +

Has a discount 💸

+ {% endif %} URL: {{ realm.url }} | stats | activity