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

<div class="page-inner">
    <div class="page-header">
      <h3 class="fw-bold mb-3">Manage Blood Group</h3>
      <ul class="breadcrumbs mb-3">
        <li class="nav-home">
          <a href="#">
            <i class="icon-home"></i>
          </a>
        </li>
        <li class="separator">
          <i class="icon-arrow-right"></i>
        </li>
        <li class="nav-item">
          <a href="#">Blood Group</a>
        </li>
      
        
      </ul>
    </div>
    <div class="row">
      <div class="col-md-12">
        <div class="card">
          <div class="card-header">
            <h4 class="card-title">Manage Blood Group</h4>
          </div>
          <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
                id="basic-datatables"
                class="display table table-striped table-hover"
              >
                <thead>
                    <tr>
                        <th>#</th>
                                <th>Blood Groups</th>
                            <th>Creation Date</th>
                        
                        
                            <th>Action</th>
                        </tr>
                </thead>
                <tfoot>
                    <tr>
                        <th>#</th>
                                <th>Blood Groups</th>
                            <th>Creation Date</th>
                        
                        
                            <th>Action</th>
                        </tr>
                </tfoot>
                <tbody>
                    {% for i in bgrp %}
                  <tr>
                    <td>{{forloop.counter}}</td>
                    <td>{{i.bloodgroup}}</td>
                    <td>{{i.created_at}}</td>
                    <td> <a href="{% url 'update_bloodgroup' i.id %}" class="btn btn-sm bg-success-light mr-2">
                        <i class="fas fa-pen"></i>
                        </a>
                        <a href="{% url 'delete_bloodgroup' i.id %}" class="btn btn-sm bg-danger-light">
                        <i class="fas fa-trash"></i>
                        </a></td>
                
                  </tr>{% endfor %}
                  
                  
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>

     

     
    </div>
  </div>



{% endblock %}