ApplyRulesTable: gray out disabled rows like in...

...objects tables
This commit is contained in:
Thomas Gelf 2017-07-13 12:45:52 +02:00
parent 7e2b8ce97b
commit a23e77ef90

View File

@ -41,11 +41,17 @@ class ApplyRulesTable extends ZfQueryBasedTable
'id' => $row->id, 'id' => $row->id,
]); ]);
return static::tr([ $tr = static::tr([
static::td(Link::create($row->object_name, $url)), static::td(Link::create($row->object_name, $url)),
static::td($this->renderApplyFilter($row->assign_filter)), static::td($this->renderApplyFilter($row->assign_filter)),
// NOT (YET) static::td($this->createActionLinks($row))->setSeparator(' ') // NOT (YET) static::td($this->createActionLinks($row))->setSeparator(' ')
]); ]);
if ($row->disabled === 'y') {
$tr->attributes()->add('class', 'disabled');
}
return $tr;
} }
public function filterTemplate( public function filterTemplate(
@ -136,6 +142,7 @@ class ApplyRulesTable extends ZfQueryBasedTable
$columns = [ $columns = [
'id' => 'o.id', 'id' => 'o.id',
'object_name' => 'o.object_name', 'object_name' => 'o.object_name',
'disabled' => 'o.disabled',
'assign_filter' => 'o.assign_filter', 'assign_filter' => 'o.assign_filter',
]; ];
$query = $this->db()->select()->from( $query = $this->db()->select()->from(