Skip to content

Commit d08cb8d

Browse files
authored
Add project: modal with instructions about adding a config file (#520)
This adds a button "I need help" that shows a modal with more instructions about how to add the required `.readthedocs.yaml`. I will need some help with the copy/instructions we want to show the customer. ![Screenshot_2024-11-05_15-52-03](https://github.com/user-attachments/assets/85b2c125-a2bd-4704-bfd6-b94ffba8d976) Closes #445
1 parent dd575fe commit d08cb8d

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

readthedocsext/theme/templates/projects/import_base.html

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends "projects/base.html" %}
22

3-
{% load i18n %}
4-
{% load crispy_forms_tags %}
3+
{% load blocktrans trans from i18n %}
4+
{% load crispy from crispy_forms_tags %}
55

66
{% block title %}
77
{% trans "Add project" %}
@@ -81,12 +81,44 @@ <h2 class="ui small header">{% trans "Help topics" %}</h2>
8181
{% if wizard.steps.prev %}
8282
<button class="ui button"
8383
name="wizard_goto_step"
84-
value="{{ wizard.steps.prev }}">{% trans "Previous" %}</button>
84+
value="{{ wizard.steps.prev }}">
85+
{% trans "Previous" %}
86+
</button>
8587
{% endif %}
8688

8789
{% if wizard.steps.next %}
8890
<input class="ui button primary" type="submit" value="{% trans "Next" %}" />
89-
{% else %}
91+
{% endif %}
92+
93+
{% if wizard.steps.current == "config" %}
94+
<div class="ui small modal" data-modal-id="i-need-help">
95+
<div class="header">{% trans "Add configuration file to your project" %}</div>
96+
<div class="content">
97+
<p>{% trans "These are the steps you need to follow:" %}</p>
98+
<ol>
99+
<li>
100+
{% trans "Create a <code>.readthedocs.yaml</code> file in your repository." %}
101+
</li>
102+
<li>
103+
{% trans "Copy the contents of one of our examples to your project's <code>.readthedocs.yaml</code>." %}
104+
</li>
105+
<li>{% trans "Merge this change to your project's repository." %}.</li>
106+
</ol>
107+
<p>
108+
{% trans "Once that's done Read the Docs will be able to build your project's documentation." %}
109+
</p>
110+
</div>
111+
<div class="actions">
112+
<div class="ui cancel button">{% trans "Close" %}</div>
113+
</div>
114+
</div>
115+
116+
<button data-bind="click: $root.show_modal('i-need-help')"
117+
data-contet="{% trans "I need help" %}"
118+
class="ui button">
119+
{% trans "I need help" %}
120+
</button>
121+
90122
<input class="ui button primary"
91123
type="submit"
92124
value="{% trans "This file exists" %}" />

0 commit comments

Comments
 (0)