From 1a8ea0dd7c65d1eb6c164be82ab7b418c028d9a0 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Fri, 17 May 2019 13:07:23 +0200 Subject: [PATCH] Move version "Clean" button to details page Instead of showing the "Clean" button next to a version in the listing, this button is moved to the detail page with an explanation about what it does. --- .../projects/project_version_detail.html | 15 +++++++++++++++ .../templates/projects/project_version_list.html | 3 --- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/readthedocs/templates/projects/project_version_detail.html b/readthedocs/templates/projects/project_version_detail.html index 593e4475043..40687ed4d39 100644 --- a/readthedocs/templates/projects/project_version_detail.html +++ b/readthedocs/templates/projects/project_version_detail.html @@ -1,6 +1,7 @@ {% extends "projects/base_project.html" %} {% load i18n %} +{% load privacy_tags %} {% block title %}{{ version.slug }} - {{ version.project.name }}{% endblock %} @@ -15,6 +16,20 @@ {% block content %}

Editing {{ version.slug }}

+ + {% if request.user|is_admin:project %} + {% if not version.active and version.built %} +

+ {% url "project_version_delete_html" project.slug version.slug as version_delete_url %} + {% blocktrans %} + This version is inactive but its documentation is still available online. + You can delete this version completely if you want to remove it completely. + {% endblocktrans %} +

+ {% endif %} + {% endif %} + +
{% csrf_token %} {{ form.as_p }} diff --git a/readthedocs/templates/projects/project_version_list.html b/readthedocs/templates/projects/project_version_list.html index f85f3be0de7..695770b196e 100644 --- a/readthedocs/templates/projects/project_version_list.html +++ b/readthedocs/templates/projects/project_version_list.html @@ -104,9 +104,6 @@

{% trans "Inactive Versions" %}

{% if request.user|is_admin:project %} {% endif %}