<div class="card">
    <h5 class="card-header">Windows Volumes</h5>
    <div class="card-body">
        {% if volumes %}
        <table class="table table-hover">
            {% for volume in volumes %}
            <tr>
                <td>Drive Name</td>
                <td>Filesystem</td>
                <td>Drive Size</td>
                <td>Drive Description</td>
                <td></td>
            </tr>
            <tr>
                <td>{{ volume.drive_name }}</td>
                <td>{{ volume.fs }}</td>
                {% for drive in volume.drives.all %}
                    <td>{{ drive.size }}</td>
                    <td>{{ drive.description }}</td>
                {% empty %}
                    <td><span class="text-muted">No Disk</span></td>
                    <td><span class="text-muted">No Disk</span></td>
                {% endfor %}
                <td class="text-end noprint">
                    <a href="{% url 'plugins:netbox_storage:windowsvolume_changelog' pk=volume.pk %}"
                       class="btn btn-sm btn-outline-secondary"
                       title="Change Log">
                        <i class="mdi mdi-history"></i>
                    </a>
                    <a href="{% url 'plugins:netbox_storage:windowsvolume_edit' pk=volume.pk %}?return_url={{ volume.get_absolute_url }}"
                       class="btn btn-warning btn-sm" title="Edit Volume">
                        <i class="mdi mdi-pencil"></i>
                    </a>
                    <a href="{% url 'plugins:netbox_storage:windowsvolume_delete' pk=volume.pk %}?return_url={{ volume.get_absolute_url }}"
                       class="btn btn-danger btn-sm">
                        <i class="mdi mdi-trash-can-outline" title="Delete Volume"></i>
                    </a>
                </td>
            </tr>
            {% endfor %}
        </table>
        {% else %}
        <div class="text-muted">None</div>
        {% endif %}
    </div>
    <div class="card-footer text-end noprint">
        <a href="{% url 'plugins:netbox_storage:windowsvolume_add' %}" class="btn btn-sm btn-primary">
            <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Volume
        </a>
    </div>
</div>