From be6c90f608a4255c4027448224dfbd4b9e7c5e5a Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Fri, 15 Dec 2023 17:12:41 +0100 Subject: [PATCH] support: Move and highlight current sponsorship information. Moves the note about being on the sponsored Community plan to be under the remote server or realm name. Adds a note about a remote server or realm with a partial discount set, which is another type of sponsorship. Highlights these notes visually with emojis for support admin. --- templates/analytics/remote_realm_details.html | 9 ++++++--- templates/analytics/remote_server_support.html | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/templates/analytics/remote_realm_details.html b/templates/analytics/remote_realm_details.html index 6704bba689..76776eac22 100644 --- a/templates/analytics/remote_realm_details.html +++ b/templates/analytics/remote_realm_details.html @@ -1,13 +1,16 @@
remote realm

{{ remote_realm.name }}

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

On 100% sponsored Zulip Community plan 🎉

+ {% endif %} + {% if support_data[remote_realm.id].sponsorship_data.default_discount %} +

Has a discount 🟢

+ {% endif %} Remote server hostname: {{ remote_realm.host }}
Date created: {{ remote_realm.realm_date_created.strftime('%d %B %Y') }}
Org type: {{ get_org_type_display_name(remote_realm.org_type) }}
Plan type: {{ get_plan_type_name(remote_realm.plan_type) }}
- {% if remote_realm.plan_type == SPONSORED_PLAN_TYPE %} -

On 100% sponsored Zulip Community plan.

- {% endif %}
{% if remote_realm.plan_type != SPONSORED_PLAN_TYPE %} diff --git a/templates/analytics/remote_server_support.html b/templates/analytics/remote_server_support.html index 5f9df9b7d1..5a979ce133 100644 --- a/templates/analytics/remote_server_support.html +++ b/templates/analytics/remote_server_support.html @@ -38,6 +38,12 @@
remote server

{{ remote_server.hostname }}

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

On 100% sponsored Zulip Community plan 🎉

+ {% endif %} + {% if remote_servers_support_data[remote_server.id].sponsorship_data.default_discount %} +

Has a discount 🟢

+ {% endif %} Contact email: {{ remote_server.contact_email }} @@ -47,9 +53,6 @@ Max monthly messages: {{ remote_server_to_max_monthly_messages[remote_server.id] }}
Plan type: {{ get_plan_type_name(remote_server.plan_type) }}
Has remote realm(s): {{ remote_realms[remote_server.id] != [] }} - {% if remote_server.plan_type == SPONSORED_PLAN_TYPE %} -

On 100% sponsored Zulip Community plan.

- {% endif %}
{% if remote_server.plan_type != SPONSORED_PLAN_TYPE %}