Allow sort/filter by vendor for sample files grid
This commit is contained in:
parent
cf7e3c2302
commit
a81e121ffd
5
tailbone/views/vendors/samplefiles.py
vendored
5
tailbone/views/vendors/samplefiles.py
vendored
|
@ -61,8 +61,13 @@ class VendorSampleFileView(MasterView):
|
||||||
|
|
||||||
def configure_grid(self, g):
|
def configure_grid(self, g):
|
||||||
super(VendorSampleFileView, self).configure_grid(g)
|
super(VendorSampleFileView, self).configure_grid(g)
|
||||||
|
model = self.model
|
||||||
|
|
||||||
# vendor
|
# vendor
|
||||||
|
g.set_joiner('vendor', lambda q: q.join(model.Vendor))
|
||||||
|
g.set_sorter('vendor', model.Vendor.name)
|
||||||
|
g.set_filter('vendor', model.Vendor.name,
|
||||||
|
default_active=True, default_verb='contains')
|
||||||
g.set_link('vendor')
|
g.set_link('vendor')
|
||||||
|
|
||||||
# filename
|
# filename
|
||||||
|
|
Loading…
Reference in a new issue