{% extends "base.html" %} {% load i18n %} {% block title %}{{ template.title_en }}{% endblock %} {% block content %}

{{ template.title_en }}

{% if perms.core.change_consenttemplate %} {% trans "Edit" %} {% endif %} {% trans "Back to List" %}
{% trans "Template Information" %}
{% trans "Type" %}:
{{ template.get_consent_type_display }}
{% trans "Title (EN)" %}:
{{ template.title_en }}
{% if template.title_ar %}
{% trans "Title (AR)" %}:
{{ template.title_ar }}
{% endif %}
{% trans "Version" %}:
v{{ template.version }}
{% trans "Status" %}:
{% if template.is_active %} {% trans "Active" %} {% else %} {% trans "Inactive" %} {% endif %}
{% trans "Created" %}:
{{ template.created_at|date:"Y-m-d H:i" }}
{% trans "Last Updated" %}:
{{ template.updated_at|date:"Y-m-d H:i" }}
{{ template.content_en }}
{% if template.content_ar %}
{{ template.content_ar }}
{% endif %}
{% trans "Available Placeholders:" %} {patient_name}, {patient_mrn}, {date}, {patient_dob}, {patient_age}
{% if sample_patient %}
{% trans "Preview with sample patient:" %} {{ sample_patient.full_name_en }} ({{ sample_patient.mrn }})
{{ preview_en }}
{% if preview_ar %}
{{ preview_ar }}
{% endif %}
{% endif %}
{% trans "Actions" %}
{% if perms.core.change_consenttemplate %} {% trans "Edit Template" %} {% endif %} {% if perms.core.delete_consenttemplate and template.is_active %} {% trans "Deactivate" %} {% endif %} {% trans "Back to List" %}
{% if version_history %}
{% trans "Version History" %}
{% for version in version_history %}
v{{ version.version }} {% if version.is_active %} {% trans "Active" %} {% endif %} {% if version.pk == template.pk %} {% trans "Current" %} {% endif %}
{% if version.pk != template.pk %} {% endif %}
{{ version.created_at|date:"Y-m-d H:i" }}
{% endfor %}
{% endif %}
{% trans "Metadata" %}
{% trans "Template ID" %}:
{{ template.id }}
{% trans "Tenant" %}:
{{ template.tenant.name }}
{% trans "Created At" %}:
{{ template.created_at|date:"Y-m-d H:i:s" }}
{% trans "Updated At" %}:
{{ template.updated_at|date:"Y-m-d H:i:s" }}
{% endblock %}