Skip to content

Commit d740ffa

Browse files
Add Pull Request builds page to settings (#206)
* Add Pull Request builds page to settings This is a basic form for now, but we can spruce it up before it goes live. * Apply suggestions from code review Co-authored-by: Anthony <[email protected]> * Rename file * Oops, remove old file too. * Apply suggestions from code review Co-authored-by: Anthony <[email protected]> * Fix indent * Don't disable form since it breaks the link to integrations --------- Co-authored-by: Anthony <[email protected]>
1 parent 6eb777d commit d740ffa

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

readthedocsext/theme/templates/projects/edit_base.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
<a class="item {% block project_domains_active %}{% endblock %}" href="{% url "projects_domains" project.slug %}">
2424
{% trans "Domains" %}
2525
</a>
26+
<a class="item {% block project_pull_requests_active %}{% endblock %}" href="{% url "projects_pull_requests" project.slug %}">
27+
{% trans "Pull request builds" %}
28+
</a>
2629
{% if not USE_ORGANIZATIONS %}
2730
<a class="item {% block project_users_active %}{% endblock %}" href="{% url "projects_users" project.slug %}">
2831
{% trans "Maintainers" %}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{% extends "projects/project_edit_base.html" %}
2+
3+
{% load i18n %}
4+
{% load static %}
5+
{% load crispy_forms_filters %}
6+
7+
{% block title %}{% trans "Pull request builds" %}{% endblock %}
8+
9+
{% block project_pull_requests_active %}active{% endblock %}
10+
{% block project_edit_content_header %}{% trans "Pull request builds" %}{% endblock %}
11+
12+
{% block project_edit_content %}
13+
<p>
14+
{% blocktrans trimmed %}
15+
Enable builds for your pull requests and easily preview changes to your documentation.
16+
{% endblocktrans %}
17+
</p>
18+
19+
<form class="ui form" method="post" action=".">
20+
{% csrf_token %}
21+
{{ form | crispy }}
22+
23+
<input class="ui {% if form.errors and form.is_disabled %}disabled{% endif %} primary button" type="submit"
24+
value="{% trans " Update" %}">
25+
</form>
26+
{% endblock %}
27+
28+
{% block project_edit_sidebar_help_topics %}
29+
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/en/stable/pull-requests.html" text="Pull
30+
request builds" is_external=True class="item" %}
31+
{% endblock project_edit_sidebar_help_topics %}

0 commit comments

Comments
 (0)