{# Create the diff view when the user clicks the Item History diff button. This template is used only if the item has a text content type. For text documents, the display begins with a table showing revision info, links to new/older revisions, and highlighted text differences. The display ends with a rendered view of the newer revision. #} {% import "utils.html" as utils with context %} {% macro revert_button() %} {%- if rev_links and rev_links['r2_newer'] -%} {# The rendered revision is not the current revision #}
{{ _('Revert to Revision') }} {{ newrev.meta['rev_number'] or newrev.revid|shorten_id }} - {{ newrev.meta.mtime|time_datetime }}
{%- endif -%} {% endmacro %} {{ revert_button() }} {{ utils.diff_table(diffs) }} {{ revert_button() }} {# show rendered item #} {{ rendered | safe }}