2024-07-05 13:32:07 +00:00
{% extends "base.html" %}
{% load i18n %}
2024-10-02 10:13:05 +00:00
{% load paginacion %}
2025-02-08 22:06:38 +00:00
{% block actions %}
2025-02-14 20:51:11 +00:00
2025-02-07 19:52:47 +00:00
{% if lot %}
2025-02-14 20:51:11 +00:00
< a href = "{#% url 'lot:documents' object.id %#}" type = "button" class = "btn btn-green-admin btn-todo" data-bs-toggle = "tooltip" title = "NOT IMPLEMENTED. Menu for adding documents for the lot" >
2025-02-07 19:52:47 +00:00
< i class = "bi bi-folder2" > < / i >
{% trans 'Documents' %}
< / a >
{% endif %}
2025-02-14 20:51:11 +00:00
{% if lot %}
< a href = "{% url 'lot:properties' object.id %}" type = "button" class = "btn btn-green-admin" >
2024-07-05 13:32:07 +00:00
< i class = "bi bi-tag" > < / i >
2025-02-14 20:51:11 +00:00
{% trans 'Properties' %}
2024-07-05 13:32:07 +00:00
< / a >
2024-07-30 17:38:04 +00:00
{% endif %}
2025-02-14 20:51:11 +00:00
< a href = "{# url 'dashboard:exports' object.id #}" type = "button" class = "btn btn-todo" data-bs-toggle = "tooltip" title = "NOT IMPLEMENTED. This action tries to emulate what devicehub-teal did, which was related to opening a dialog where you can select different options for export the devices as csv for all selected devices" >
< i class = "bi bi-reply" > < / i >
{% trans 'Exports' %}
< / a >
2025-02-08 22:06:38 +00:00
{% endblock%}
{% block content %}
2025-02-14 20:51:11 +00:00
{% if lot.name %}
< h3 class = "text-muted" > < i class = "bi bi-folder2-open me-2" > < / i > {% trans "Lot" %} {{ lot.name }}< / h3 >
{% endif %}
2024-07-05 13:32:07 +00:00
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 %}
2025-02-11 18:31:04 +00:00
< div class = "d-flex justify-content-end m-2 mb-4" >
< button id = "remove-button" class = "btn btn btn-danger me-2" type = "submit" value = "{% url 'lot:del_devices' %}" name = "url" disabled >
< i class = "bi bi-folder-minus pe-2" > < / i >
{% trans 'Unassign' %}
< / button >
< button class = "btn btn-green-user" type = "submit" name = "url" value = "{% url 'lot:add_devices' %}" >
< i class = "bi bi-folder-symlink" > < / i >
{% trans 'Assign to lot' %}
< / button >
< / div >
2024-11-28 02:58:23 +00:00
< 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 >
2025-02-10 20:38:22 +00:00
< th scope = "col" class = "text-center" >
{% trans "Current State" %}
< / th >
< th scope = "col" data-type = "date" class = "text-center" data-format = "YYYY-MM-DD HH:mm" >
{% trans "Evidence last updated" %}
< / th >
2024-11-28 02:58:23 +00:00
< / 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" >
2025-02-13 16:22:00 +00:00
{% if dev.type == "Laptop" or dev.type == "Netbook" %}
< i class = "bi bi-laptop" > < / i >
{% elif dev.type == "Desktop" or dev.type == "Server" %}
< i class = "bi bi-pc-display" > < / i >
{% elif dev.type == "Motherboard" %}
< i class = "bi bi-motherboard" > < / i >
{% elif dev.type == "GraphicCard" %}
< i class = "bi bi-gpu-card" > < / i >
{% elif dev.type == "HardDrive" %}
< i class = "bi bi-hdd" > < / i >
{% elif dev.type == "SolidStateDrive" %}
< i class = "bi bi-device-ssd" > < / i >
{% elif dev.type == "NetworkAdapter" %}
2025-02-14 20:51:11 +00:00
< i class = "bi bi-pci-card-network" > < / i >
2025-02-13 16:22:00 +00:00
{% elif dev.type == "Processor" %}
< i class = "bi bi-cpu" > < / i >
{% elif dev.type == "RamModule" %}
< i class = "bi bi-memory" > < / i >
{% elif dev.type == "SoundCard" %}
< i class = "bi bi-speaker" > < / i >
{% elif dev.type == "Display" %}
< i class = "bi bi-display" > < / i >
{% elif dev.type == "Battery" %}
< i class = "bi bi-battery" > < / i >
{% elif dev.type == "Camera" %}
< i class = "bi bi-camera" > < / i >
{% endif %}
{{dev.type}}
2024-11-28 02:58:23 +00:00
< / td >
< td class = "text-center" >
2024-09-26 03:22:21 +00:00
{{ dev.manufacturer }}
2025-02-10 20:38:22 +00:00
< / td >
< td class = "text-center" >
{% if dev.version %}
{{dev.version}} {{ dev.model }}
{% else %}
{{ dev.model }}
{% endif %}
< / td >
< td class = "text-center" >
{{ dev.get_current_state.state|default:"N/A" }}
< / td >
< td class = "text-center" >
2025-02-11 18:31:04 +00:00
{{ dev.last_evidence.created }}
2025-02-10 20:38:22 +00:00
< / td >
< / tr >
< / tbody >
2024-07-05 13:32:07 +00:00
{% endfor %}
< / table >
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
2025-02-14 20:51:11 +00:00
< div class = "mt-5 d-flex align-items-center justify-content-center" >
2024-10-02 10:51:40 +00:00
{% render_pagination page total_pages limit %}
2024-10-02 10:13:05 +00:00
< / 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 %}