{% extends 'base.html' %} {% block title %}{{ tpl.name }} – Templates{% endblock %} {% block breadcrumb %} {% endblock %} {% block content %}
Details
Category
{% if tpl.category %} {{ dict(doc_types)[tpl.category] if tpl.category in dict(doc_types) else tpl.category }} {% else %}{% endif %}
File
{{ tpl.filename }}
Uploaded
{{ tpl.created_at.strftime('%d %b %Y %H:%M') }}
By
{{ tpl.created_by.username if tpl.created_by else '—' }}
Docs generated
{{ tpl.paperwork_docs.count() }}
{% if tpl.description %}

{{ tpl.description }}

{% endif %}
Detected Variables {{ tpl.variables | length }}
{% set vars = tpl.variables %} {% if vars %}

These placeholders were detected in the template file. They will be filled automatically when generating a document. PII variables (name, email, phone) are replaced with [MASKED] when a user's record is erased.

{% set pii = ['user_name','user_email','user_phone'] %}
{% for v in vars %}
{% if v in pii %}{% else %}{% endif %} {{ v }}
{% endfor %}
PII masked on departure   other retained
{% else %}
No variables detected. Make sure your template uses {{ variable_name }} syntax and click Re-scan.
{% endif %}
{% set recent_docs = tpl.paperwork_docs.order_by('created_at desc').limit(10).all() %} {% if recent_docs %}
Recently Generated Documents
{% for doc in recent_docs %} {% endfor %}
TitleUserCreatedSigned
{{ doc.title }} {{ doc.user.display_name if doc.user else '—' }} {{ doc.created_at.strftime('%d/%m/%Y') }} {% if doc.is_signed %}{% else %}{% endif %}
{% endif %} {% endblock %}