From 9d508a0ac0ce77a1d87dc488f69b6ad6dd3daba6 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Fri, 17 May 2019 13:07:23 +0200 Subject: [PATCH 1/2] 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 %} From 243c19384ebc4a4bc2305f0e46ad0689d3ffc5e4 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 30 May 2019 13:55:25 +0200 Subject: [PATCH 2/2] blocktrans trimmed --- readthedocs/templates/projects/project_version_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/templates/projects/project_version_detail.html b/readthedocs/templates/projects/project_version_detail.html index fbd7ab71007..b10c23d1307 100644 --- a/readthedocs/templates/projects/project_version_detail.html +++ b/readthedocs/templates/projects/project_version_detail.html @@ -21,7 +21,7 @@

Editing {{ version.slug }}

{% if not version.active and version.built %}

{% url "project_version_delete_html" project.slug version.slug as version_delete_url %} - {% blocktrans %} + {% blocktrans trimmed %} 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 %}