{{ useCjk ? '' }} {% if pdfSig %} {% endif %} {% if timestamped %}

{{ 'This document has been timestamped by %s on %s.'|trans|format(timestamperName, localDate) }}

{% endif %} {{ body|raw }} {% if entityData.metadata %}
{{ entityData.metadata|formatMetadata }}
{% endif %} {% if entityData.experiments_links %}

{% trans %} Linked experiment {% plural entityData.experiments_links|length %} Linked experiments {% endtrans %}

{% for link in entityData.experiments_links %}

{{ link.category_title }} - {{ link.title }}

{% endfor %}
{% endif %} {% if entityData.items_links %}

{% trans %} Linked item {% plural entityData.items_links|length %} Linked items {% endtrans %}

{% for link in entityData.items_links %}

{{ link.category_title }} - {{ link.title }}

{% endfor %}
{% endif %} {% if entityData.steps %}

{{ 'Steps'|trans }}

{% for step in entityData.steps %}

{{ step.body }} {% if step.finished %} ({{ step.finished_time }}){% endif %}

{% endfor %}
{% endif %} {% if includeFiles and entityData.uploads %}

{% trans %} Attached file {% plural entityData.uploads|length %} Attached files {% endtrans %}

{% for upload in entityData.uploads %}

{{ upload.real_name }} {# add a comment? don't add if it's the default text or if it's null #} {% if upload.comment and upload.comment != 'Click to add a comment' %} ({{ upload.comment|nl2br }}){% endif %} {# add hash? don't add if we don't have it #} {% if upload.hash|length >= 32 %}
{{ upload.hash_algorithm }}: {{ upload.hash }}{% endif %} {% if upload.base64_thumbnail %} {# Note: adding charset to the data string makes it fail #}
{{ upload.comment|e( {% endif %}

{% endfor %}
{% endif %} {% if entityData.comments %}

{% trans %} Comment {% plural entityData.comments|length %} Comments {% endtrans %}

{% for comment in entityData.comments %}

On {{ comment.created_at }} {{ comment.fullname }} wrote:
{{ comment.comment|nl2br }}

{% endfor %}
{% endif %}
{% if includeChangelog %}

{{ 'Changelog'|trans }}

{% for change in changes %} {% endfor %}
{{ 'Date'|trans }} {{ 'User'|trans }} {{ 'Property changed'|trans }} {{ 'New value'|trans }}
{{ change.created_at }} {{ change.fullname }} {{ change.target }} {# cannot use ternary here as it is an expression and filters are applied after evaluation #} {%- if change.target == 'body' -%} {# use of raw to make the link to revisions page work #} {{ change.content|raw }} {%- else -%} {{ change.content }} {%- endif -%}
{% endif %}