mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Color a part row if the part is favorite or needs review.
This commit is contained in:
parent
6be863d356
commit
1135bfcbef
4 changed files with 74 additions and 8 deletions
|
@ -27,6 +27,7 @@ use App\DataTables\Column\LocaleDateTimeColumn;
|
|||
use App\DataTables\Column\LogEntryExtraColumn;
|
||||
use App\DataTables\Column\LogEntryTargetColumn;
|
||||
use App\DataTables\Column\RevertLogColumn;
|
||||
use App\DataTables\Column\RowClassColumn;
|
||||
use App\DataTables\Filters\AttachmentFilter;
|
||||
use App\DataTables\Filters\LogFilter;
|
||||
use App\Entity\Base\AbstractDBElement;
|
||||
|
@ -106,10 +107,7 @@ class LogDataTable implements DataTableTypeInterface
|
|||
$options = $resolver->resolve($options);
|
||||
|
||||
//This special $$rowClass column is used to set the row class depending on the log level. The class gets set by the frontend controller
|
||||
$dataTable->add('$$rowClass', TextColumn::class, [
|
||||
'label' => '',
|
||||
'className' => 'no-colvis',
|
||||
'visible' => false,
|
||||
$dataTable->add('dont_matter', RowClassColumn::class, [
|
||||
'render' => static function ($value, AbstractLogEntry $context) {
|
||||
switch ($context->getLevel()) {
|
||||
case AbstractLogEntry::LEVEL_EMERGENCY:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue