Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move version "Clean" button to details page #5706

Merged
merged 2 commits into from
May 30, 2019
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
15 changes: 15 additions & 0 deletions readthedocs/templates/projects/project_version_detail.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends "projects/base_project.html" %}

{% load i18n %}
{% load privacy_tags %}

{% block title %}{{ version.slug }} - {{ version.project.name }}{% endblock %}

Expand All @@ -15,6 +16,20 @@

{% block content %}
<h2> Editing {{ version.slug }} </h2>

{% if request.user|is_admin:project %}
{% if not version.active and version.built %}
<p class="empty">
{% url "project_version_delete_html" project.slug version.slug as version_delete_url %}
{% blocktrans trimmed %}
This version is inactive but its documentation is still available online.
You can <a href="{{ version_delete_url }}">delete this version's documentation</a> if you want to remove it completely.
{% endblocktrans %}
</p>
{% endif %}
{% endif %}


<form method="post" action=".">
{% csrf_token %}
{{ form.as_p }}
Expand Down
3 changes: 0 additions & 3 deletions readthedocs/templates/projects/project_version_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ <h1>{% trans "Inactive Versions" %}</h1>

{% if request.user|is_admin:project %}
<ul class="module-item-menu">
{% if version.built %}
<li><a href="{% url "project_version_delete_html" project.slug version.slug %}">{% trans "Clean" %}</a></li>
{% endif %}
<li><a href="{% url "project_version_detail" project.slug version.slug %}">{% trans "Edit" %}</a></li>
</ul>
{% endif %}
Expand Down