Skip to content

Commit

Permalink
Move version "Clean" button to details page (#5706)
Browse files Browse the repository at this point in the history
Move version "Clean" button to details page
  • Loading branch information
humitos authored May 30, 2019
2 parents 900c575 + 243c193 commit 6a84ae6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
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

0 comments on commit 6a84ae6

Please sign in to comment.