{% extends "base.html" %} {% load static %} {% block title %}Notification - {{ notification.title }}{% endblock %} {% block content %}

Notification Detail

{{ notification.title }}
{{ notification.category }}
Priority

{{ notification.get_priority_display }}

Category

{{ notification.category }}

Start Date

{{ notification.start_date|date:"F j, Y" }}

End Date

{{ notification.end_date|date:"F j, Y" }}

Status

{% if notification.is_active %} {% if notification.start_date <= now and notification.end_date >= now %} Active {% elif notification.start_date > now %} Scheduled {% elif notification.end_date < now %} Expired {% endif %} {% else %} Inactive {% endif %}

Display Location

{{ notification.get_display_location_display }}

Message
{{ notification.message|linebreaks }}
{% if notification.link_url %}
Action Link

{{ notification.link_text|default:notification.link_url }}

{% if notification.link_text %} {{ notification.link_url }} {% endif %}
{% endif %} {% if notification.target_roles.exists or notification.target_departments.exists %}
Target Audience
{% if notification.target_roles.exists %}
Roles
{% for role in notification.target_roles.all %} {{ role.name }} {% endfor %}
{% endif %} {% if notification.target_departments.exists %}
Departments
{% for department in notification.target_departments.all %} {{ department.name }} {% endfor %}
{% endif %}
{% endif %} {% if notification.additional_data %}
Additional Data
{{ notification.additional_data|pprint }}
{% endif %}
Created

{{ notification.created_at|date:"M d, Y g:i A" }}

{{ notification.created_at|timesince }} ago
Last Updated

{{ notification.updated_at|date:"M d, Y g:i A" }}

{{ notification.updated_at|timesince }} ago
Notification Preview
{{ notification.title }}

{{ notification.message }}

{% if notification.link_url %}

{{ notification.link_text|default:"Learn More" }}

{% endif %}
{% if notification_stats %}
Notification Statistics

{{ notification_stats.impressions|default:0 }}

Impressions

{{ notification_stats.dismissals|default:0 }}

Dismissals

{{ notification_stats.clicks|default:0 }}

Link Clicks

{% if notification_stats.impressions > 0 %}
Engagement Rate
{{ notification_stats.engagement_rate }}%
Based on link clicks and positive interactions
{% endif %}
{% endif %}
Status Timeline
{% if notification.created_at %}
Created

Notification created

{{ notification.created_at|date:"M d, Y" }}
{% endif %} {% if notification.start_date %}
Start Date

Notification becomes active

{{ notification.start_date|date:"M d, Y" }}
{% endif %} {% if notification.updated_at and notification.updated_at != notification.created_at %}
Updated

Notification last modified

{{ notification.updated_at|date:"M d, Y" }}
{% endif %} {% if notification.end_date %}
End Date

Notification expires

{{ notification.end_date|date:"M d, Y" }}
{% endif %}
{% if notification.tenant %}
Tenant Information
{{ notification.tenant.name|first|upper }}
{{ notification.tenant.name }}
{{ notification.tenant.get_organization_type_display }}
Status {% if notification.tenant.is_active %}Active{% else %}Inactive{% endif %}
{% else %}
System-Wide Notification

This notification applies to all tenants in the system.

{% endif %}
{% endblock %} {% block css %} {% endblock %}