{% extends "dashboard/table.html" %}
{% load staticfiles %}

{% block table %}
    <thead>
    <tr>
        <th>Name</th>
        <th>Profile</th>
        <th>Booked</th>
        <th>Working</th>
    </tr>
    </thead>
    <tbody>
    {% for host in hosts %}
        <tr>
            <td>
                {{ host.name }}
            </td>
            <td>
                <a href="profiles/{{ host.profile.id }}">{{ host.profile }}</a>
            </td>
            <td>
                {{ host.booked|yesno:"Yes,No" }}
            </td>
            <td>
                {{ host.working|yesno:"Yes,No" }}
            </td>
        </tr>
    {% endfor %}
    </tbody>
{% endblock table %}

{% block tablejs %}
    <script type="text/javascript">
        $(document).ready(function () {
            $('#table').DataTable({
        scrollX: true,
                "order": [[0, "asc"]]
            });
        });
    </script>
{% endblock tablejs %}