-
Notifications
You must be signed in to change notification settings - Fork 711
/
documents.html
67 lines (63 loc) · 2.3 KB
/
documents.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{% extends 'mobile/base.html' %}
{% set styles = ('mobile-products',) %}
{% set classes = 'documents' %}
{% if subtopic %}
{% set headline = _(subtopic.title, 'DB: products.Topic.title') %}
{% else %}
{% set headline = _(topic.title, 'DB: products.Topic.title') %}
{% endif %}
{% set title = headline + ' | ' + _('{product} Help')|f(product=_(product.title, 'DB: products.Product.title')) %}
{% if subtopic %}
{% set return_url = url('products.documents', product_slug=product.slug, topic_slug=topic.slug) %}
{% else %}
{% set return_url = url('products.product', slug=product.slug) %}
{% endif %}
{% block content %}
{% if subtopic %}
<div class="filter-bar">
<a class="return-link" href="{{ return_url }}">
{{ _('Back to:') }} {{ _(topic.title, 'DB: products.Topic.title') }}
</a>
</div>
{% else %}
<div class="filter-bar">
<a class="return-link" href="{{ return_url }}">
{{ _('Back to:') }} {{ _(product.title, 'DB: products.Product.title') }}
</a>
</div>
{% endif %}
<ul class="document-list">
{% if not subtopic and subtopics %}
{# only show subtopics on the parent topic page #}
{% for subtopic in subtopics %}
<li>
<a href="{{ url('products.subtopics', product_slug=product.slug, topic_slug=topic.slug, subtopic_slug=subtopic.slug) }}">
{{ _(subtopic.title, 'DB: products.Topic.title') }}
</a>
</li>
{% endfor %}
{% endif %}
{% for document in documents %}
<li>
<a class="cf" href="{{ document['url'] }}">{{ document['document_title'] }}</a>
</li>
{% endfor %}
{% if product.questions_enabled(request.LANGUAGE_CODE) %}
<li class="community-support">
<a href="{{ url('wiki.document', 'get-community-support') }}">
{{ _('Get community support') }}
</a>
</li>
{% endif %}
</ul>
{% if fallback_documents %}
<h2>{{ _('In English') }}</h2>
{% for document in fallback_documents %}
{% if loop.first %}<ul class="document-list">{% endif %}
<li>
<a href="{{ document['url']|replace('/'+ settings.WIKI_DEFAULT_LANGUAGE +'/', '/' + request.LANGUAGE_CODE + '/') }}">{{ document['document_title'] }}</a>
</li>
{% if loop.last %}</ul>{% endif %}
{% endfor %}
{% endif %}
{% endblock %}