Skip to content

Commit ba1b458

Browse files
committed
Filetreediff: expose it for users that have it enabled
We don't expose it to all the users yet, but we want to expose it for those that we already enabled it on the Django Admin. Requires readthedocs/readthedocs.org#11977
1 parent b3ed3cf commit ba1b458

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

readthedocsext/theme/templates/projects/addons_form.html

+13
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
<a class="item" data-tab="notifications">{% trans "Notifications" %}</a>
4949
<a class="item" data-tab="analytics">{% trans "Analytics" %}</a>
5050
<a class="item" data-tab="docdiff">{% trans "Visual diff" %}</a>
51+
{# Only show File Tree Diff if it was previously enabled from Django Admin #}
52+
{% if form.filetreediff_enabled %}
53+
<a class="item" data-tab="filetreediff">{% trans "File tree diff" %}</a>
54+
{% endif %}
5155
<a class="item" data-tab="link-previews">{% trans "Link previews" %}</a>
5256
<a class="item" data-tab="hotkeys">{% trans "Hotkeys" %}</a>
5357
<a class="item" data-tab="advanced">{% trans "Advanced" %}</a>
@@ -98,6 +102,15 @@
98102
</div>
99103
{% endblock addons_docdiff %}
100104

105+
{% block addons_filetreediff %}
106+
{% if form.filetreediff_enabled %}
107+
<div class="ui tab" data-tab="filetreediff">
108+
{{ form.filetreediff_enabled | as_crispy_field }}
109+
{{ form.filetreediff_ignored_files | as_crispy_field }}
110+
</div>
111+
{% endif %}
112+
{% endblock addons_filetreediff %}
113+
101114
{% block addons_link_previews %}
102115
<div class="ui tab" data-tab="link-previews">
103116
{{ form.linkpreviews_enabled | as_crispy_field }}

0 commit comments

Comments
 (0)