Add tables filter action support

This patch adds the ability to filter tables by specified
string.

screenshots:
http://pasteboard.co/2Q1GyCie.png

Change-Id: I1c4577f0f324d0865e5b4fb16df4767a39b40733
Closes-Bug: #1485827
This commit is contained in:
Zhenguo Niu 2015-08-19 23:32:10 +08:00
parent 4890f5e3f2
commit b7cf70b2ce
5 changed files with 15 additions and 4 deletions

View File

@ -111,4 +111,4 @@ class ActionsTable(tables.DataTable):
name = "actions"
verbose_name = _("Actions")
table_actions = (CreateAction, UpdateAction, DeleteAction)
row_actions = (DeleteAction,)
row_actions = (DeleteAction, tables.FilterAction)

View File

@ -96,7 +96,7 @@ class ExecutionsTable(tables.DataTable):
class Meta(object):
name = "executions"
verbose_name = _("Executions")
table_actions = (DeleteExecution,)
table_actions = (DeleteExecution, tables.FilterAction)
row_actions = (DeleteExecution,)

View File

@ -55,3 +55,4 @@ class TaskTable(tables.DataTable):
class Meta(object):
name = "tasks"
verbose_name = _("Tasks")
table_actions = (tables.FilterAction,)

View File

@ -94,5 +94,10 @@ class WorkbooksTable(tables.DataTable):
class Meta(object):
name = "workbooks"
verbose_name = _("Workbooks")
table_actions = (CreateWorkbook, UpdateWorkbook, DeleteWorkbook)
table_actions = (
CreateWorkbook,
UpdateWorkbook,
DeleteWorkbook,
tables.FilterAction
)
row_actions = (DeleteWorkbook,)

View File

@ -111,5 +111,10 @@ class WorkflowsTable(tables.DataTable):
class Meta(object):
name = "workflows"
verbose_name = _("Workflows")
table_actions = (CreateWorkflow, UpdateWorkflow, DeleteWorkflow)
table_actions = (
CreateWorkflow,
UpdateWorkflow,
DeleteWorkflow,
tables.FilterAction
)
row_actions = (ExecuteWorkflow, DeleteWorkflow)