{% extends "main/layout.html" %}
{% block content %}
<ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="{% url 'cont-list' %}">PAINEL KONTRATU</a></li>
    <li class="breadcrumb-item active">{{ legend|upper }}</li>
</ol>
<div class="row">
    <div class="col-sm-12">
        <div class="card shadow-lg rounded border-info">
            <div class="card-header bg-steel">{{ legend|upper }}</div>
            <div class="card-body">
                <table class="table table-sm" id="example" width="100%" cellspacing="0">
                    <thead>
                        <tr>
                            <th>Nu.</th>
                            <th>Naran</th>
                            <th>Sexu</th>
                            <th>Fatin & Data Moris</th>
                            <th>Nasaun</th>
                            <th>#</th>
                        </tr>
                    </thead>
                    <tbody>
                    {% for obj in objects %}
                        <tr>
                            <td>{{ forloop.counter }}</td>
                            <td><a href="{% url 'emp-detail' obj.hashed %}">{{ obj }}</a></td>
                            <td>{{ obj.sex }}</td>
                            <td>{{ obj.pob }}, {{ obj.dob }}</td>
                            <td>{{ obj.country.name }}</td>
                            <td>
                                <a class="btn btn-sm btn-info" href="{% url 'cont-add' obj.hashed %}">Atribui <i class="fa fa-plus"></i></a>
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div> <!--end card-body-->
        </div> <!--end card-->
    </div> <!--end col-->
</div> <!--end row-->
{% endblock %}
{% block scripts %}
	<script type="text/javascript">
		$(document).ready(function() {
			$('#example').DataTable();
		} );
	</script>
{% endblock %}