2024-11-26 20:11:40 +00:00
{% load i18n static language_code %}
2024-07-01 10:19:21 +00:00
2024-07-05 13:32:07 +00:00
<!doctype html>
< html lang = "en" >
< head >
{% block head %}
{% block meta %}
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
< meta name = "robots" content = "NONE,NOARCHIVE" / >
2024-11-26 20:11:40 +00:00
< meta name = "viewp ort" content = "width=device-width, initial-scale=1.0" >
2024-07-05 13:32:07 +00:00
< meta name = "description" content = "" >
< meta name = "author" content = "Pangea" >
{% endblock %}
< title > {% block title %}{% if title %}{{ title }} – {% endif %}DeviceHub{% endblock %}< / title >
<!-- Bootstrap core CSS -->
{% block style %}
< link rel = "stylesheet" href = "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" >
< link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" >
< link href = "{% static " / css / bootstrap . min . css " % } " rel = "stylesheet" >
2024-12-03 18:01:16 +00:00
< script src = "{% static 'js/Sortable.min.js' %}" > < / script >
2024-07-05 13:32:07 +00:00
< style >
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
html, body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
.main-content {
flex-grow: 1;
}
footer {
width: 100%;
}
< / style >
2025-01-15 15:52:16 +00:00
2024-07-05 13:32:07 +00:00
<!-- Custom styles for this template -->
< link href = "{% static " / css / dashboard . css " % } " rel = "stylesheet" >
{% endblock %}
{% endblock %}
< / head >
< body >
< header class = "navbar navbar-dark sticky-top admin bg-green flex-md-nowrap p-0 shadow" >
2024-07-31 17:24:22 +00:00
< a class = "navbar-brand col-md-3 col-lg-2 me-0 px-3" href = "#" > DEVICEHUB< / a >
2024-07-05 13:32:07 +00:00
< div class = "navbar-nav navbar-sub-brand" >
2024-10-10 08:35:27 +00:00
{{ user.institution.name|upper }}
2024-07-05 13:32:07 +00:00
< / div >
2025-02-10 10:42:04 +00:00
< nav class = "navbar navbar-expand-sm" >
< div class = "container-fluid d-flex justify-content-end" >
< div class = "nav-item dropdown" >
< a class = "nav-link dropdown-toggle navbar-sub-brand px-3" href = "#" role = "button" data-bs-toggle = "dropdown" aria-expanded = "false" >
{{ user.email }}
2024-07-05 13:32:07 +00:00
< / a >
2025-02-10 10:42:04 +00:00
< ul class = "dropdown-menu dropdown-menu-end" >
2025-02-11 18:31:33 +00:00
< li > < a class = "dropdown-item" href = "{% url 'user:panel' %}" > < i class = "bi bi-person" > < / i > {% trans 'Profile' %}< / a > < / li >
< li > < a class = "dropdown-item" href = "{% url 'api:tokens' %}" > < i class = "bi bi-key" > < / i > {% trans 'Token' %}< / a > < / li >
< li > < a class = "dropdown-item" href = "{% url 'user:settings' %}" > < i class = "bi bi-gear" > < / i > {% trans 'Settings File' %}< / a > < / li >
2025-02-10 10:42:04 +00:00
< li > < hr class = "dropdown-divider" > < / li >
2025-02-11 18:31:33 +00:00
< li > < a class = "dropdown-item text-danger" href = "{% url 'login:logout' %}" > < i class = "fa-solid fa-arrow-right-from-bracket" > < / i > {% trans 'Logout' %} < / a > < / li >
2025-02-10 10:42:04 +00:00
< / ul >
< / div >
2024-07-05 13:32:07 +00:00
< / div >
2025-02-10 10:42:04 +00:00
< / nav >
2024-07-05 13:32:07 +00:00
< / header >
< div class = "container-fluid" >
< div class = "row" >
< nav id = "sidebarMenu" class = "col-md-3 col-lg-2 d-md-block bg-light sidebar collapse" >
< div class = "position-sticky pt-5" >
< ul class = "nav flex-column" >
2024-10-03 15:46:02 +00:00
{% if user.is_admin %}
< li class = "nav-item" >
2025-01-15 15:52:16 +00:00
< a class = "admin {% if path in 'panel users states_panel edit_user delete_user new_user institution' %}active {% endif %}nav-link fw-bold" data-bs-toggle = "collapse" data-bs-target = "#ul_admin" aria-expanded = "false" aria-controls = "ul_admin" href = "javascript:void()" >
2024-10-03 15:46:02 +00:00
< i class = "bi bi-person-fill-gear icon_sidebar" > < / i >
{% trans 'Admin' %}
< / a >
2025-01-15 15:52:16 +00:00
< ul class = "flex-column mb-2 ul_sidebar accordion-collapse {% if path in 'panel institution users edit_user new_user delete_user states_panel' %}expanded{% else %}collapse{% endif %}" id = "ul_admin" data-bs-parent = "#sidebarMenu" >
2024-10-03 15:46:02 +00:00
< li class = "nav-item" >
2025-01-15 15:52:16 +00:00
< a class = "nav-link{% if path in 'panel institution' %} active2{% endif %}" href = "{% url 'admin:panel' %}" >
2024-10-03 15:46:02 +00:00
{% trans 'Panel' %}
< / a >
< / li >
< li class = "nav-item" >
2025-01-15 15:52:16 +00:00
< a class = "nav-link{% if path in 'users edit_user new_user delete_user' %} active2{% endif %}" href = "{% url 'admin:users' %}" >
2024-10-03 15:46:02 +00:00
{% trans 'Users' %}
< / a >
< / li >
2024-12-01 05:58:22 +00:00
< li class = "nav-item" >
2025-01-15 15:52:16 +00:00
< a class = "nav-link{% if path == 'states_panel' %} active2{% endif %}" href = "{% url 'admin:states_panel' %}" >
2024-12-01 05:58:22 +00:00
{% trans 'States' %}
< / a >
< / li >
2024-10-03 15:46:02 +00:00
< / ul >
< / li >
{% endif %}
2024-07-05 13:32:07 +00:00
< li class = "nav-item" >
2024-09-17 10:21:00 +00:00
< a class = "admin {% if path == 'unassigned_devices' %}active {% endif %}nav-link fw-bold" data-bs-toggle = "collapse" data-bs-target = "#ul_devices" aria-expanded = "false" aria-controls = "ul_devices" href = "javascript:void()" >
2024-07-05 13:32:07 +00:00
< i class = "bi bi-laptop icon_sidebar" > < / i >
{% trans 'Devices' %}
< / a >
2024-09-17 10:21:00 +00:00
< ul class = "flex-column mb-2 ul_sidebar accordion-collapse {% if path == 'unassigned_devices' %}expanded{% else %}collapse{% endif %}" id = "ul_devices" data-bs-parent = "#sidebarMenu" >
2024-07-05 13:32:07 +00:00
< li class = "nav-item" >
2024-09-17 10:21:00 +00:00
< a class = "nav-link{% if path == 'unassigned_devices' %} active2{% endif %}" href = "{% url 'dashboard:unassigned_devices' %}" >
2024-11-28 05:50:57 +00:00
{% trans 'Unassigned' %}
2024-07-05 13:32:07 +00:00
< / a >
< / li >
< / ul >
< / li >
< li class = "nav-item" >
2024-09-17 10:21:00 +00:00
< a class = "admin {% if path == 'tag' %}active {% endif %}nav-link fw-bold" data-bs-toggle = "collapse" data-bs-target = "#ul_lots" aria-expanded = "false" aria-controls = "ul_lots" href = "javascript:void()" >
2024-07-05 13:32:07 +00:00
< i class = "bi bi-database icon_sidebar" > < / i >
{% trans 'Lots' %}
< / a >
2024-09-17 10:21:00 +00:00
< ul class = "flex-column mb-2 ul_sidebar accordion-collapse {% if path == 'tag' %}expanded{% else %}collapse{% endif %}" id = "ul_lots" data-bs-parent = "#sidebarMenu" >
2024-07-18 15:21:22 +00:00
{% for tag in lot_tags %}
2024-07-05 13:32:07 +00:00
< li class = "nav-items" >
2024-09-17 10:21:00 +00:00
< a class = "nav-link{% if path == 'tag' %} active2{% endif %}" href = "{% url 'lot:tag' tag.id %}" >
2024-07-18 15:21:22 +00:00
{{ tag.name }}
2024-07-05 13:32:07 +00:00
< / a >
< / li >
2024-07-18 15:21:22 +00:00
{% endfor %}
2024-07-05 13:32:07 +00:00
< / ul >
< / li >
< li class = "nav-item" >
2024-09-17 10:21:00 +00:00
< a class = "admin {% if path in 'upload list' %}active {% endif %}nav-link fw-bold" data-bs-toggle = "collapse" data-bs-target = "#ul_evidences" aria-expanded = "false" aria-controls = "ul_evidences" href = "javascript:void()" >
2024-07-05 13:32:07 +00:00
< i class = "bi bi-usb-drive icon_sidebar" > < / i >
2024-09-17 10:21:00 +00:00
{% trans 'Evidences' %}
2024-07-05 13:32:07 +00:00
< / a >
2024-09-17 10:21:00 +00:00
< ul class = "flex-column mb-2 ul_sidebar accordion-collapse {% if path in 'upload list' %}expanded{% else %}collapse{% endif %}" id = "ul_evidences" data-bs-parent = "#sidebarMenu" >
2024-07-05 13:32:07 +00:00
< li class = "nav-item" >
2024-09-17 10:21:00 +00:00
< a class = "nav-link{% if path == 'upload' %} active2{% endif %}" href = "{% url 'evidence:upload' %}" >
2024-11-28 05:50:57 +00:00
{% trans 'Upload' %}
2024-07-05 13:32:07 +00:00
< / a >
< / li >
< li class = "nav-item" >
2024-09-17 10:21:00 +00:00
< a class = "nav-link{% if path == 'list' %} active2{% endif %}" href = "{% url 'evidence:list' %}" >
2024-07-26 15:59:34 +00:00
{% trans 'Old evidences' %}
2024-07-05 13:32:07 +00:00
< / a >
< / li >
< / ul >
< / li >
< li class = "nav-item" >
2024-09-17 10:21:00 +00:00
< a class = "admin {% if path in 'import add' %}active {% endif %}nav-link fw-bold" data-bs-toggle = "collapse" data-bs-target = "#ul_placeholders" aria-expanded = "false" aria-controls = "ul_placeholders" href = "javascript:void()" >
2024-07-05 13:32:07 +00:00
< i class = "bi-menu-button-wide icon_sidebar" > < / i >
{% trans 'Placeholders' %}
< / a >
2024-09-17 10:21:00 +00:00
< ul class = "flex-column mb-2 ul_sidebar accordion-collapse {% if path in 'import add' %}expanded{% else %}collapse{% endif %}" id = "ul_placeholders" data-bs-parent = "#sidebarMenu" >
2024-07-05 13:32:07 +00:00
< li class = "nav-item" >
2024-09-17 10:21:00 +00:00
< a class = "nav-link{% if path == 'import' %} active2{% endif %}" href = "{% url 'evidence:import' %}" >
2024-11-28 05:50:57 +00:00
{% trans 'Import from spreadsheet' %}
2024-07-05 13:32:07 +00:00
< / a >
< / li >
< li class = "nav-item" >
2024-09-17 10:21:00 +00:00
< a class = "nav-link{% if path == 'add' %} active2{% endif %}" href = "{% url 'device:add' %}" >
2024-11-28 05:50:57 +00:00
{% trans 'Add device' %}
2024-07-05 13:32:07 +00:00
< / a >
< / li >
< / ul >
< / li >
< / ul >
< / div >
< / nav >
< main class = "col-md-9 ms-sm-auto col-lg-10 px-md-4" >
{% block messages %}
{% for message in messages %}
< div class = "alert {{ message.tags|default:'info' }} alert-dismissible fade show mt-3" role = "alert" >
{{ message }}
< button type = "button" class = "btn-close" data-bs-dismiss = "alert" aria-label = "Close" >
< / button >
< / div >
{% endfor %}
{% endblock messages %}
< div class = "d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2" >
2024-12-14 19:41:18 +00:00
< h1 class = "h2" > {{ title }}
{% if help_text %}
< span class = "ms-1" data-bs-toggle = "tooltip" data-bs-placement = "right" title = "{{ help_text }}" >
< i class = "fas fa-question-circle text-secondary h6 align-top" > < / i >
2025-01-15 15:52:16 +00:00
< / span >
2024-12-14 19:41:18 +00:00
{% endif %}
< / h1 >
2025-01-15 15:52:16 +00:00
2024-12-14 19:41:18 +00:00
< form method = "post" action = "{% url 'dashboard:search' %}" >
2024-10-09 10:18:09 +00:00
{% csrf_token %}
< div class = "input-group rounded" >
2024-11-27 05:05:57 +00:00
< input type = "search" name = "search" class = "form-control rounded" placeholder = "{% trans 'Search your device' %}" aria-label = "Search" aria-describedby = "search-addon" / >
2024-10-09 10:18:09 +00:00
< span class = "input-group-text border-0" id = "search-addon" >
< i class = "fas fa-search" > < / i >
< / span >
< / div >
< / form >
2025-01-15 15:52:16 +00:00
2024-07-05 13:32:07 +00:00
< / div >
2025-01-15 15:52:16 +00:00
2024-07-05 13:32:07 +00:00
< div class = "row border-bottom mb-3" >
< div class = "col" >
< small style = "color:#899bbd" > < i > {{ breadcrumb }}< / i > < / small >
< / div >
< div class = "btn-toolbar mb-2 mb-md-0" >
< / div >
< / div >
2025-02-14 20:51:11 +00:00
< div class = "d-flex flex-wrap gap-2 justify-content-end m-2 mb-4" >
2025-02-08 22:06:38 +00:00
{% block actions %}
{% endblock %}
< / div >
2025-02-14 20:51:11 +00:00
< div class = "mx-2" >
2024-07-05 13:32:07 +00:00
{% block content %}
{% endblock content %}
2025-02-14 20:51:11 +00:00
< / div >
2024-07-05 13:32:07 +00:00
< / main >
< / div >
< / div >
2025-01-30 23:02:59 +00:00
<!-- Footer -->
< footer class = "footer mt-auto py-3" style = "width: 100%;" >
< div class = "container-fluid" >
< div class = "d-flex justify-content-between align-items-center" >
< span class = "text-muted mx-auto" > {{ commit_id }}< / span >
2025-02-14 21:08:55 +00:00
{% include "language_picker.html" %}
2024-07-05 13:32:07 +00:00
< / div >
2025-01-30 23:02:59 +00:00
< / div >
< / footer >
2024-07-05 13:32:07 +00:00
2025-01-30 23:02:59 +00:00
{% block script %}
2024-07-05 13:32:07 +00:00
< script src = "{% static " js / jquery-3 . 3 . 1 . slim . min . js " % } " > < / script >
< script src = "{% static " js / popper . min . js " % } " > < / script >
< script src = "{% static " js / bootstrap . min . js " % } " > < / script >
2025-02-07 19:52:47 +00:00
< script >
// initialize bootstrap tooltips for those objects with data-bs-toggle="tooltip"
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
< / script >
2024-07-05 13:32:07 +00:00
{% block extrascript %}{% endblock %}
{% endblock %}
< / body >
2024-12-14 19:41:18 +00:00
< script >
2025-01-15 15:52:16 +00:00
//If help_text is passed to the view as context, a hover-able help icon is displayed
2024-12-14 19:41:18 +00:00
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
< / script >
2024-07-01 10:19:21 +00:00
< / html >