devicehub-django/dashboard/templates/unassigned_devices.html

106 lines
3 KiB
HTML
Raw Normal View History

2024-07-05 13:32:07 +00:00
{% extends "base.html" %}
{% load i18n %}
{% load paginacion %}
2024-07-05 13:32:07 +00:00
{% block content %}
2024-11-28 02:58:23 +00:00
<div class="row mb-4">
2024-07-05 13:32:07 +00:00
<div class="col">
<h3>{{ subtitle }}</h3>
</div>
2024-11-28 02:58:23 +00:00
<div class="col d-flex justify-content-end align-items-center">
2024-07-30 17:38:04 +00:00
{% if lot %}
2024-11-28 02:58:23 +00:00
<a href="{% url 'lot:documents' object.id %}" type="button" class="btn btn-green-admin me-2">
2024-07-05 13:32:07 +00:00
<i class="bi bi-folder2"></i>
2024-07-30 11:37:08 +00:00
{% trans 'Documents' %}
2024-07-05 13:32:07 +00:00
</a>
2024-07-30 17:38:04 +00:00
{% endif %}
2024-11-28 02:58:23 +00:00
<a href="{# url 'dashboard:exports' object.id #}" type="button" class="btn btn-green-admin me-2">
2024-07-05 13:32:07 +00:00
<i class="bi bi-reply"></i>
{% trans 'Exports' %}
</a>
2024-07-30 17:38:04 +00:00
{% if lot %}
2024-07-30 11:37:08 +00:00
<a href="{% url 'lot:annotations' object.id %}" type="button" class="btn btn-green-admin">
2024-07-05 13:32:07 +00:00
<i class="bi bi-tag"></i>
2024-07-30 11:37:08 +00:00
{% trans 'Annotations' %}
2024-07-05 13:32:07 +00:00
</a>
2024-07-30 17:38:04 +00:00
{% endif %}
2024-07-05 13:32:07 +00:00
</div>
</div>
2024-11-28 02:58:23 +00:00
<div class="dataTable-container mt-4">
2024-07-09 11:34:30 +00:00
<form method="post">
2024-11-28 02:58:23 +00:00
{% csrf_token %}
<table class="table table-hover table-bordered">
<thead class="table-light">
<tr>
<th scope="col" class="text-center">
<input type="checkbox" id="select-all" />
</th>
<th scope="col" class="text-center">
{% trans "Short ID" %}
</th>
<th scope="col" class="text-center">
{% trans "Type" %}
</th>
<th scope="col" class="text-center">
{% trans "Manufacturer" %}
</th>
<th scope="col" class="text-center">
{% trans "Model" %}
</th>
</tr>
</thead>
<tbody>
{% for dev in devices %}
<tr>
<td class="text-center">
<input type="checkbox" name="devices" value="{{ dev.id }}" />
</td>
<td class="text-center">
<a href="{% url 'device:details' dev.id %}">
{{ dev.shortid }}
</a>
</td>
<td class="text-center">
{{ dev.type }}
2024-11-28 02:58:23 +00:00
</td>
<td class="text-center">
{{ dev.manufacturer }}
2024-11-28 02:58:23 +00:00
</td>
<td class="text-center">
{{ dev.model }}
2024-11-28 02:58:23 +00:00
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="d-flex justify-content-start mt-5">
<button id="remove-button" class="btn btn-danger me-2" type="submit" value="{% url 'lot:del_devices' %}" name="url" disabled>
<i class="bi bi-trash"></i> {% trans 'Remove' %}
</button>
<button class="btn btn-success" type="submit" name="url" value="{% url 'lot:add_devices' %}">
{% trans 'Add' %}
</button>
</div>
2024-07-09 15:31:24 +00:00
</form>
2024-07-05 13:32:07 +00:00
</div>
2024-11-28 02:58:23 +00:00
<div class="row mt-3">
<div class="col">
2024-10-02 10:51:40 +00:00
{% render_pagination page total_pages limit %}
</div>
</div>
2024-11-28 02:58:23 +00:00
<script>
// Placeholder check-all js
document.getElementById('select-all').onclick = function() {
var checkboxes = document.querySelectorAll('input[type="checkbox"]');
for (var checkbox of checkboxes) {
checkbox.checked = this.checked;
}
}
</script>
2024-07-05 13:32:07 +00:00
{% endblock %}