mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 02:09:03 +02:00
Use checkboxes for selections instead of the current full row selection.
This commit is contained in:
parent
1915acf069
commit
f6b8e0e227
4 changed files with 75 additions and 20 deletions
36
src/DataTables/Column/SelectColumn.php
Normal file
36
src/DataTables/Column/SelectColumn.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace App\DataTables\Column;
|
||||
|
||||
use Omines\DataTablesBundle\Column\AbstractColumn;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* A column representing the checkboxes for select extensions.
|
||||
*/
|
||||
class SelectColumn extends AbstractColumn
|
||||
{
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
parent::configureOptions($resolver);
|
||||
|
||||
$resolver->setDefaults([
|
||||
'label' => '',
|
||||
'orderable' => false,
|
||||
'searchable' => false,
|
||||
'className' => 'select-checkbox no-colvis',
|
||||
'visible' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
public function normalize($value)
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function render($value, $context)
|
||||
{
|
||||
//Return empty string, as it this column is filled by datatables on client side
|
||||
return '';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue