From c30e5b232ecec2899c91f0176a66647dc8ada0ee Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 25 Jul 2019 14:38:53 -0500 Subject: [PATCH] Highlight inactive product flags as 'warning' in grid --- tailbone_corepos/views/corepos/products.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tailbone_corepos/views/corepos/products.py b/tailbone_corepos/views/corepos/products.py index 6d6b87d..28f8a23 100644 --- a/tailbone_corepos/views/corepos/products.py +++ b/tailbone_corepos/views/corepos/products.py @@ -158,6 +158,10 @@ class ProductFlagView(CoreOfficeMasterView): g.set_link('bit_number') g.set_link('description') + def grid_extra_class(self, flag, i): + if not flag.active: + return 'warning' + def includeme(config): ProductView.defaults(config)