-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
footer.html
146 lines (132 loc) · 4.87 KB
/
footer.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!-- Inserted RTD Footer -->
{% load i18n %}
<div class="injected">
{% if not new_theme %}
<div class="rst-versions rst-badge" data-toggle="rst-versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> </span>
v: {{ current_version }}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
{% endif %}
{% block versions %}
{% if translations %}
<dl>
<dt>{% trans "Languages" %}</dt>
{# Output the main project language since it isn't included in translations list #}
{% if main_project.language == current_language %} <strong> {% endif %}
<dd><a href="{{ main_project.get_docs_url }}{{ path }}">{{ main_project.language }}</a></dd>
{% if main_project.language == current_language %} </strong> {% endif %}
{# regroup to make language_list unique per language #}
{% regroup translations by language as language_list %}
{% for group in language_list %}
{% for translation in group.list %}
{% if translation.language != main_project.language %}
{% if translation.language == current_language %} <strong> {% endif %}
<dd><a href="{{ translation.get_docs_url }}{{ path }}">{{ translation.language }}</a></dd>
{% if translation.language == current_language %} </strong> {% endif %}
{% endif %}
{% endfor %}
{% endfor %}
</dl>
{% endif %}
{% if not project.single_version and versions|length >= 1 %}
<dl>
<dt>{% trans "Versions" %}</dt>
{% for version in versions %}
{% if version.verbose_name == current_version %} <strong> {% endif %}
<dd><a href="{{ version.get_subdomain_url }}{{ path|default_if_none:"" }}">{{ version.slug }}</a></dd>
{% if version.verbose_name == current_version %} </strong> {% endif %}
{% endfor %}
</dl>
{% endif %}
{% endblock %}
{% block downloads %}
{% if downloads %}
<dl>
<dt>{% trans "Downloads" %}</dt>
{% for name, url in downloads.items %}
<dd><a href="{{ url }}">{{ name }}</a></dd>
{% endfor %}
</dl>
{% endif %}
{% endblock %}
{% block readthedocs %}
<dl>
{# We hardcode the URLS because we don't have access to the URLCONF of the main app from proxito #}
<!-- These are kept as relative links for internal installs that are http -->
<dt>{% trans "On Read the Docs" %}</dt>
<dd>
<a href="//{{ settings.PRODUCTION_DOMAIN }}/projects/{{ project.slug }}/">{% trans "Project Home" %}</a>
</dd>
<dd>
<a href="//{{ settings.PRODUCTION_DOMAIN }}/projects/{{ project.slug }}/builds/">{% trans "Builds" %}</a>
</dd>
<dd>
<a href="//{{ settings.PRODUCTION_DOMAIN }}/projects/{{ project.slug }}/downloads/">{% trans "Downloads" %}</a>
</dd>
</dl>
{% endblock %}
{% block vcs %}
{% if github_edit_url %}
<dl>
<dt>{% trans "On GitHub" %}</dt>
<dd>
<a href="{{ github_view_url }}">{% trans "View" %}</a>
</dd>
{% if version.is_editable %}
<dd>
<a href="{{ github_edit_url }}">{% trans "Edit" %}</a>
</dd>
{% endif %}
</dl>
{% elif bitbucket_url %}
<dl>
<dt>{% trans "On Bitbucket" %}</dt>
<dd>
<a href="{{ bitbucket_url }}">{% trans "Edit" %}</a>
</dd>
</dl>
{% elif gitlab_edit_url %}
<dl>
<dt>{% trans "On GitLab" %}</dt>
<dd>
<a href="{{ gitlab_view_url }}">{% trans "View" %}</a>
</dd>
{% if version.is_editable %}
<dd>
<a href="{{ gitlab_edit_url }}">{% trans "Edit" %}</a>
</dd>
{% endif %}
</dl>
{% endif %}
{% endblock %}
{% block search %}
<dl>
<dt>{% trans "Search" %}</dt>
<dd>
<div style="padding: 6px;">
{# We hardcode the URLS because we don't have access to the URLCONF of the main app from proxito #}
<form id="flyout-search-form" class="wy-form" target="_blank" action="//{{ settings.PRODUCTION_DOMAIN }}/projects/{{ project.slug }}/search/" method="get">
<input type="text" name="q" placeholder="{% trans "Search docs" %}">
</form>
</div>
</dd>
</dl>
{% endblock %}
{% block auth %}
{% endblock %}
<hr/>
{% block footer %}
<small>
<span>{% trans "Hosted by" %} <a href="https://readthedocs.org">Read the Docs</a></span>
<span> · </span>
<a href="https://docs.readthedocs.io/page/privacy-policy.html">{% trans "Privacy Policy" %}</a>
</small>
{% endblock %}
{% if not new_theme %}
</div>
</div>
{% endif %}
</div>