Be smarter about showing non-active Harvest Clients
This commit is contained in:
parent
a270d1dcc2
commit
4bad4e262c
|
@ -51,11 +51,18 @@ class HarvestClientView(HarvestMasterView):
|
||||||
g.filters['name'].default_active = True
|
g.filters['name'].default_active = True
|
||||||
g.filters['name'].default_verb = 'contains'
|
g.filters['name'].default_verb = 'contains'
|
||||||
|
|
||||||
|
g.filters['is_active'].default_active = True
|
||||||
|
g.filters['is_active'].default_verb = 'is_true'
|
||||||
|
|
||||||
g.set_sort_defaults('name')
|
g.set_sort_defaults('name')
|
||||||
|
|
||||||
g.set_link('id')
|
g.set_link('id')
|
||||||
g.set_link('name')
|
g.set_link('name')
|
||||||
|
|
||||||
|
def grid_extra_class(self, client, i):
|
||||||
|
if not client.is_active:
|
||||||
|
return 'warning'
|
||||||
|
|
||||||
def configure_form(self, f):
|
def configure_form(self, f):
|
||||||
super(HarvestClientView, self).configure_form(f)
|
super(HarvestClientView, self).configure_form(f)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue