delete.html 2.21 KB
Newer Older
Kyle Fiedler committed
1 2 3 4 5 6 7 8 9
{% extends "wiki/base.html" %}
{% load wiki_tags i18n sekizai_tags %}
{% load url from future %}

{% block pagetitle %}{% trans "Delete article" %}{% endblock %}

{% block wiki_contents %}
  <section class="delete">
  <h1 class="page-header">{% trans "Delete" %} "{{ article.current_revision.title }}"</h1>
10

Kyle Fiedler committed
11 12 13 14
  {% 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>
  {% else %}
15

Kyle Fiedler committed
16
    {% if cannot_delete_children %}
17

Kyle Fiedler committed
18
      <p class="alert alert-error"><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>
19

Kyle Fiedler committed
20
    {% endif %}
21

Kyle Fiedler committed
22 23 24
    {% if delete_children %}

      <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>
25

Kyle Fiedler committed
26
      <h2>{% trans "Articles that will be deleted" %}</h2>
27

Kyle Fiedler committed
28 29 30 31 32 33 34 35
      <ul>
        {% for child in delete_children %}
        <li><a href="{% url 'wiki:get' article_id=child.article.id %}" target="_blank">{{ child.article }}</a></li>
        {% if delete_children_more %}
        <li><em>{% trans "...and more!" %}</em></li>
        {% endif %}
        {% endfor %}
      </ul>
36

Kyle Fiedler committed
37
    {% endif %}
38

Kyle Fiedler committed
39 40 41 42 43 44 45 46 47 48
    {% 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 %}
      <script type="text/javascript">
        $('#id_revision').val('{{ article.current_revision.id }}');
      </script>
      <div class="form-actions">
          <button type="submit" name="save_changes" class="btn btn-danger btn-large">
49
            <i class="icon fa fa-remove"></i>
Kyle Fiedler committed
50 51 52
            {% trans "Delete article" %}
          </button>
          <a href="{% url 'wiki:get' path=urlpath.path article_id=article.id %}" class="btn btn-large back">
53
            <i class="icon fa fa-circle-arrow-left"></i>
Kyle Fiedler committed
54 55
            {% trans "Go back" %}
          </a>
56
      </div>
Kyle Fiedler committed
57 58
    </form>
    {% endif %}
59

Kyle Fiedler committed
60 61 62 63 64
  {% endif %}
  </section>

{% endblock %}