help: Fix link to index page being present on index page.

Fixes #3613.
This commit is contained in:
Tim Abbott 2017-02-18 14:58:54 -08:00
parent 6ba1cd797b
commit bbecd41376
2 changed files with 4 additions and 0 deletions

View File

@ -6,9 +6,11 @@
<div class="app terms-page">
<div class="app-main markdown">
{% if not_index_page %}
<div class="back-to-home">
<a href="/help/"><div class="icon-vector-chevron-left"></div>Home</a>
</div>
{% endif %}
{{ article|render_markdown_path }}
<div id="footer" class="documentation-footer">
<hr />

View File

@ -66,6 +66,8 @@ class HelpView(ApiURLView):
context["article"] = path
else:
context["article"] = self.get_path("missing")
# For disabling the "Back to home" on the homepage
context["not_index_page"] = not path.endswith("/index.md")
return context
def get(self, request, article=""):