<div class="card">
    <h5 class="card-header">Template Volume Configuration</h5>
    <div class="card-body">
        {% if mounted_volumes %}
        <table class="table table-hover">
            <tr>
                <td>Device</td>
                <td>Mount point</td>
                <td>Filesystem</td>
                <td>Options</td>
                <td>Size</td>
            </tr>
            {% for mounted_volume in mounted_volumes %}
            <tr>
                <td>{{ mounted_volume.linux_device|linkify|placeholder }}</td>
                <td>{{ mounted_volume.mount_point|linkify|placeholder }}</td>
                <td>{{ mounted_volume.fs_type|linkify|placeholder }}</td>
                <td>{{ mounted_volume.options|linkify|placeholder }}</td>
                <td>{{ mounted_volume.linux_device|linkify|placeholder }} GB</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:template_lvm_add' %}" class="btn btn-sm btn-primary">
            <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add LVM Volume
        </a>
        <a href="{% url 'plugins:netbox_storage:template_partition_add' %}?platform={{ object.id }}&return_url={% url 'dcim:platform' pk=object.pk %}" class="btn btn-sm btn-primary">
            <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Partition to drive
        </a>
        <a href="{% url 'plugins:netbox_storage:template_drive_add' %}?platform={{ object.id }}&return_url={% url 'dcim:platform' pk=object.pk %}" class="btn btn-sm btn-primary">
            <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Drive
        </a>
    </div>
</div>