Commit 3ef3532a authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[ui] Make the documentation link configurable

The top bar user guide link is currently targetting the static
pages delivered by the site. This patches changes that and makes
it configurable through the settings.

Defaults to https://www.idiap.ch/software/beat/docs/beat/docs/stable/beat.web/doc/user/index.html
parent c0413383
Pipeline #25965 passed with stage
in 16 minutes and 14 seconds
......@@ -465,3 +465,11 @@ ABSOLUTE_URL_OVERRIDES = {
}
SERIALIZATION_MODULES = { 'json' : 'beat.web.utils.activity_stream_serializer' }
##############################################################################
#
# Documentation
#
##############################################################################
DOCUMENTATION_LINK = "https://www.idiap.ch/software/beat/docs/beat/docs/stable/beat.web/doc/user/index.html"
\ No newline at end of file
......@@ -112,7 +112,7 @@
</ul>
</div>
</li>
<li><p class="navbar-btn"><a class="btn btn-sm btn-default" title="User Guide" href="{% static "guide/index.html" %}"><i class="fa fa-book fa-fw fa-lg"></i> User Guide</a></p></li>
<li><p class="navbar-btn"><a class="btn btn-sm btn-default" title="User Guide" href="{{ documentation_link }}" target="_blank"><i class="fa fa-book fa-fw fa-lg"></i> User Guide</a></p></li>
{% if PREREGISTRATION_ONLY %}
<li><p class="navbar-btn"><a class="btn btn-sm btn-primary" title="Pre-register now" href="{% url 'pre-registration' %}"><i class="fa fa-plus fa-fw fa-lg"></i> Sign-up</a></p></li>
......@@ -138,7 +138,7 @@
</ul>
</div>
</li>
<li class="visible-xs"><a href="{% static "guide/index.html" %}"><i class="fa fa-book fa-fw"></i> User Guide</a></li>
<li class="visible-xs"><a href="{{ documentation_link }}" target="_blank"><i class="fa fa-book fa-fw"></i> User Guide</a></li>
<li class="hidden-xs"><a class="menu-icon" title="User Guide" data-toggle="tooltip" data-placement="bottom" href="{% static "guide/index.html" %}"><i class="fa fa-book fa-fw"></i></a></li>
{% if request.user.is_superuser %}
......
......@@ -44,6 +44,7 @@ register = template.Library()
def navbar(context):
return {
'request': context['request'],
'documentation_link': settings.DOCUMENTATION_LINK,
'public_urls': [
('experiments', 'experiments:public-list'),
(False, ''),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment