aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/wiki/delete.html
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-18 17:35:58 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-18 17:35:58 +0100
commit9dd3a0b3d87a0fe3162a403b891aab1e26dfffe1 (patch)
tree2b69fb2e34fe438bc8b391c8820624a0dae707e7 /pydis_site/templates/wiki/delete.html
parentPrevent accidental submission of link plugin form (diff)
Delete/Error/Move/Permission Denied pages
Diffstat (limited to 'pydis_site/templates/wiki/delete.html')
-rw-r--r--pydis_site/templates/wiki/delete.html109
1 files changed, 69 insertions, 40 deletions
diff --git a/pydis_site/templates/wiki/delete.html b/pydis_site/templates/wiki/delete.html
index afb4140d..1be82fa9 100644
--- a/pydis_site/templates/wiki/delete.html
+++ b/pydis_site/templates/wiki/delete.html
@@ -1,67 +1,96 @@
{% extends "wiki/base.html" %}
-{% load wiki_tags i18n sekizai_tags %}
+{% load wiki_tags sekizai_tags %}
-{% block wiki_pagetitle %}{% trans "Delete article" %}{% endblock %}
+{% block wiki_pagetitle %}Delete Article{% endblock %}
{% block wiki_contents %}
- <h1 class="page-header">{% trans "Delete" %} "{{ article.current_revision.title }}"</h1>
+ <h1 class="title is-1">Delete "{{ article.current_revision.title }}"</h1>
{% if cannot_delete_root %}
- <p class="lead">{% trans "You cannot delete a root article." %}</p>
- <p><a href="{% url 'wiki:get' path=urlpath.path article_id=article.id %}">{% trans "Go back" %}</a></p>
+ <div class="message is-warning">
+ <div class="message-body">
+ <p>
+ You cannot delete the root article.
+ </p>
+
+ <a href="{% url 'wiki:get' path=urlpath.path article_id=article.id %}" class="button is-primary">
+ <span class="icon">
+ <i class="fas fa-arrow-left"></i>
+ </span>
+ <span>Go back</span>
+ </a>
+ </div>
+ </div>
{% else %}
-
{% if cannot_delete_children %}
-
- <p class="alert alert-danger"><strong>{% trans "You cannot delete this article because you do not have permission to delete articles with children. Try to remove the children manually one-by-one." %}</strong></p>
-
+ <div class="message is-warning">
+ <div class="message-body">
+ <p>
+ You do not have permission to delete articles that have children.
+ </p>
+
+ <a href="{% url 'wiki:get' path=urlpath.path article_id=article.id %}" class="button is-primary">
+ <span class="icon">
+ <i class="fas fa-arrow-left"></i>
+ </span>
+ <span>Go back</span>
+ </a>
+ </div>
+ </div>
{% endif %}
{% if delete_children %}
+ <div class="message">
+ <div class="message-body">
+ <p>
+ You are deleting an article with children. If you delete this article, then its children will also be deleted.
+ </p>
+ <p>
+ If you choose to purge this article, note that its children will also be purged.
+ </p>
+ </div>
+ </div>
- <p class="lead">{% trans "You are deleting an article. This means that its children will be deleted as well. If you choose to purge, children will also be purged!" %}</p>
-
- <h2>{% trans "Articles that will be deleted" %}</h2>
+ <h2 class="title is-2">Child articles</h2>
<ul>
{% for child in delete_children %}
- <li><a href="{% url 'wiki:get' article_id=child.article.id %}" target="_blank">{{ child.article }}</a></li>
+ <li><a href="{% url 'wiki:get' article_id=child.article.id %}" target="_blank">{{ child.article }}</a></li>
+ {% endfor %}
+
{% if delete_children_more %}
- <li><em>{% trans "...and more!" %}</em></li>
+ <li><em>"...and more!"</em></li>
{% endif %}
- {% endfor %}
</ul>
{% endif %}
{% if not cannot_delete_children %}
- <p class="lead">{% trans "You are deleting an article. Please confirm." %}</p>
-
- <form method="POST" class="form-horizontal">
- {% wiki_form delete_form %}
- <div class="form-group form-actions">
- <div class="col-lg-2"></div>
- <div class="col-lg-10">
- <a href="{% url 'wiki:get' path=urlpath.path article_id=article.id %}" class="btn btn-default">
- <span class="fa fa-arrow-left"></span>
- {% trans "Go back" %}
- </a>
- <button type="submit" name="save_changes" class="btn btn-danger">
- <span class="fa fa-trash-o"></span>
- {% trans "Delete article" %}
- </button>
- </div>
- </div>
- </form>
+ <p>Please confirm that you would like to delete this article.</p>
+
+ <form method="POST">
+ {% wiki_form delete_form %}
+
+ <a href="{% url 'wiki:get' path=urlpath.path article_id=article.id %}" class="button is-white">
+ <span class="icon">
+ <i class="fas fa-arrow-left"></i>
+ </span>
+ <span>Go back</span>
+ </a>
+ <button type="submit" name="save_changes" class="button is-danger">
+ <span class="icon">
+ <i class="fas fa-trash"></i>
+ </span>
+ <span>Delete Article</span>
+ </button>
+ </form>
{% endif %}
-
{% endif %}
-{% addtoblock "js" %}
-<script type="text/javascript">
- $('#id_revision').val('{{ article.current_revision.id }}');
-</script>
-{% endaddtoblock %}
-
+ {% addtoblock "js" %}
+ <script type="text/javascript">
+ $('#id_revision').val('{{ article.current_revision.id }}');
+ </script>
+ {% endaddtoblock %}
{% endblock %}