{% extends 'base.html' %}
{% block content %}
<div class="container-fluid mt-3">
<div class="row">
<div class="col-lg-12">
                        <div class="card">
                            <div class="card-body">
                                <h4 class="card-title">Manage Visitor</h4>
                                <div class="basic-form">
                                    {% 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-striped table-bordered zero-configuration">
                                        <thead>
                                            <tr>
                                                <th>S.No</th>
                                                <th>Full Name</th>
                                                <th>Contact Number</th>
                                                <th>Email</th>
                                                <th>Entery Date and Time</th>
                                                <th>Action</th>
                                                
                                            </tr>
                                        </thead>
                                        <tbody>
                                            {% for i in visitor %}
                                            <tr>
                                                <td>{{ i.id}}</td>
                                                <td>{{ i.fullname}}</td>
                                                <td>{{ i.mobilenumber}}</td>
                                                <td>{{ i.email}}</td>
                                                <td>{{ i.created_at}}</td>
                                                <td><a href="{% url 'update_visitor' i.id %}">Update </a>|| <a href="{% url 'delete_visitor' i.id %}">Update Delete</a></td>
                                               
                                            </tr>
                                            {% endfor %}
                                        </tbody>
                                        <tfoot>
                                            <tr>
                                                <th>S.No</th>
                                                <th>Full Name</th>
                                                <th>Contact Number</th>
                                                <th>Email</th>
                                                <th>Entery Date and Time</th>
                                                <th>Action</th>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div>
                                    
                                </div>
                            </div>
                        </div>
                    </div>
                  </div>
</div>


{% endblock %}