{% comment %}

  This reusable code is shared between different templates and different inheritors of
  BaseRevision.

{% endcomment %}


{% load wiki_tags i18n %}
{% if not hidedate %}{{ revision.created }} {% endif %}
{% if not hidenumber %}(#{{ revision.revision_number }}) {% trans "by" %}{% endif %}
{% if revision.user %}
  {{ revision.user }}
{% else %}
  {% if not revision.ip_address %}
    {% trans "anonymous (IP not logged)" %}
  {% else %}
    {% if article|can_moderate:user %}
      {{ revision.ip_address }}
    {% else %}
      {% trans "anonymous (IP logged)" %}
    {% endif %}
  {% endif %}
{% endif %}
{% if revision == current_revision %}
  <strong>*</strong>
{% endif %}
{% if revision.deleted %}
<span class="badge badge-important">{% trans "deleted" %}</span>
{% endif %}
{% if revision.previous_revision.deleted and not revision.deleted %}
<span class="badge badge-success">{% trans "restored" %}</span>
{% endif %}
{% if revision.locked %}
<span class="badge badge-dark">{% trans "locked" %}</span>
{% endif %}
{% if revision.previous_revision.locked and not revision.locked %}
<span class="badge badge-dark">{% trans "unlocked" %}</span>
{% endif %}
