{% for row in item.pdf_rows %}
{% if row.type == 'section' %}
| {{ row.label }} |
{% elif row.type == 'display_text' %}
| {{ row.value|render_markdown }} |
{% elif row.type == 'pair' %}
| {{ row.fields.0.label }} |
{% with v=row.fields.0.value %}{% if v.filename %}{{ v.filename }}{% if v.size %} ({{ v.size|filesizeformat }}){% endif %}{% else %}{{ v }}{% endif %}{% endwith %} |
{{ row.fields.1.label }} |
{% with v=row.fields.1.value %}{% if v.filename %}{{ v.filename }}{% if v.size %} ({{ v.size|filesizeformat }}){% endif %}{% else %}{{ v }}{% endif %}{% endwith %} |
{% elif row.type == 'triple' %}
{% for field in row.fields %}
| {{ field.label }} |
{% with v=field.value %}{% if v.filename %}{{ v.filename }}{% if v.size %} ({{ v.size|filesizeformat }}){% endif %}{% else %}{{ v }}{% endif %}{% endwith %} |
{% endfor %}
{% else %}
| {{ row.fields.0.label }} |
{% with v=row.fields.0.value %}{% if v.filename %}{{ v.filename }}{% if v.size %} ({{ v.size|filesizeformat }}){% endif %}{% else %}{{ v }}{% endif %}{% endwith %} |
{% endif %}
{% empty %}
| No form data available. |
{% endfor %}
{% if not item.hide_approval_history %}
{% for section in item.approval_step_sections %}
{% if section.completed_by %}Completed by {{ section.completed_by }}{% if section.is_surrogate %} (on behalf of {{ section.assigned_to }}){% endif %}{% if section.completed_at %} · {{ section.completed_at|date:"N j, Y \a\t g:i a" }}{% endif %}{% endif %}
{% if section.comments %} Comment: {{ section.comments }}{% endif %}
{% for row in section.fields %}
{% if row.type == 'section' %}
| {{ row.label }} |
{% elif row.type == 'display_text' %}
| {{ row.value|render_markdown }} |
{% elif row.type == 'pair' %}
| {{ row.fields.0.label }} |
{% with v=row.fields.0.value %}{% if v.filename %}{{ v.filename }}{% else %}{{ v }}{% endif %}{% endwith %} |
{{ row.fields.1.label }} |
{% with v=row.fields.1.value %}{% if v.filename %}{{ v.filename }}{% else %}{{ v }}{% endif %}{% endwith %} |
{% else %}
{% for field in row.fields %}
| {{ field.label }} |
{% with v=field.value %}{% if v.filename %}{{ v.filename }}{% else %}{{ v }}{% endif %}{% endwith %} |
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}