From 9d508a0ac0ce77a1d87dc488f69b6ad6dd3daba6 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..fbd7ab71007 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's documentation 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 %}