Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions readthedocsext/theme/templates/projects/edit_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
<a class="item {% block project_domains_active %}{% endblock %}" href="{% url "projects_domains" project.slug %}">
{% trans "Domains" %}
</a>
<a class="item {% block project_pull_requests_active %}{% endblock %}" href="{% url "projects_pull_requests" project.slug %}">
{% trans "Pull request builds" %}
</a>
{% if not USE_ORGANIZATIONS %}
<a class="item {% block project_users_active %}{% endblock %}" href="{% url "projects_users" project.slug %}">
{% trans "Maintainers" %}
Expand Down
31 changes: 31 additions & 0 deletions readthedocsext/theme/templates/projects/pull_requests_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{% extends "projects/project_edit_base.html" %}

{% load i18n %}
{% load static %}
{% load crispy_forms_filters %}

{% block title %}{% trans "Pull request builds" %}{% endblock %}

{% block project_pull_requests_active %}active{% endblock %}
{% block project_edit_content_header %}{% trans "Pull request builds" %}{% endblock %}

{% block project_edit_content %}
<p>
{% blocktrans trimmed %}
Enable builds for your pull requests and easily preview changes to your documentation.
{% endblocktrans %}
</p>

<form class="ui form" method="post" action=".">
{% csrf_token %}
{{ form | crispy }}

<input class="ui {% if form.errors and form.is_disabled %}disabled{% endif %} primary button" type="submit"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works okay for now, I've noted to undo this pattern with readthedocs/readthedocs.org#11270

value="{% trans " Update" %}">
</form>
{% endblock %}

{% block project_edit_sidebar_help_topics %}
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/en/stable/pull-requests.html" text="Pull
request builds" is_external=True class="item" %}
{% endblock project_edit_sidebar_help_topics %}