{% extends "layouts/base.html" %}
{% load i18n %}

{% block title %}Hospitals - PX360{% endblock %}

{% block content %}
<div class="container-fluid">
    <h2 class="mb-4"><i class="bi bi-hospital me-2"></i>{% trans "Hospitals" %}</h2>
    
    <div class="card">
        <div class="card-body p-0">
            <table class="table table-hover mb-0">
                <thead class="table-light">
                    <tr>
                        <th>{% trans "Name" %}</th>
                        <th>{% trans "Code" %}</th>
                        <th>{% trans "City" %}</th>
                        <th>{% trans "Phone" %}</th>
                        <th>{% trans "Status" %}</th>
                    </tr>
                </thead>
                <tbody>
                    {% for hospital in hospitals %}
                    <tr>
                        <td><strong>{{ hospital.name }}</strong></td>
                        <td><small>{{ hospital.code }}</small></td>
                        <td><small>{{ hospital.city }}</small></td>
                        <td><small>{{ hospital.phone }}</small></td>
                        <td><span class="badge bg-success">{{ hospital.get_status_display }}</span></td>
                    </tr>
                    {% empty %}
                    <tr>
                        <td colspan="5" class="text-center py-5">No hospitals found</td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
{% endblock %}
