mirror of https://github.com/zulip/zulip.git
portico: Add options to disable login and about links.
This gives us a great deal more flexibility for controlling the context of the portico footer.
This commit is contained in:
parent
de11e7c1b3
commit
0f4bbc8617
|
@ -24,11 +24,13 @@
|
|||
</div>
|
||||
|
||||
<div class="column-right top-links">
|
||||
{% if not only_sso %}
|
||||
{% if login_link_disabled %}
|
||||
{% elif not only_sso %}
|
||||
<a href="{{login_url}}">{{ _('Log in') }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if only_sso %}
|
||||
{% if register_link_disabled %}
|
||||
{% elif only_sso %}
|
||||
<a href="{{ url('login-sso') }}">{{ _('Log In') }}</a>
|
||||
{% else %}
|
||||
<a href="{{ url('register') }}">{{ _('Register') }}</a>
|
||||
|
@ -52,27 +54,35 @@
|
|||
<div class="footer">
|
||||
<div class="footer-main">
|
||||
<ul class="footer-navigation">
|
||||
{% if about_link_disabled %}
|
||||
{% else %}
|
||||
<li><a href="{{ server_uri }}/hello">{{ _('About') }}</a></li>
|
||||
{% if terms_of_service %}
|
||||
<li><span class="little-bullet">·</span></li>
|
||||
<li><a href="{{ server_uri }}/terms">{{ _('Legal') }}</a></li>
|
||||
{% endif %}
|
||||
{% if terms_of_service %}
|
||||
|
||||
{% if about_link_disabled %}
|
||||
{% else %}
|
||||
<li><span class="little-bullet">·</span></li>
|
||||
{% endif %}
|
||||
|
||||
<li><a href="{{ server_uri }}/terms">{{ _('Legal') }}</a></li>
|
||||
<li><span class="little-bullet">·</span></li>
|
||||
<li><a href="{{ server_uri }}/privacy">{{ _('Privacy') }}</a></li>
|
||||
{% endif %}
|
||||
{% if login_link_disabled %}
|
||||
{% else %}
|
||||
<li><span class="little-bullet">·</span></li>
|
||||
<li><a href="{{login_url}}">{{ _('Log in') }}</a></li>
|
||||
{% if not only_sso %}
|
||||
<li><span class="little-bullet">·</span></li>
|
||||
<li>
|
||||
{% endif %}
|
||||
{% if register_link_disabled %}
|
||||
{% elif only_sso %}
|
||||
{% else %}
|
||||
<a href="{{ url('register') }}">{{ _('Register') }}</a>
|
||||
<li><span class="little-bullet">·</span></li>
|
||||
<li><a href="{{ url('register') }}">{{ _('Register') }}</a></li>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% if open_realm_creation %}
|
||||
<a href="{{ server_uri }}/create_realm">{{ _('Create new organization') }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li><span class="little-bullet">·</span></li>
|
||||
<li><a href="{{ server_uri }}/create_realm">{{ _('Create new organization') }}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -20,6 +20,8 @@ def add_settings(request):
|
|||
return {
|
||||
'custom_logo_url': settings.CUSTOM_LOGO_URL,
|
||||
'register_link_disabled': settings.REGISTER_LINK_DISABLED,
|
||||
'login_link_disabled': settings.LOGIN_LINK_DISABLED,
|
||||
'about_link_disabled': settings.ABOUT_LINK_DISABLED,
|
||||
'show_oss_announcement': settings.SHOW_OSS_ANNOUNCEMENT,
|
||||
'zulip_admin': settings.ZULIP_ADMINISTRATOR,
|
||||
'terms_of_service': settings.TERMS_OF_SERVICE,
|
||||
|
|
|
@ -153,6 +153,8 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '',
|
|||
'ZULIP_COM': False,
|
||||
'SHOW_OSS_ANNOUNCEMENT': False,
|
||||
'REGISTER_LINK_DISABLED': False,
|
||||
'LOGIN_LINK_DISABLED': False,
|
||||
'ABOUT_LINK_DISABLED': False,
|
||||
'CUSTOM_LOGO_URL': None,
|
||||
'VERBOSE_SUPPORT_OFFERS': False,
|
||||
'STATSD_HOST': '',
|
||||
|
|
Loading…
Reference in New Issue