{% extends "base.html" %} {% load static %} {% block title %}Blood Requests - RaktaPulse{% endblock %} {% block content %}

{% if current_status %}{{ current_status }} {% endif %}Blood Requests

{% if current_status == 'Active' %}Current urgent requirements for blood.{% else %}History of blood requests in our community.{% endif %}

Post a Request
{% for req in requests %}
{% if req.urgency == 'CRITICAL' %} {% elif req.urgency == 'URGENT' %} {% else %} {% endif %} {{ req.urgency }} {% if req.status == 'Active' %} Active {% else %} {{ req.status }} {% endif %}
{{ req.blood_group }}
{{ req.patient_name }}

{{ req.hospital }}

{% with acceptance=req.donations.first %} {% if acceptance %}

Accepted by: {{ acceptance.donor.name }}

{% endif %} {% endwith %} {% if req.image %}
Patient/Prescription
{% endif %}
{{ req.created_at|timesince }} ago
{% if req.user %} {% endif %} {% if user.is_authenticated and user.donor_profile and req.user != user %} {% if req.can_volunteer %} Volunteer {% else %} {% endif %} {% endif %} Call
{% empty %}

No active blood requests at the moment.

{% endfor %}
{% endblock %}