зеркало из https://github.com/mozilla/hive-django.git
show link to Discourse in navbar if Discourse SSO is enabled.
This commit is contained in:
Родитель
baf1ff3990
Коммит
e0a1aed07a
|
@ -0,0 +1,4 @@
|
|||
from django.conf import settings
|
||||
|
||||
def discourse_sso_origin(request=None):
|
||||
return {'DISCOURSE_SSO_ORIGIN': settings.DISCOURSE_SSO_ORIGIN}
|
|
@ -115,6 +115,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
|||
"django.contrib.messages.context_processors.messages",
|
||||
"hive.context_processors.origin",
|
||||
"hive.context_processors.site",
|
||||
"discourse_sso.context_processors.discourse_sso_origin",
|
||||
)
|
||||
|
||||
if GA_TRACKING_ID:
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<div class="collapse navbar-collapse" id="navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{% url 'mentoring.views.index' %}">Expertise Exchange</a></li>
|
||||
{% if DISCOURSE_SSO_ORIGIN %}<li><a href="{{ DISCOURSE_SSO_ORIGIN }}">Discourse</a></li>{% endif %}
|
||||
<li><a href="{% url 'faq' %}">FAQ</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
|
|
Загрузка…
Ссылка в новой задаче