diff --git a/dashboard/templates/base.html b/dashboard/templates/base.html
index 3034b2e..359130a 100644
--- a/dashboard/templates/base.html
+++ b/dashboard/templates/base.html
@@ -91,7 +91,7 @@
-
+
{% trans 'All devices' %}
diff --git a/dashboard/urls.py b/dashboard/urls.py
index 681b73e..78aadfa 100644
--- a/dashboard/urls.py
+++ b/dashboard/urls.py
@@ -5,5 +5,6 @@ app_name = 'dashboard'
urlpatterns = [
path("", views.UnassignedDevicesView.as_view(), name="unassigned_devices"),
+ path("all/", views.AllDevicesView.as_view(), name="all_devices"),
path("/", views.LotDashboardView.as_view(), name="lot"),
]
diff --git a/dashboard/views.py b/dashboard/views.py
index b38628b..16c34b1 100644
--- a/dashboard/views.py
+++ b/dashboard/views.py
@@ -22,6 +22,21 @@ class UnassignedDevicesView(InventaryMixin):
return context
+class AllDevicesView(InventaryMixin):
+ template_name = "unassigned_devices.html"
+ section = "All"
+ title = _("All Devices")
+ breadcrumb = "Devices / All Devices"
+
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+ devices = Device.objects.filter(owner=self.request.user)
+ context.update({
+ 'devices': devices,
+ })
+ return context
+
+
class LotDashboardView(InventaryMixin, DetailsMixin):
template_name = "unassigned_devices.html"
section = "Unassigned"