Compare commits

..

No commits in common. "ui-changes" and "main" have entirely different histories.

2 changed files with 11 additions and 13 deletions

View file

@ -113,7 +113,7 @@
<li class="nav-item"> <li class="nav-item">
<a class="admin {% if path in 'all_device' %}active {% endif %}nav-link fw-bold" data-bs-toggle="collapse" data-bs-target="#ul_device" aria-expanded="false" aria-controls="ul_lots" href="javascript:void()"> <a class="admin {% if path in 'all_device' %}active {% endif %}nav-link fw-bold" data-bs-toggle="collapse" data-bs-target="#ul_device" aria-expanded="false" aria-controls="ul_lots" href="javascript:void()">
<i class="bi bi-laptop icon_sidebar"></i> <i class="bi bi-laptop icon_sidebar"></i>
{% trans 'Devices' %} {% trans 'Device' %}
</a> </a>
<ul class="flex-column mb-2 ul_sidebar accordion-collapse {% if path in 'all_device' %}expanded{% else %}collapse{% endif %}" id="ul_device" data-bs-parent="#sidebarMenu"> <ul class="flex-column mb-2 ul_sidebar accordion-collapse {% if path in 'all_device' %}expanded{% else %}collapse{% endif %}" id="ul_device" data-bs-parent="#sidebarMenu">
<li class="nav-item"> <li class="nav-item">
@ -124,7 +124,7 @@
</ul> </ul>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="admin {% if path == 'tags' or path == 'lot' or path in 'unassigned dashboard' %}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()"> <a class="admin {% if path == 'tags' or path == 'lot' or path in 'unassigned dashboard' %}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()">
<i class="bi bi-database icon_sidebar"></i> <i class="bi bi-database icon_sidebar"></i>
{% trans 'Lots' %} {% trans 'Lots' %}
</a> </a>
@ -133,14 +133,11 @@
{% for tag in lot_tags %} {% for tag in lot_tags %}
<li class="nav-items"> <li class="nav-items">
{% if tag.inbox %} {% if tag.inbox %}
<a class="nav-link{% if path == 'inbox' %} active2{% endif %}" href="{% url 'dashboard:unassigned' %}"> <a class="nav-link{% if path == 'unassigned' %} active2{% endif %}" href="{% url 'dashboard:unassigned' %}">
<i>
{{ tag.name }}
</i>
{% else %} {% else %}
<a class="nav-link{% if path == 'tags' %} active2{% endif %}" href="{% url 'lot:tags' tag.id %}"> <a class="nav-link{% if path == 'tags' %} active2{% endif %}" href="{% url 'lot:tags' tag.id %}">
{{ tag.name }}
{% endif %} {% endif %}
{{ tag.name }}
</a> </a>
</li> </li>
{% endfor %} {% endfor %}
@ -159,17 +156,17 @@
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link{% if path == 'upload' %} active2{% endif %}" href="{% url 'evidence:upload' %}"> <a class="nav-link{% if path == 'upload' %} active2{% endif %}" href="{% url 'evidence:upload' %}">
{% trans 'Upload JSON file' %} {% trans 'Upload with JSON file' %}
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link{% if path == 'import' %} active2{% endif %}" href="{% url 'evidence:import' %}"> <a class="nav-link{% if path == 'import' %} active2{% endif %}" href="{% url 'evidence:import' %}">
{% trans 'Upload Spreadsheet' %} {% trans 'Upload with Spreadsheet' %}
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link{% if path == 'add' %} active2{% endif %}" href="{% url 'device:add' %}"> <a class="nav-link{% if path == 'add' %} active2{% endif %}" href="{% url 'device:add' %}">
{% trans 'Upload Web Form' %} {% trans 'Upload with Web Form' %}
</a> </a>
</li> </li>
</ul> </ul>

View file

@ -14,13 +14,14 @@ from lot.models import Lot
class UnassignedDevicesView(InventaryMixin): class UnassignedDevicesView(InventaryMixin):
template_name = "unassigned_devices.html" template_name = "unassigned_devices.html"
section = "Inbox" section = "Unassigned"
title = _("Inbox") title = _("Unassigned Devices")
breadcrumb = "Lot / Inbox" breadcrumb = "Devices / Unassigned Devices"
def get_devices(self, user, offset, limit): def get_devices(self, user, offset, limit):
return Device.get_unassigned(self.request.user.institution, offset, limit) return Device.get_unassigned(self.request.user.institution, offset, limit)
class AllDevicesView(InventaryMixin): class AllDevicesView(InventaryMixin):
template_name = "unassigned_devices.html" template_name = "unassigned_devices.html"
section = "All" section = "All"