{% extends "cranefly/layout.html" %} {% import "cranefly/macros.html" as macros with context %} {% block title %}{{ macros.page_title(title=(_("Post #%(post)s Changelog") % {'post': post.pk}),parent=thread.name) }}{% endblock %} {% block breadcrumb %}{{ super() }} {{ macros.parents_list(parents) }}
- {{ thread.name }}
- {% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %} {%- endblock %} {% block container %}
  {{ messages_list(messages) }}

# {% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %} {{ thread.name }}

- {{ post.date|reltimesince }}
- {% if post.user %}{{ post.user.username }}{% else %}{{ post.user_name }}{% endif %}
- {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}
{% if post.protected %}
- {% trans %}Protected{% endtrans %}
{% endif %}

{% if edits %}

| {% trans %}Change Log{% endtrans %}
--- | ---
{% for edit in edits %}

{% if edit.change > 0 %}+{% endif %}{{ edit.change }}

#{{ loop.revindex }} {% if edit.reason %}
{{ edit.reason }}
{% endif %}
{% if edit.change != 0 %}{% if edit.change > 0 -%} {% trans chars=edit.change %}Added one character to post.{% pluralize %}Added {{ chars }} characters to post.{% endtrans %} {%- elif edit.change < 0 -%} {% trans chars=edit.change|abs %}Removed one character from post.{% pluralize %}Removed {{ chars }} characters from post.{% endtrans %} {%- else -%} {% trans %}No change in message's length.{% endtrans %} {%- endif %}{% endif %}{% if edit.thread_name_old %} {% trans old=edit.thread_name_old, new=edit.thread_name_new %}Changed thread name from "{{ old }}" to "{{ new }}".{% endtrans %}{% endif %} {% trans user=edit_user(edit), date=edit.date|reldate|low %}By {{ user }} {{ date }}{% endtrans %}

{% endfor %}

{% else %}

{% trans %}This post was never edited.{% endtrans %}

{% endif %}
{% endblock %} {% macro edit_user(edit) -%} {% if edit.user_id %}{{ edit.user_name }}{% else %}{{ edit.user_name }}{% endif %} {%- endmacro %}