improve edit versions

pull/226/head
Aevann 2024-05-17 03:22:42 +03:00
parent 6f1c55029e
commit daee0db192
1 changed files with 15 additions and 26 deletions

View File

@ -4,32 +4,21 @@
<h2 class="my-4 py-md-2 d-none d-md-block">Versions of <a href="{{obj.permalink}}">/{% if obj.fullname.startswith('p_') %}post{% else %}comment{% endif %}/{{obj.id}}</a></h2>
<h4 class="my-4 py-md-2 d-md-none">Versions of <a href="{{obj.permalink}}">/{% if obj.fullname.startswith('p_') %}post{% else %}comment{% endif %}/{{obj.id}}</a></h4>
<div class="overflow-x-auto">
<table id="versions">
<thead>
<tr>
{% if obj.fullname.startswith('p_') %}
<th>Title</th>
{% endif %}
<th>Body</th>
</tr>
</thead>
<hr class="my-3">
<tr>
{% if obj.fullname.startswith('p_') %}
<td>{{obj.title_html | safe}}</td>
{% endif %}
<td>{{obj.body_html | safe}}</td>
</tr>
{% if obj.fullname.startswith('p_') %}
<h3>{{obj.title_html | safe}}</h3>
{% endif %}
{% for edit in obj.edits %}
<tr>
{% if obj.fullname.startswith('p_') %}
<td>{{edit.old_title_html | safe}}</td>
{% endif %}
<td>{{edit.old_body_html | safe}}</td>
</tr>
{% endfor %}
</table>
</div>
{{obj.body_html | safe}}
{% for edit in obj.edits %}
<hr class="my-3">
{% if obj.fullname.startswith('p_') %}
<h3>{{edit.old_title_html | safe}}</h3>
{% endif %}
{{edit.old_body_html | safe}}
{% endfor %}
<hr class="my-3">
{% endblock %}