In-place editing for text, datetime and boolean fields added (before usage you should manually include dependent x-editable js and css files).
Example:
->add('title', 'column', array(
'title' => 'Titel',
'editable' => true
))
->add('publishedAt', 'datetime', array(
'title' => 'PublishedAt',
'name' => 'daterange',
'date_format' => 'll',
'editable' => true
))
->add('visible', 'boolean', array(
'title' => 'Visible',
'editable' => true
))
The multiselect ajax request sends now a CSRF-Token.
Update your bulk-actions like this:
/**
* Bulk delete action.
*
* @param Request $request
*
* @Route("/bulk/delete", name="post_bulk_delete")
* @Method("POST")
*
* @return Response
*/
public function bulkDeleteAction(Request $request)
{
$isAjax = $request->isXmlHttpRequest();
if ($isAjax) {
$choices = $request->request->get('data');
$token = $request->request->get('token');
if (!$this->isCsrfTokenValid('multiselect', $token)) {
throw new AccessDeniedException('The CSRF token is invalid.');
}
$em = $this->getDoctrine()->getManager();
$repository = $em->getRepository('AppBundle:Post');
foreach ($choices as $choice) {
$entity = $repository->find($choice['value']);
$em->remove($entity);
}
$em->flush();
return new Response('Success', 200);
}
return new Response('Bad Request', 400);
}
Extensions like Buttons or Responsive
Integrate the Translatable behavior extension for Doctrine 2
Integrate the LiipImagineBundle / ImageColumn, GalleryColumn and thumbnails
Much like every other piece of software SgDatatablesBundle
is not perfect and far from feature complete.
The ClientSide mode currently does not work with all features. There are some problems with the Buttons-Extension and MultiSelectColumn. At the moment I can not say whether the ClientSide mode is supported by me in the future. Priority has the ServerSide mode.
- This bundle does not support multiple Ids
- 4th level associations are currently not supported
- Searching and filtering on a virtual column not yet implemented and disabled by default
- PostgreSql is not supported
Issues and feature requests are tracked in the Github issue tracker.
This bundle is available under the MIT license. See the complete license in the bundle:
Resources/meta/LICENSE
You are free to use, modify and distribute this software, as long as the copyright header is left intact (specifically the comment block which starts with /*)!