mirror of https://github.com/zulip/zulip.git
templates: Use `root_domain_url` Django templates.
Per the issue #25045, this commit changes some occurences of `uri` appeared in variable `root_domain_uri`. Files affected are some html files that used this variables and a backend file `context_processors.py` that set it as a key.
This commit is contained in:
parent
02364dd69f
commit
ff48f3c489
|
@ -49,7 +49,7 @@ the registration flow has its own (nearly identical) copy of the fields below in
|
||||||
<input id="id_terms" class="required" type="checkbox" name="terms"
|
<input id="id_terms" class="required" type="checkbox" name="terms"
|
||||||
{% if form.terms.value() %}checked="checked"{% endif %} />
|
{% if form.terms.value() %}checked="checked"{% endif %} />
|
||||||
<span></span>
|
<span></span>
|
||||||
{% trans %}I agree to the <a href="{{ root_domain_uri }}/policies/terms" target="_blank" rel="noopener noreferrer">Terms of Service</a>.{% endtrans %}
|
{% trans %}I agree to the <a href="{{ root_domain_url }}/policies/terms" target="_blank" rel="noopener noreferrer">Terms of Service</a>.{% endtrans %}
|
||||||
</label>
|
</label>
|
||||||
{% if form.terms.errors %}
|
{% if form.terms.errors %}
|
||||||
{% for error in form.terms.errors %}
|
{% for error in form.terms.errors %}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
You have registered
|
You have registered
|
||||||
<code>{{ root_domain_uri }}/complete/apple/</code> as the callback URL
|
<code>{{ root_domain_url }}/complete/apple/</code> as the callback URL
|
||||||
for your Services ID in Apple’s developer console. You can enable “Sign
|
for your Services ID in Apple’s developer console. You can enable “Sign
|
||||||
in with Apple” for an app at
|
in with Apple” for an app at
|
||||||
<a href="https://developer.apple.com/account/resources/">Certificates,
|
<a href="https://developer.apple.com/account/resources/">Certificates,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
You have added
|
You have added
|
||||||
<code>{{ root_domain_uri }}/complete/github/</code> as the callback URL
|
<code>{{ root_domain_url }}/complete/github/</code> as the callback URL
|
||||||
in the OAuth application in GitHub. You can create OAuth apps from
|
in the OAuth application in GitHub. You can create OAuth apps from
|
||||||
<a href="https://github.com/settings/developers">GitHub’s developer
|
<a href="https://github.com/settings/developers">GitHub’s developer
|
||||||
site</a>.
|
site</a>.
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
You have added
|
You have added
|
||||||
<code>{{ root_domain_uri }}/complete/gitlab/</code> as the callback URL
|
<code>{{ root_domain_url }}/complete/gitlab/</code> as the callback URL
|
||||||
in the OAuth application in GitLab. You can register OAuth apps at
|
in the OAuth application in GitLab. You can register OAuth apps at
|
||||||
<a href="https://gitlab.com/profile/applications">GitLab
|
<a href="https://gitlab.com/profile/applications">GitLab
|
||||||
applications</a>.
|
applications</a>.
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<li>
|
<li>
|
||||||
You have configured your OAuth2 client to allow redirects to your
|
You have configured your OAuth2 client to allow redirects to your
|
||||||
server’s Google auth URL:
|
server’s Google auth URL:
|
||||||
<code>{{ root_domain_uri }}/complete/google/</code>.
|
<code>{{ root_domain_url }}/complete/google/</code>.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
You have set <code>{{ client_id_key_name }}</code> in
|
You have set <code>{{ client_id_key_name }}</code> in
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<nav class="portico-header">
|
<nav class="portico-header">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a class="brand logo" href="{{ root_domain_uri }}">
|
<a class="brand logo" href="{{ root_domain_url }}">
|
||||||
<svg role="img" aria-label="{{ _('Zulip') }}" xmlns="http://www.w3.org/2000/svg" viewBox="68.96 55.62 1742.12 450.43" height="25">
|
<svg role="img" aria-label="{{ _('Zulip') }}" xmlns="http://www.w3.org/2000/svg" viewBox="68.96 55.62 1742.12 450.43" height="25">
|
||||||
<path fill="hsl(0, 0%, 100%)" d="M473.09 122.97c0 22.69-10.19 42.85-25.72 55.08L296.61 312.69c-2.8 2.4-6.44-1.47-4.42-4.7l55.3-110.72c1.55-3.1-.46-6.91-3.64-6.91H129.36c-33.22 0-60.4-30.32-60.4-67.37 0-37.06 27.18-67.37 60.4-67.37h283.33c33.22-.02 60.4 30.3 60.4 67.35zM129.36 506.05h283.33c33.22 0 60.4-30.32 60.4-67.37 0-37.06-27.18-67.37-60.4-67.37H198.2c-3.18 0-5.19-3.81-3.64-6.91l55.3-110.72c2.02-3.23-1.62-7.1-4.42-4.7L94.68 383.6c-15.53 12.22-25.72 32.39-25.72 55.08 0 37.05 27.18 67.37 60.4 67.37zm522.5-124.15l124.78-179.6v-1.56H663.52v-48.98h190.09v34.21L731.55 363.24v1.56h124.01v48.98h-203.7V381.9zm338.98-230.14V302.6c0 45.09 17.1 68.03 47.43 68.03 31.1 0 48.2-21.77 48.2-68.03V151.76h59.09V298.7c0 80.86-40.82 119.34-109.24 119.34-66.09 0-104.96-36.54-104.96-120.12V151.76h59.48zm244.91 0h59.48v212.25h104.18v49.76h-163.66V151.76zm297 0v262.01h-59.48V151.76h59.48zm90.18 3.5c18.27-3.11 43.93-5.44 80.08-5.44 36.54 0 62.59 7 80.08 20.99 16.72 13.22 27.99 34.99 27.99 60.64 0 25.66-8.55 47.43-24.1 62.2-20.21 19.05-50.15 27.6-85.13 27.6-7.77 0-14.77-.39-20.21-1.17v93.69h-58.7V155.26zm58.7 118.96c5.05 1.17 11.27 1.55 19.83 1.55 31.49 0 50.92-15.94 50.92-42.76 0-24.1-16.72-38.49-46.26-38.49-12.05 0-20.21 1.17-24.49 2.33v77.37z"/>
|
<path fill="hsl(0, 0%, 100%)" d="M473.09 122.97c0 22.69-10.19 42.85-25.72 55.08L296.61 312.69c-2.8 2.4-6.44-1.47-4.42-4.7l55.3-110.72c1.55-3.1-.46-6.91-3.64-6.91H129.36c-33.22 0-60.4-30.32-60.4-67.37 0-37.06 27.18-67.37 60.4-67.37h283.33c33.22-.02 60.4 30.3 60.4 67.35zM129.36 506.05h283.33c33.22 0 60.4-30.32 60.4-67.37 0-37.06-27.18-67.37-60.4-67.37H198.2c-3.18 0-5.19-3.81-3.64-6.91l55.3-110.72c2.02-3.23-1.62-7.1-4.42-4.7L94.68 383.6c-15.53 12.22-25.72 32.39-25.72 55.08 0 37.05 27.18 67.37 60.4 67.37zm522.5-124.15l124.78-179.6v-1.56H663.52v-48.98h190.09v34.21L731.55 363.24v1.56h124.01v48.98h-203.7V381.9zm338.98-230.14V302.6c0 45.09 17.1 68.03 47.43 68.03 31.1 0 48.2-21.77 48.2-68.03V151.76h59.09V298.7c0 80.86-40.82 119.34-109.24 119.34-66.09 0-104.96-36.54-104.96-120.12V151.76h59.48zm244.91 0h59.48v212.25h104.18v49.76h-163.66V151.76zm297 0v262.01h-59.48V151.76h59.48zm90.18 3.5c18.27-3.11 43.93-5.44 80.08-5.44 36.54 0 62.59 7 80.08 20.99 16.72 13.22 27.99 34.99 27.99 60.64 0 25.66-8.55 47.43-24.1 62.2-20.21 19.05-50.15 27.6-85.13 27.6-7.77 0-14.77-.39-20.21-1.17v93.69h-58.7V155.26zm58.7 118.96c5.05 1.17 11.27 1.55 19.83 1.55 31.49 0 50.92-15.94 50.92-42.76 0-24.1-16.72-38.49-46.26-38.49-12.05 0-20.21 1.17-24.49 2.33v77.37z"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
@ -108,8 +108,8 @@
|
||||||
{% if not corporate_enabled %}
|
{% if not corporate_enabled %}
|
||||||
<a href="/help/">{{ _("Help center") }}</a>
|
<a href="/help/">{{ _("Help center") }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ root_domain_uri }}/policies/terms">{{ _("Terms of Service") }}</a>
|
<a href="{{ root_domain_url }}/policies/terms">{{ _("Terms of Service") }}</a>
|
||||||
<a href="{{ root_domain_uri }}/policies/privacy">{{ _("Privacy policy") }}</a>
|
<a href="{{ root_domain_url }}/policies/privacy">{{ _("Privacy policy") }}</a>
|
||||||
{% if corporate_enabled %}
|
{% if corporate_enabled %}
|
||||||
<a href="https://zulip.com/attribution/">{{ _("Website attributions") }}</a>
|
<a href="https://zulip.com/attribution/">{{ _("Website attributions") }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -2,23 +2,23 @@
|
||||||
<div class="header-main" id="top_navbar">
|
<div class="header-main" id="top_navbar">
|
||||||
<div class="float-left">
|
<div class="float-left">
|
||||||
{% if custom_logo_url %}
|
{% if custom_logo_url %}
|
||||||
<a class="brand logo" href="{{ root_domain_uri }}/"><img draggable="false" src="{{ custom_logo_url }}" class="portico-logo" alt="{{ _('Zulip') }}" content="Zulip" /></a>
|
<a class="brand logo" href="{{ root_domain_url }}/"><img draggable="false" src="{{ custom_logo_url }}" class="portico-logo" alt="{{ _('Zulip') }}" content="Zulip" /></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="brand logo">
|
<div class="brand logo">
|
||||||
<a href="{{ root_domain_uri }}/">
|
<a href="{{ root_domain_url }}/">
|
||||||
<svg class="brand-logo" role="img" aria-label="{{ _('Zulip') }}" xmlns="http://www.w3.org/2000/svg" viewBox="68.96 55.62 1742.12 450.43" height="25">
|
<svg class="brand-logo" role="img" aria-label="{{ _('Zulip') }}" xmlns="http://www.w3.org/2000/svg" viewBox="68.96 55.62 1742.12 450.43" height="25">
|
||||||
<path fill="hsl(0, 0%, 27%)" d="M473.09 122.97c0 22.69-10.19 42.85-25.72 55.08L296.61 312.69c-2.8 2.4-6.44-1.47-4.42-4.7l55.3-110.72c1.55-3.1-.46-6.91-3.64-6.91H129.36c-33.22 0-60.4-30.32-60.4-67.37 0-37.06 27.18-67.37 60.4-67.37h283.33c33.22-.02 60.4 30.3 60.4 67.35zM129.36 506.05h283.33c33.22 0 60.4-30.32 60.4-67.37 0-37.06-27.18-67.37-60.4-67.37H198.2c-3.18 0-5.19-3.81-3.64-6.91l55.3-110.72c2.02-3.23-1.62-7.1-4.42-4.7L94.68 383.6c-15.53 12.22-25.72 32.39-25.72 55.08 0 37.05 27.18 67.37 60.4 67.37zm522.5-124.15l124.78-179.6v-1.56H663.52v-48.98h190.09v34.21L731.55 363.24v1.56h124.01v48.98h-203.7V381.9zm338.98-230.14V302.6c0 45.09 17.1 68.03 47.43 68.03 31.1 0 48.2-21.77 48.2-68.03V151.76h59.09V298.7c0 80.86-40.82 119.34-109.24 119.34-66.09 0-104.96-36.54-104.96-120.12V151.76h59.48zm244.91 0h59.48v212.25h104.18v49.76h-163.66V151.76zm297 0v262.01h-59.48V151.76h59.48zm90.18 3.5c18.27-3.11 43.93-5.44 80.08-5.44 36.54 0 62.59 7 80.08 20.99 16.72 13.22 27.99 34.99 27.99 60.64 0 25.66-8.55 47.43-24.1 62.2-20.21 19.05-50.15 27.6-85.13 27.6-7.77 0-14.77-.39-20.21-1.17v93.69h-58.7V155.26zm58.7 118.96c5.05 1.17 11.27 1.55 19.83 1.55 31.49 0 50.92-15.94 50.92-42.76 0-24.1-16.72-38.49-46.26-38.49-12.05 0-20.21 1.17-24.49 2.33v77.37z"/>
|
<path fill="hsl(0, 0%, 27%)" d="M473.09 122.97c0 22.69-10.19 42.85-25.72 55.08L296.61 312.69c-2.8 2.4-6.44-1.47-4.42-4.7l55.3-110.72c1.55-3.1-.46-6.91-3.64-6.91H129.36c-33.22 0-60.4-30.32-60.4-67.37 0-37.06 27.18-67.37 60.4-67.37h283.33c33.22-.02 60.4 30.3 60.4 67.35zM129.36 506.05h283.33c33.22 0 60.4-30.32 60.4-67.37 0-37.06-27.18-67.37-60.4-67.37H198.2c-3.18 0-5.19-3.81-3.64-6.91l55.3-110.72c2.02-3.23-1.62-7.1-4.42-4.7L94.68 383.6c-15.53 12.22-25.72 32.39-25.72 55.08 0 37.05 27.18 67.37 60.4 67.37zm522.5-124.15l124.78-179.6v-1.56H663.52v-48.98h190.09v34.21L731.55 363.24v1.56h124.01v48.98h-203.7V381.9zm338.98-230.14V302.6c0 45.09 17.1 68.03 47.43 68.03 31.1 0 48.2-21.77 48.2-68.03V151.76h59.09V298.7c0 80.86-40.82 119.34-109.24 119.34-66.09 0-104.96-36.54-104.96-120.12V151.76h59.48zm244.91 0h59.48v212.25h104.18v49.76h-163.66V151.76zm297 0v262.01h-59.48V151.76h59.48zm90.18 3.5c18.27-3.11 43.93-5.44 80.08-5.44 36.54 0 62.59 7 80.08 20.99 16.72 13.22 27.99 34.99 27.99 60.64 0 25.66-8.55 47.43-24.1 62.2-20.21 19.05-50.15 27.6-85.13 27.6-7.77 0-14.77-.39-20.21-1.17v93.69h-58.7V155.26zm58.7 118.96c5.05 1.17 11.27 1.55 19.83 1.55 31.49 0 50.92-15.94 50.92-42.76 0-24.1-16.72-38.49-46.26-38.49-12.05 0-20.21 1.17-24.49 2.33v77.37z"/>
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% if page_is_help_center %}
|
{% if page_is_help_center %}
|
||||||
<span class="light"> | <a href="{{ root_domain_uri }}/help/">{{ doc_root_title }}</a></span>
|
<span class="light"> | <a href="{{ root_domain_url }}/help/">{{ doc_root_title }}</a></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page_is_api_center %}
|
{% if page_is_api_center %}
|
||||||
<span class="light"> | <a href="{{ root_domain_uri }}/api/">{{ doc_root_title }}</a></span>
|
<span class="light"> | <a href="{{ root_domain_url }}/api/">{{ doc_root_title }}</a></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page_is_policy_center %}
|
{% if page_is_policy_center %}
|
||||||
<span class="light"> | <a href="{{ root_domain_uri }}/policies/">{{ doc_root_title }}</a></span>
|
<span class="light"> | <a href="{{ root_domain_url }}/policies/">{{ doc_root_title }}</a></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -46,8 +46,8 @@
|
||||||
|
|
||||||
{% if find_team_link_disabled %}
|
{% if find_team_link_disabled %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ root_domain_uri }}/accounts/find/">{{ _('Find accounts') }}</a>
|
<a href="{{ root_domain_url }}/accounts/find/">{{ _('Find accounts') }}</a>
|
||||||
<a href="{{ root_domain_uri }}/new/">{{ _('New organization') }}</a>
|
<a href="{{ root_domain_url }}/new/">{{ _('New organization') }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -119,7 +119,7 @@ Form is validated both client-side using jquery-validation (see signup.js) and s
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<label for="source_realm_id" class="inline-block">{{ _('Import settings from existing Zulip account') }}
|
<label for="source_realm_id" class="inline-block">{{ _('Import settings from existing Zulip account') }}
|
||||||
<a href="{{ root_domain_uri }}/help/import-your-settings"><i class="fa fa-question-circle"></i></a>
|
<a href="{{ root_domain_url }}/help/import-your-settings"><i class="fa fa-question-circle"></i></a>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -224,7 +224,7 @@ Form is validated both client-side using jquery-validation (see signup.js) and s
|
||||||
<input id="id_terms" class="required" type="checkbox" name="terms"
|
<input id="id_terms" class="required" type="checkbox" name="terms"
|
||||||
{% if form.terms.value() %}checked="checked"{% endif %} />
|
{% if form.terms.value() %}checked="checked"{% endif %} />
|
||||||
<span></span>
|
<span></span>
|
||||||
{% trans %}I agree to the <a href="{{ root_domain_uri }}/policies/terms" target="_blank" rel="noopener noreferrer">Terms of Service</a>.{% endtrans %}
|
{% trans %}I agree to the <a href="{{ root_domain_url }}/policies/terms" target="_blank" rel="noopener noreferrer">Terms of Service</a>.{% endtrans %}
|
||||||
</label>
|
</label>
|
||||||
{% if form.terms.errors %}
|
{% if form.terms.errors %}
|
||||||
{% for error in form.terms.errors %}
|
{% for error in form.terms.errors %}
|
||||||
|
@ -278,7 +278,7 @@ Form is validated both client-side using jquery-validation (see signup.js) and s
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<p>
|
<p>
|
||||||
{% trans %}You can also change this setting <a href="{{ root_domain_uri }}/help/configure-email-visibility" target="_blank" rel="noopener noreferrer">after you join</a>.{% endtrans %}
|
{% trans %}You can also change this setting <a href="{{ root_domain_url }}/help/configure-email-visibility" target="_blank" rel="noopener noreferrer">after you join</a>.{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
</main>
|
</main>
|
||||||
<footer class="modal__footer">
|
<footer class="modal__footer">
|
||||||
|
|
|
@ -43,7 +43,7 @@ def common_context(user: UserProfile) -> Dict[str, Any]:
|
||||||
return {
|
return {
|
||||||
"realm_uri": user.realm.uri,
|
"realm_uri": user.realm.uri,
|
||||||
"realm_name": user.realm.name,
|
"realm_name": user.realm.name,
|
||||||
"root_domain_uri": settings.ROOT_DOMAIN_URI,
|
"root_domain_url": settings.ROOT_DOMAIN_URI,
|
||||||
"external_uri_scheme": settings.EXTERNAL_URI_SCHEME,
|
"external_uri_scheme": settings.EXTERNAL_URI_SCHEME,
|
||||||
"external_host": settings.EXTERNAL_HOST,
|
"external_host": settings.EXTERNAL_HOST,
|
||||||
"user_name": user.full_name,
|
"user_name": user.full_name,
|
||||||
|
@ -167,7 +167,7 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]:
|
||||||
"realm_uri": realm_uri,
|
"realm_uri": realm_uri,
|
||||||
"realm_name": realm_name,
|
"realm_name": realm_name,
|
||||||
"realm_icon": realm_icon,
|
"realm_icon": realm_icon,
|
||||||
"root_domain_uri": settings.ROOT_DOMAIN_URI,
|
"root_domain_url": settings.ROOT_DOMAIN_URI,
|
||||||
"apps_page_url": get_apps_page_url(),
|
"apps_page_url": get_apps_page_url(),
|
||||||
"apps_page_web": apps_page_web,
|
"apps_page_web": apps_page_web,
|
||||||
"open_realm_creation": settings.OPEN_REALM_CREATION,
|
"open_realm_creation": settings.OPEN_REALM_CREATION,
|
||||||
|
|
Loading…
Reference in New Issue