templates: Improve footer content on documentation pages.

Makes the footer content on doc pages more contextually appropriate
for self-hosted organizations, when `settings.CORPORATE_ENABLED` is
false.

When `settings.CORPORATE_ENABLED` is true, there is specific footer
content for the policy documentation pages, and for the help center
and API documentation pages.

Fixes #23068.
This commit is contained in:
Lauryn Menard
2022-09-27 13:18:33 +02:00
committed by Tim Abbott
parent b8a4bf6f40
commit 569863ffa6
2 changed files with 13 additions and 5 deletions

View File

@@ -41,7 +41,15 @@
<div id="footer" class="documentation-footer">
<hr />
<p>We're here to help! Email us at <a href="mailto:{{ support_email }}">{{ support_email }}</a> with questions, feedback, or feature requests.</p>
{% if corporate_enabled %}
{% if page_is_policy_center %}
<p>Please contact {{ support_email_html_tag }} with any questions about Zulip's policies.</p>
{% else %}
<p>Your feedback helps us make Zulip better for everyone! Please <a href="mailto:{{ support_email }}">contact us</a> with questions, suggestions, and feature requests.</p>
{% endif %}
{% else %}
<p>Don't see an answer to your question? <a href="mailto:{{ support_email }}">Contact this Zulip server's administrators</a> for support.</p>
{% endif %}
</div>
</div>
</div>

View File

@@ -123,8 +123,8 @@ class OpenGraphTest(ZulipTestCase):
"Logging out | Zulip help center",
# Ideally we'd do something better here
[
"We're here to help! Email us at desdemona+admin@zulip.com with questions, feedback, or "
+ "feature requests."
"Your feedback helps us make Zulip better for everyone! Please contact us "
+ "with questions, suggestions, and feature requests."
],
["Click on the gear"],
)
@@ -155,8 +155,8 @@ class OpenGraphTest(ZulipTestCase):
# Probably we should make this "Zulip Help Center"
"No such article. | Zulip help center",
[
"No such article. | We're here to help!",
"Email us at desdemona+admin@zulip.com with questions, feedback, or feature requests.",
"No such article.",
"Your feedback helps us make Zulip better for everyone! Please contact us",
],
[],
# Test that our open graph logic doesn't throw a 500