mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
model: Use same name for legacy plan across the app.
This commit is contained in:
@@ -76,7 +76,9 @@ def get_plan_type_string(plan_type: int) -> str:
|
||||
Realm.PLAN_TYPE_STANDARD_FREE: "Standard free",
|
||||
Realm.PLAN_TYPE_PLUS: "Plus",
|
||||
RemoteZulipServer.PLAN_TYPE_SELF_MANAGED: "Self-managed",
|
||||
RemoteZulipServer.PLAN_TYPE_SELF_MANAGED_LEGACY: "Self-managed (legacy)",
|
||||
RemoteZulipServer.PLAN_TYPE_SELF_MANAGED_LEGACY: CustomerPlan.name_from_tier(
|
||||
CustomerPlan.TIER_SELF_HOSTED_LEGACY
|
||||
),
|
||||
RemoteZulipServer.PLAN_TYPE_COMMUNITY: "Community",
|
||||
RemoteZulipServer.PLAN_TYPE_BUSINESS: "Business",
|
||||
RemoteZulipServer.PLAN_TYPE_ENTERPRISE: "Enterprise",
|
||||
|
@@ -2408,6 +2408,9 @@ class BillingSession(ABC):
|
||||
if plan is not None:
|
||||
context["plan_name"] = plan.name
|
||||
context["free_trial"] = plan.is_free_trial()
|
||||
context["is_server_on_legacy_plan"] = (
|
||||
plan.tier == CustomerPlan.TIER_SELF_HOSTED_LEGACY
|
||||
)
|
||||
|
||||
self.add_sponsorship_info_to_context(context)
|
||||
return context
|
||||
|
@@ -298,7 +298,7 @@ class CustomerPlan(models.Model):
|
||||
CustomerPlan.TIER_CLOUD_STANDARD: "Zulip Cloud Standard",
|
||||
CustomerPlan.TIER_CLOUD_PLUS: "Zulip Cloud Plus",
|
||||
CustomerPlan.TIER_CLOUD_ENTERPRISE: "Zulip Enterprise",
|
||||
CustomerPlan.TIER_SELF_HOSTED_LEGACY: "Self-managed",
|
||||
CustomerPlan.TIER_SELF_HOSTED_LEGACY: "Self-managed (legacy plan)",
|
||||
CustomerPlan.TIER_SELF_HOSTED_BUSINESS: "Zulip Business",
|
||||
CustomerPlan.TIER_SELF_HOSTED_COMMUNITY: "Community",
|
||||
}[tier]
|
||||
|
@@ -50,7 +50,7 @@
|
||||
</a>
|
||||
{% elif is_server_on_legacy_plan %}
|
||||
<a href="{{ billing_base_url }}/plans/">
|
||||
{{ plan_name }}
|
||||
{{ plan_name.replace(" (legacy plan)", "") -}}
|
||||
</a>
|
||||
<i>(legacy plan)</i>
|
||||
{% else %}
|
||||
|
@@ -53,11 +53,21 @@
|
||||
<label for="sponsored-org-current-plan" class="inline-block label-title">Your plan</label>
|
||||
<div id="sponsored-org-current-plan" class="not-editable-realm-field">
|
||||
{% if is_sponsored %}
|
||||
<a href="{{ billing_base_url }}/plans/">
|
||||
{{ sponsorship_plan_name }}
|
||||
</a>
|
||||
{% elif free_trial %}
|
||||
{{ plan_name }} <i>(free trial)</i>
|
||||
<a href="{{ billing_base_url }}/plans/">
|
||||
{{ plan_name -}}
|
||||
</a> <i>(free trial)</i>
|
||||
{% elif is_server_on_legacy_plan %}
|
||||
<a href="{{ billing_base_url }}/plans/">
|
||||
{{ plan_name.replace(" (legacy plan)", "") -}}
|
||||
</a> <i>(legacy plan)</i>
|
||||
{% else %}
|
||||
<a href="{{ billing_base_url }}/plans/">
|
||||
{{ plan_name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user