{% extends 'base.html' %}
{% block content %}


<div class="content container-fluid">

    <div class="page-header">
    <div class="row align-items-center">
    <div class="col">
    <h3 class="page-title">Manage Patients</h3>
    <ul class="breadcrumb">
    <li class="breadcrumb-item"><a href="{% url 'admin_home' %}">Dashboard</a></li>
    <li class="breadcrumb-item active">Manage Patients</li>
    </ul>
    </div>
    
    </div>
    </div>
    
    <div class="row">
    <div class="col-sm-12">
    <div class="card card-table">
    <div class="card-body">
        {% if messages %}
        {% for message in messages %}
         {% if message.tags == 'error' %}
       <div class="alert alert-warning alert-dismissible fade show" role="alert">
      {{message}}
     <button type="button" class="close" data-dismiss="alert" aria-label="Close">
     <span aria-hidden="true">&times;</span>
         </button>
          </div>
       {% endif %}
        {% endfor %}
       {% endif %}
           {% if messages %}
        {% for message in messages %}
         {% if message.tags == 'success' %}
       <div class="alert alert-warning alert-dismissible fade show" role="alert">
      {{message}}
     <button type="button" class="close" data-dismiss="alert" aria-label="Close">
     <span aria-hidden="true">&times;</span>
         </button>
          </div>
       {% endif %}
        {% endfor %}
       {% endif %}
    <div class="table-responsive">
    <table class="table table-hover table-center mb-0 datatable">
    <thead>
        {% if patde %}
    <tr>
        <th>S.No</th>
    <th>Patient Name</th>
    <th>Patient Contact Number</th>
    <th>Patient Gender</th>
    <th>Creation Date</th>
    <th>Action</th>
    </tr>
    </thead>
    <tbody>
        {% for i in patde %}
    <tr>
        <td>{{forloop.counter}}</td>
    <td>{{i.name}}</td>
    <td>{{i.mobilenumber}}</td>
    <td>{{i.gender}}</td>
    <td>{{i.regdate_at}}</td>
   
    <td>
   
    <a href="{% url 'viewcheckaddpatient' i.id %}" class="btn btn-primary">
       View Details
        </a>
  
    
    </td>
    </tr> {% endfor %}
    {% else %}
    <p>No Data Available</p>
   
    {% endif %}
    </tbody>
    </table>
    

    </div>
    </div>
    </div>
    </div>
    </div>
    </div>


{% endblock %}