{% extends 'base.html' %} {% load static %} {% block title %}{{ template.name }} - Consent Template{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{{ template.name }}

{{ template.description }}

Version {{ template.version|default:"1.0" }} {{ template.get_category_display }} {{ template.get_language_display }}
{% if template.status == 'active' %} Active {% elif template.status == 'draft' %} Draft {% elif template.status == 'archived' %} Archived {% else %} {{ template.get_status_display }} {% endif %}

{{ template.usage_count|default:0 }}

Times Used

{{ template.last_used|date:"M d"|default:"Never" }}

Last Used

{{ template.rating|floatformat:1|default:"N/A" }}

Average Rating

{{ template.avg_completion_time|default:"N/A" }}

Avg. Completion
Template Preview

{{ template.name }}

{{ template.content|safe|default:"

No content available for preview.

" }}
{% if template.variables %}
Template Variables

The following variables will be replaced when the template is used:

{% for variable in template.variables %} {{ variable }} {% endfor %}
{% endif %}
{{ template.raw_content|default:"No raw content available." }}
Recent Usage History
{% for usage in recent_usage %}
{{ usage.patient_name }}

{{ usage.description }}

{{ usage.created_by }} {{ usage.created_at|timesince }} ago
{{ usage.status }}
{% empty %}
No Usage History

This template hasn't been used yet.

{% endfor %}
Actions
Edit Template
Template Information
{{ template.created_by|default:"System" }}
{{ template.created_at|date:"M d, Y" }}
{{ template.updated_at|date:"M d, Y" }}
{{ template.file_size|filesizeformat|default:"N/A" }}
{{ template.checksum|truncatechars:8|default:"N/A" }}
{% if template.tags %}
{% for tag in template.tags %} {{ tag }} {% endfor %}
{% endif %}
Usage Analytics
{{ analytics.this_week|default:0 }}
This Week
{{ analytics.this_month|default:0 }}
This Month
{{ analytics.total|default:0 }}
All Time
{% if related_templates %}
Related Templates
{% for related in related_templates %}
{{ related.usage_count|default:0 }}
{% endfor %}
{% endif %}
{% endblock %} {% block extra_js %} {% endblock %}