mirror of https://github.com/zulip/zulip.git
Rename enterprise template variable to not_enterprise.
The problem here is that some error-related templates render without the context managers that we specify, and so we want the handling of "the context was not set" to default to the enterprise case (because the enterprise version will work basically fine on !enterprise, but the opposite is not true because the enterprise distribution doesn't even have the templates for certain !enterprise pages that may be linked to). (imported from commit 7547311d87e048d33221587f44b82fe0ba320ca1)
This commit is contained in:
parent
98b59f551a
commit
e64472cd32
|
@ -56,10 +56,10 @@
|
|||
download <a href="https://zulip.com/dist/apps/mac/Zulip-0.3.8%20NoUpdate.dmg">this version</a> instead.</p></em>
|
||||
|
||||
<p style="text-align: center">
|
||||
{% if enterprise %}
|
||||
<a href="https://zulip.com/dist/apps/sso/mac/Zulip-latest.dmg" class="btn btn-large btn-primary btn-app-download"><i class="icon-vector-download"></i> Download Zulip for Mac</a>
|
||||
{% else %}
|
||||
{% if not_enterprise %}
|
||||
<a href="https://zulip.com/dist/apps/mac/Zulip-latest.dmg" class="btn btn-large btn-primary btn-app-download"><i class="icon-vector-download"></i> Download Zulip for Mac</a>
|
||||
{% else %}
|
||||
<a href="https://zulip.com/dist/apps/sso/mac/Zulip-latest.dmg" class="btn btn-large btn-primary btn-app-download"><i class="icon-vector-download"></i> Download Zulip for Mac</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
|
@ -83,10 +83,10 @@ sudo apt-get install zulip-desktop
|
|||
|
||||
|
||||
<h3>Other</h3>
|
||||
{% if enterprise %}
|
||||
<p>We provide a <a href="https://zulip.com/dist/apps/sso/linux/zulip-desktop_latest.bin.tar.gz">binary tarball</a> of the Zulip application, built for 64-bit systems.
|
||||
{% else %}
|
||||
{% if not_enterprise %}
|
||||
<p>We provide a <a href="https://zulip.com/dist/apps/linux/zulip-desktop_latest.bin.tar.gz">binary tarball</a> of the Zulip application, built for 64-bit systems.
|
||||
{% else %}
|
||||
<p>We provide a <a href="https://zulip.com/dist/apps/sso/linux/zulip-desktop_latest.bin.tar.gz">binary tarball</a> of the Zulip application, built for 64-bit systems.
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
@ -100,10 +100,10 @@ sudo apt-get install zulip-desktop
|
|||
Solitaire, obviously.)</p>
|
||||
|
||||
<p style="text-align: center">
|
||||
{% if enterprise %}
|
||||
<a href="https://zulip.com/dist/apps/sso/win/zulip-latest.exe" class="btn btn-large btn-primary btn-app-download"><i class="icon-vector-download"></i> Download Zulip for Windows</a>
|
||||
{% else %}
|
||||
{% if not_enterprise %}
|
||||
<a href="https://zulip.com/dist/apps/win/zulip-latest.exe" class="btn btn-large btn-primary btn-app-download"><i class="icon-vector-download"></i> Download Zulip for Windows</a>
|
||||
{% else %}
|
||||
<a href="https://zulip.com/dist/apps/sso/win/zulip-latest.exe" class="btn btn-large btn-primary btn-app-download"><i class="icon-vector-download"></i> Download Zulip for Windows</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<![endif]-->
|
||||
<link href="/static/favicon.ico?v=2" rel="shortcut icon">
|
||||
|
||||
{% if not enterprise %}
|
||||
{% if not_enterprise %}
|
||||
<script type="text/javascript">var dropboxAppKey = "{{ dropboxAppKey }}";</script>
|
||||
{# mixpanel #}
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -24,7 +24,7 @@ hence the name.
|
|||
|
||||
<div class="column-right top-links">
|
||||
<a href="{{login_url}}">Log in</a>
|
||||
{% if enterprise %}
|
||||
{% if not_enterprise %}
|
||||
<a href="{% url 'register' %}">Sign up</a>
|
||||
{% else %}
|
||||
<a href="{% url 'signup' %}">Sign up</a>
|
||||
|
@ -51,10 +51,10 @@ hence the name.
|
|||
<li><a href="{{login_url}}">Log in</a></li>
|
||||
<li><span class="little-bullet">·</span></li>
|
||||
<li>
|
||||
{% if enterprise %}
|
||||
<a href="{% url 'register' %}">Sign up</a>
|
||||
{% else %}
|
||||
{% if not_enterprise %}
|
||||
<a href="{% url 'signup' %}">Sign up</a>
|
||||
{% else %}
|
||||
<a href="{% url 'register' %}">Sign up</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{# We only want the mixpanel badge on the front page #}
|
||||
|
|
|
@ -7,7 +7,10 @@ from zproject.backends import password_auth_enabled
|
|||
def add_settings(request):
|
||||
return {
|
||||
'full_navbar': settings.FULL_NAVBAR,
|
||||
'enterprise': settings.ENTERPRISE,
|
||||
# We use the not_enterprise variable name so that templates
|
||||
# will render even if the appropriate context is not provided
|
||||
# to the template
|
||||
'not_enterprise': not settings.ENTERPRISE,
|
||||
'zulip_admin': settings.ZULIP_ADMINISTRATOR,
|
||||
'password_auth_enabled': password_auth_enabled(),
|
||||
'login_url': settings.HOME_NOT_LOGGED_IN,
|
||||
|
|
Loading…
Reference in New Issue