haikal/templates/recalls/recall_detail.html
2025-08-27 13:04:41 +03:00

77 lines
3.3 KiB
HTML

<!-- templates/recalls/recall_detail.html -->
{% extends "base.html" %}
{% load i18n humanize %}
{% block content %}
<div class="container mt-4">
<div class="d-flex justify-content-between align-items-center mb-4">
<div class="d-flex align-items-center gap-2">
<img src="{{ recall.make.logo.url }}" width="80" height="80">
<h2>{{ recall.title }}</h2>
</div>
<a href="{% url 'recall_list' %}" class="btn btn-secondary">{% trans "Back to Recall List" %}</a>
</div>
<div class="card mb-4">
<div class="card-header">
<h5>{% trans "Recall Details" %}</h5>
</div>
<div class="card-body">
<div class="row mb-3">
<div class="col-md-6">
<strong>{% trans "Description:" %}</strong>
<p>{{ recall.description }}</p>
</div>
<div class="col-md-6">
<strong>{% trans "Sent:" %}</strong>
<p>{{ recall.created_at|date:"DATETIME_FORMAT" }}</p>
</div>
</div>
<div class="row">
<div class="col-md-3">
<strong>{% trans "Make:" %}</strong>
<p>{{ recall.make|default:"-" }}</p>
</div>
<div class="col-md-3">
<strong>{% trans "Model:" %}</strong>
<p>{{ recall.model|default:"-" }}</p>
</div>
<div class="col-md-3">
<strong>{% trans "Series:" %}</strong>
<p>{{ recall.serie|default:"-" }}</p>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
<h5>{% trans "Notifications Sent" %}</h5>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Dealer" %}</th>
<th>{% trans "Cars Affected" %}</th>
<th>{% trans "Notification Date" %}</th>
</tr>
</thead>
<tbody>
{% for notification in notifications %}
<tr>
<td>{{ notification.dealer.name }}</td>
<td>{{ notification.cars_affected.count }}</td>
<td>{{ notification.sent_at|date:"SHORT_DATETIME_FORMAT" }}</td>
</tr>
{% empty %}
<tr>
<td colspan="3" class="text-center">{% trans "No notifications sent" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endblock %}