Expose the new Store.archived
flag
This commit is contained in:
parent
ee65d08d81
commit
2332cae09b
|
@ -56,6 +56,7 @@ class StoreView(MasterView):
|
|||
'phone',
|
||||
'email',
|
||||
'database_key',
|
||||
'archived',
|
||||
]
|
||||
|
||||
labels = {
|
||||
|
@ -80,6 +81,10 @@ class StoreView(MasterView):
|
|||
g.filters['name'].default_active = True
|
||||
g.filters['name'].default_verb = 'contains'
|
||||
|
||||
# archived
|
||||
g.filters['archived'].default_active = True
|
||||
g.filters['archived'].default_verb = 'is_false_null'
|
||||
|
||||
g.set_sorter('phone', model.StorePhoneNumber.number)
|
||||
g.set_sorter('email', model.StoreEmailAddress.address)
|
||||
g.set_sort_defaults('id')
|
||||
|
@ -87,6 +92,10 @@ class StoreView(MasterView):
|
|||
g.set_link('id')
|
||||
g.set_link('name')
|
||||
|
||||
def grid_extra_class(self, store, i):
|
||||
if store.archived:
|
||||
return 'warning'
|
||||
|
||||
def configure_form(self, f):
|
||||
super(StoreView, self).configure_form(f)
|
||||
|
||||
|
|
Loading…
Reference in a new issue