27 lines
1.1 KiB
HTML
27 lines
1.1 KiB
HTML
|
|
{% extends "projects/base.html" %}
|
|||
|
|
|
|||
|
|
{% block page_title %}Comment history{% endblock %}
|
|||
|
|
|
|||
|
|
{% block project_content %}
|
|||
|
|
<p><a href="{{ back }}">Back to the comment</a></p>
|
|||
|
|
<h1>Edits to {{ comment.author.username|default:"deleted user" }}’s comment</h1>
|
|||
|
|
|
|||
|
|
{% if comment.is_deleted %}
|
|||
|
|
<p>This comment was deleted, along with its history.</p>
|
|||
|
|
{% else %}
|
|||
|
|
<section aria-labelledby="current-heading">
|
|||
|
|
<h2 id="current-heading">Current, edited <time datetime="{{ comment.edited_at|date:'c' }}">{{ comment.edited_at|date:"j M Y, H:i" }}</time></h2>
|
|||
|
|
<pre class="quote">{{ comment.body }}</pre>
|
|||
|
|
</section>
|
|||
|
|
{% for version in versions reversed %}
|
|||
|
|
<section aria-labelledby="version-{{ version.pk }}">
|
|||
|
|
<h2 id="version-{{ version.pk }}">
|
|||
|
|
{% if forloop.last %}Original{% else %}Earlier version{% endif %},
|
|||
|
|
replaced <time datetime="{{ version.created_at|date:'c' }}">{{ version.created_at|date:"j M Y, H:i" }}</time>
|
|||
|
|
</h2>
|
|||
|
|
<pre class="quote">{{ version.body }}</pre>
|
|||
|
|
</section>
|
|||
|
|
{% endfor %}
|
|||
|
|
{% endif %}
|
|||
|
|
{% endblock %}
|