From 71926f01c0f939af41c3230d0a7d2d931ce9c109 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 15 Mar 2022 09:16:01 +0100 Subject: [PATCH] new list of device for filter --- ereuse_devicehub/inventory/forms.py | 45 +++++-------------- .../templates/inventory/device_list.html | 39 ++++++++++++++++ 2 files changed, 51 insertions(+), 33 deletions(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index ae827195..6861947b 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -53,11 +53,9 @@ from ereuse_devicehub.resources.user.models import User DEVICES = [ ("All", "All"), - ("Computer", "Computer"), ("Desktop", "Desktop"), ("Laptop", "Laptop"), ("Server", "Server"), - ("Monitor", "Monitor"), ("ComputerMonitor", "ComputerMonitor"), ("TelevisionSet", "TelevisionSet"), ("Projector", "Projector"), @@ -65,49 +63,30 @@ DEVICES = [ ("Smartphone", "Smartphone"), ("Tablet", "Tablet"), ("Cellphone", "Cellphone"), - ("JoinedComponentTableMixin", "JoinedComponentTableMixin"), ("GraphicCard", "GraphicCard"), - ("DataStorage", "DataStorage"), ("HardDrive", "HardDrive"), ("SolidStateDrive", "SolidStateDrive"), ("Motherboard", "Motherboard"), - ("NetworkMixin", "NetworkMixin"), ("NetworkAdapter", "NetworkAdapter"), ("Processor", "Processor"), ("RamModule", "RamModule"), ("SoundCard", "SoundCard"), - ("Display", "Display"), ("Battery", "Battery"), - ("Camera", "Camera"), - ("ComputerAccessory", "ComputerAccessory"), - ("SAI", "SAI"), ("Keyboard", "Keyboard"), ("Mouse", "Mouse"), ("MemoryCardReader", "MemoryCardReader"), - ("Networking", "Networking"), - ("Router", "Router"), - ("Switch", "Switch"), - ("Hub", "Hub"), - ("WirelessAccessPoint", "WirelessAccessPoint"), - ("Printer", "Printer"), - ("LabelPrinter", "LabelPrinter"), - ("Sound", "Sound"), - ("Microphone", "Microphone"), - ("Video", "Video"), - ("VideoScaler", "VideoScaler"), - ("Videoconference", "Videoconference"), - ("Cooking", "Cooking"), - ("Mixer", "Mixer"), - ("DIYAndGardening", "DIYAndGardening"), - ("Drill", "Drill"), - ("PackOfScrewdrivers", "PackOfScrewdrivers"), - ("Home", "Home"), - ("Dehumidifier", "Dehumidifier"), - ("Stairs", "Stairs"), - ("Recreation", "Recreation"), - ("Bike", "Bike"), - ("Racket", "Racket"), - ("Manufacturer", "Manufacturer"), + ("GraphicCard", "GraphicCard"), + ("HardDrive", "HardDrive"), + ("SolidStateDrive", "SolidStateDrive"), + ("Motherboard", "Motherboard"), + ("NetworkAdapter", "NetworkAdapter"), + ("Processor", "Processor"), + ("RamModule", "RamModule"), + ("SoundCard", "SoundCard"), + ("Battery", "Battery"), + ("Keyboard", "Keyboard"), + ("Mouse", "Mouse"), + ("MemoryCardReader", "MemoryCardReader"), ] diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index eacbda29..08cb18ea 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -296,7 +296,46 @@
{% for f in form_filter %} + {% if f == form_filter.filter %} + + {% else %} {{ f }} + {% endif %} {% endfor %}