From e54ded49c44cc95fc9eb0f0f39ca12fb552cbc96 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Tue, 16 Aug 2022 07:39:36 +0000 Subject: [PATCH] urls: Move URLs that don't belong on self-hosted servers to corporate URLs. Use absolute URLs for these links in files which will be served to self-hosted servers. --- corporate/urls.py | 70 ++++++++++++++++++- .../advantages-of-self-hosting-zulip.md | 2 +- .../help/include/advantages-of-zulip-cloud.md | 2 +- .../zerver/help/include/trying-out-zulip.md | 2 +- .../help/setting-up-zulip-for-a-class.md | 6 +- .../zerver/help/using-zulip-for-a-class.md | 2 +- templates/zerver/help/zulip-cloud-billing.md | 2 +- templates/zerver/landing_nav.html | 40 +++++------ zproject/urls.py | 63 ----------------- 9 files changed, 97 insertions(+), 92 deletions(-) diff --git a/corporate/urls.py b/corporate/urls.py index a0edfa0506..ac31d89005 100644 --- a/corporate/urls.py +++ b/corporate/urls.py @@ -2,7 +2,7 @@ from typing import Any from django.conf.urls import include from django.urls import path -from django.views.generic import TemplateView +from django.views.generic import RedirectView, TemplateView from corporate.views.billing_page import billing_home, update_plan from corporate.views.event_status import event_status, event_status_page @@ -14,6 +14,14 @@ from corporate.views.support import support_request from corporate.views.upgrade import initial_upgrade, sponsorship, upgrade from corporate.views.webhook import stripe_webhook from zerver.lib.rest import rest_path +from zerver.views.portico import ( + app_download_link_redirect, + apps_view, + hello_view, + landing_view, + plans_view, + team_view, +) i18n_urlpatterns: Any = [ # Zephyr/MIT @@ -40,6 +48,66 @@ v1_api_and_json_patterns = [ rest_path("billing/event/status", GET=event_status), ] +landing_page_urls = [ + # Landing page, features pages, signup form, etc. + path("hello/", hello_view), + path("new-user/", RedirectView.as_view(url="/hello", permanent=True)), + path("features/", landing_view, {"template_name": "zerver/features.html"}), + path("plans/", plans_view, name="plans"), + path("apps/", apps_view), + path("apps/download/", app_download_link_redirect), + path("apps/", apps_view), + path( + "developer-community/", RedirectView.as_view(url="/development-community/", permanent=True) + ), + path( + "development-community/", + landing_view, + {"template_name": "zerver/development-community.html"}, + ), + path("attribution/", landing_view, {"template_name": "zerver/attribution.html"}), + path("team/", team_view), + path("history/", landing_view, {"template_name": "zerver/history.html"}), + path("why-zulip/", landing_view, {"template_name": "zerver/why-zulip.html"}), + path("self-hosting/", landing_view, {"template_name": "zerver/self-hosting.html"}), + path("security/", landing_view, {"template_name": "zerver/security.html"}), + # /for pages + path("use-cases/", landing_view, {"template_name": "zerver/use-cases.html"}), + path("for/education/", landing_view, {"template_name": "zerver/for-education.html"}), + path("for/events/", landing_view, {"template_name": "zerver/for-events.html"}), + path("for/open-source/", landing_view, {"template_name": "zerver/for-open-source.html"}), + path("for/research/", landing_view, {"template_name": "zerver/for-research.html"}), + path("for/business/", landing_view, {"template_name": "zerver/for-business.html"}), + path("for/companies/", RedirectView.as_view(url="/for/business/", permanent=True)), + path( + "for/communities/", + landing_view, + {"template_name": "zerver/for-communities.html"}, + ), + # We merged this into /for/communities. + path( + "for/working-groups-and-communities/", + RedirectView.as_view(url="/for/communities/", permanent=True), + ), + # case-studies + path("case-studies/idrift/", landing_view, {"template_name": "zerver/idrift-case-study.html"}), + path("case-studies/tum/", landing_view, {"template_name": "zerver/tum-case-study.html"}), + path("case-studies/ucsd/", landing_view, {"template_name": "zerver/ucsd-case-study.html"}), + path("case-studies/rust/", landing_view, {"template_name": "zerver/rust-case-study.html"}), + path("case-studies/lean/", landing_view, {"template_name": "zerver/lean-case-study.html"}), + path( + "case-studies/asciidoctor/", + landing_view, + {"template_name": "zerver/asciidoctor-case-study.html"}, + ), + path( + "case-studies/recurse-center/", + landing_view, + {"template_name": "zerver/recurse-center-case-study.html"}, + ), +] +i18n_urlpatterns += landing_page_urls + # Make a copy of i18n_urlpatterns so that they appear without prefix for English urlpatterns = list(i18n_urlpatterns) diff --git a/templates/zerver/help/include/advantages-of-self-hosting-zulip.md b/templates/zerver/help/include/advantages-of-self-hosting-zulip.md index 9cdfd809f6..17417f9ae8 100644 --- a/templates/zerver/help/include/advantages-of-self-hosting-zulip.md +++ b/templates/zerver/help/include/advantages-of-self-hosting-zulip.md @@ -1,6 +1,6 @@ * Zulip is [100% open-source software][zulip-github], with no "open core" catch. When you self-host Zulip, you get the same software as [Zulip Cloud - Standard](/plans/) customers. + Standard](https://zulip.com/plans/) customers. * Retain full control over your data and simplify compliance by self-hosting Zulip behind your firewall. diff --git a/templates/zerver/help/include/advantages-of-zulip-cloud.md b/templates/zerver/help/include/advantages-of-zulip-cloud.md index 0b28ac1caa..33658fe9c7 100644 --- a/templates/zerver/help/include/advantages-of-zulip-cloud.md +++ b/templates/zerver/help/include/advantages-of-zulip-cloud.md @@ -2,5 +2,5 @@ overhead. [Sign up](/new/) with just a few clicks. * Always updated to the latest version of Zulip. * Anyone can [start with Zulip Cloud Free](/new/). [Free or heavily - discounted Zulip Cloud Standard](/plans/) pricing is available for + discounted Zulip Cloud Standard](https://zulip.com/plans/) pricing is available for most non-business uses. diff --git a/templates/zerver/help/include/trying-out-zulip.md b/templates/zerver/help/include/trying-out-zulip.md index 5642d88c4f..5379dfd9ed 100644 --- a/templates/zerver/help/include/trying-out-zulip.md +++ b/templates/zerver/help/include/trying-out-zulip.md @@ -1,6 +1,6 @@ You can start by reading about how [Zulip’s](/hello/) unique topic-based threading [combines the best of email and -chat](/why-zulip/) to make [remote work](/for/business/) productive +chat](/why-zulip/) to make [remote work](https://zulip.com/for/business/) productive and delightful. We also highly recommend trying Zulip for yourself! You can: diff --git a/templates/zerver/help/setting-up-zulip-for-a-class.md b/templates/zerver/help/setting-up-zulip-for-a-class.md index 570ac40910..c40aa2aa21 100644 --- a/templates/zerver/help/setting-up-zulip-for-a-class.md +++ b/templates/zerver/help/setting-up-zulip-for-a-class.md @@ -1,7 +1,7 @@ # Setting up Zulip for a class Welcome to Zulip! This page will guide you through setting everything -up for [teaching with Zulip](/for/education/). If you are using Zulip +up for [teaching with Zulip](https://zulip.com/for/education/). If you are using Zulip for a different purpose, we recommend checking out the [Setting up your organization][setting-up] guide instead. @@ -18,7 +18,7 @@ us know! ## Trying out Zulip -You can start by reading about [Zulip for Education](/for/education/), +You can start by reading about [Zulip for Education](https://zulip.com/for/education/), and how Zulip can become the communication hub for your class. Zulip is the only [modern team chat app](/features/) that is [ideal](/why-zulip/) for both live and asynchronous @@ -53,7 +53,7 @@ ensure you can always move from our hosting to yours (and back). * Always updated to the latest version of Zulip. * Anyone can [start with Zulip Cloud Free](/new/), which works well for a typical class. * For large classes and departments, we offer [special Zulip for - Education pricing](/for/education/#feature-pricing), with the same + Education pricing](https://zulip.com/for/education/#feature-pricing), with the same features as Zulip Cloud Standard. You can always get started with Zulip Cloud Free, and upgrade down the line if needed. diff --git a/templates/zerver/help/using-zulip-for-a-class.md b/templates/zerver/help/using-zulip-for-a-class.md index c4ca15e5a6..ca7053f34e 100644 --- a/templates/zerver/help/using-zulip-for-a-class.md +++ b/templates/zerver/help/using-zulip-for-a-class.md @@ -1,7 +1,7 @@ # Using Zulip for a class Welcome to Zulip! This pages offers some tips for [using Zulip for a -class](/for/education). If this is your first time using Zulip, we +class](https://zulip.com/for/education). If this is your first time using Zulip, we recommend checking out [Getting started with Zulip](/help/getting-started-with-zulip) to get oriented. diff --git a/templates/zerver/help/zulip-cloud-billing.md b/templates/zerver/help/zulip-cloud-billing.md index fb131cbec6..af2366f4b3 100644 --- a/templates/zerver/help/zulip-cloud-billing.md +++ b/templates/zerver/help/zulip-cloud-billing.md @@ -1,7 +1,7 @@ # Zulip Cloud billing This page answers some frequently asked questions about [Zulip Cloud plans and -pricing](/plans). If you have any other questions, please don't hesitate to +pricing](https://zulip.com/plans). If you have any other questions, please don't hesitate to reach out at sales@zulip.com. ## Differences between Zulip Cloud plans diff --git a/templates/zerver/landing_nav.html b/templates/zerver/landing_nav.html index 50761edd6f..631d2cc077 100644 --- a/templates/zerver/landing_nav.html +++ b/templates/zerver/landing_nav.html @@ -20,19 +20,19 @@
  • - Pricing + Pricing