{% extends "layout.html.tera" %}
{% block title %}Export — {{ record.label }} — {{ app_display }}{% endblock title %}
{% block content %}
<nav class="breadcrumb-nav" aria-label="Breadcrumb">
<ol class="breadcrumb-list" aria-label="Breadcrumb trail">
<li class="breadcrumb-list-item"><a href="/">Home</a></li>
<li class="breadcrumb-list-item"><a href="/{{ entity_plural }}">{{ entity_plural | capitalize }}</a></li>
<li class="breadcrumb-list-item"><a href="/{{ entity_plural }}/{{ record.id }}">{{ record.label }}</a></li>
<li class="breadcrumb-list-item" aria-current="page">Export</li>
</ol>
</nav>
<section aria-label="GDPR data export">
<h2>Data export — {{ record.label }}</h2>
<div class="information-callout" aria-label="GDPR export notice">
<h3>GDPR Article 15 — Right of access</h3>
<p>
This page returns the complete record for
<strong>{{ record.label }}</strong> in machine-readable JSON, as required
by GDPR Article 15. Sensitive identifiers (SSN, NHS number, passport, tax ID)
are shown unmasked here so the data subject receives a faithful copy —
treat the export accordingly. The export is also logged to the audit trail.
</p>
</div>
<div class="action-bar" role="toolbar" aria-label="Export actions">
<a class="button"
href="/api/{{ entity_plural }}/{{ record.id }}/export"
download="{{ entity_singular }}-{{ record.id }}.json"
aria-label="Download JSON export">Download JSON</a>
<button class="clipboard-copy-button"
type="button"
aria-label="Copy JSON export to clipboard"
data-clipboard-text="{{ export_json }}"
data-copied-message="{{ entity_singular | capitalize }} export copied"
>Copy to clipboard</button>
<a class="button"
href="/{{ entity_plural }}/{{ record.id }}"
aria-label="Back to {{ entity_singular }} detail">Back</a>
</div>
<ol class="summary-list" aria-label="Export metadata">
<li class="summary-list-item">
<dl>
<dt>{{ entity_singular | capitalize }} ID</dt>
<dd><code>{{ record.id }}</code></dd>
</dl>
</li>
<li class="summary-list-item">
<dl>
<dt>Generated at</dt>
<dd><time datetime="{{ generated_at }}">{{ generated_at }}</time></dd>
</dl>
</li>
<li class="summary-list-item">
<dl>
<dt>Size</dt>
<dd>{{ export_size_bytes }} bytes</dd>
</dl>
</li>
<li class="summary-list-item">
<dl>
<dt>Active consents</dt>
<dd>
{% if consents | length == 0 %}
<span class="hint" aria-label="No active consents">No active consents on file.</span>
{% else %}
{% for c in consents %}
<span class="badge"
data-type="{{ c.badge_type }}"
aria-label="Consent: {{ c.consent_type }} — {{ c.status }}">{{ c.consent_type }} · {{ c.status }}</span>
{% endfor %}
{% endif %}
</dd>
</dl>
</li>
</ol>
<h3>JSON payload</h3>
<pre class="code-block" aria-label="GDPR export JSON payload"><code>{{ export_json_pretty }}</code></pre>
</section>
{% endblock content %}