Coder Social home page Coder Social logo

mmucklo / dtcgridbundle Goto Github PK

View Code? Open in Web Editor NEW
20.0 5.0 11.0 2.16 MB

Datagrid for Symfony 2/3/4/5

License: MIT License

PHP 83.25% CSS 0.52% JavaScript 5.65% Makefile 0.03% Twig 10.54%
datatables bootstrap jqgrid jquery php symfony symfony2 symfony3 grid doctrine-orm

dtcgridbundle's People

Contributors

chibanglw avatar dtee avatar gounlaf avatar i-telligence-af avatar klodoma avatar mmucklo avatar silvioq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dtcgridbundle's Issues

Lenguaje | Language

Hola, me encanta el grid, pero no puedo cambiarle el idioma. ¿Es posibe cambiarlo a Español?
................. .................. ................ ................
Hi there, i wil like to shange the language of the grid, i love it but i can't use it like that. How can i do that?

Lazyload datatable

hi,

in your document, you mention:
"(warning: if your table is large, skip this example, and try the paginated datatables path below)"

does this mean that datatable by default will lazyload the data and only show portion of data?

symfony 5

Does this package support symfony 5?

Custom Doctrine QueryBuilder

Hello, I couldn't find a way so I'd like to ask if I can pass my own QueryBuilder to datagrid. For example I have datagrid for users but I'd like to list only users with same company_id as currently logged in users. Is it possible?

Incompatibility with Twig 3

Hi,

It seems like the package is incompatible with Twig 3 because it has removed the \Twig_Extension class, which was previously deprecated. During development it doesn't really matter because it is never autoloaded because Twig\Extension\AbstractExtension exists
image

However, during build time of a Docker image in which composer dumps the autoloader it still tries to load the class, which fails because it is not available in Twig 3 anymore.
image

If a class_exists call during autoload dump works, I think that is the easiest solution, i.e. duplicating what you're doing in the GridSourceCompilerPass::legacyTwigExtension.

!class_exists('Twig\Extension\AbstractExtension')

around the

class TwigExtension extends \Twig_Extension

declaration. The file wouldn't ever be loaded unless the compiler pass deems it necessary, with the same if-statement.

If not, it might also be possible to exclude the file from being parsed during classmap generation (https://getcomposer.org/doc/04-schema.md#exclude-files-from-classmaps).

Let me know and I'll work on a PR :)

symfony 3.4 Class "dtc_grid.controller.grid" does not exist.

hi

i can't access the https://data.happymarketing.fr/admin/dtc_queue/jobs_all, got an error 500 ajax
/data?id=Dtc%5CQueueBundle%5CEntity%5CJob&renderer=datatables&fields%5B%5D=id&fields%5B%5D=whenUs&fields%5B%5D=workerName&fields%5B%5D=className&fields%5B%5D=method&fields%5B%5D=priority&fields%5B%5D=expiresAt&fields%5B%5D=startedAt&fields%5B%5D=status&fields%5B%5D=%5C%24-action&limit=10&offset=0&order%5Bid%5D=asc&_=1683748970992 500 (Internal Server Error)

Type error when symfony-cmf/routing-bundle is used

Steps to reproduce:

  1. install mmucklo/grid-bundle (in my case via mmucklo/queue-bundle
  2. install symfony symfony-cmf/routing-bundle:
    composer require symfony-cmf/routing-bundle
  3. navigate to any page with uses Grid/Renderer/RendererFactory (e.g. /dtc_queue/jobs)

Error:
Type error: Argument 1 passed to Dtc\GridBundle\Grid\Renderer\RendererFactory::__construct() must be an instance of Symfony\Component\Routing\Router, instance of Symfony\Cmf\Component\Routing\ChainRouter given, called in ***/var/cache/dev/Container9puq8a9/getDtcGrid_Renderer_FactoryService.php on line 8

Problem:
The problem is that symfony-cmf/routing-bundle replaces the Symfony\Component\Routing\Router with Symfony\Cmf\Component\Routing\ChainRouter. ChainRouter chains many routers, including the Symfony default router. ChainRouter implements Symfony\Component\Routing\RouterInterface just like Symfony\Component\Routing\Router. To fix the code, I suggest changing the type of Symfony\Component\Routing\Router to Symfony\Component\Routing\RouterInterface.

DataTables Search?

It seems searching using DataTables "Search" field is not supported with MongoDB documents. Am I right?
Currently on my application, using this field immediately empties the table.

I've found this which might indicate so:

// @TODO - maybe allow pattern searches some day: new \MongoRegex('/.*'.$value.'.*/')

I suppose the alternative would be to use filter/sort/search on the client side using the appropriate config directive, but it's not possible with large collections.

Question about Entity annotation

Hello @mmucklo ,
I'm currently working with you dtc grid, its very useful, thank you for you work, you did great.
However, i'm trying to display an entity's child named 'GameUser' from my entity 'Weapon'.
I've got a ManyToOne relation between my entities 'Weapon' and 'GameUser', but when im trying to display the unique child 'GameUser' in my grid, this happens 'object: Proxies_CG_\App\Entity\GameUser'.
Do you know how can I fix that ?
Thank you :)

Column order

It would be good to have the ability to add an "order" parameter to the Column annotation to specify the order of a particular column in relation to the others.

Installation under PHP 8.1.6 with Symfony 5 failde

PS C:\xampp\htdocs\menukarte> composer diagnose
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK git version 2.37.1
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.4.1
PHP version: 8.1.6
PHP binary path: C:\xampp\php\php.exe
OpenSSL version: OpenSSL 1.1.1n 15 Mar 2022
cURL version: 7.77.0 libz 1.2.12 ssl OpenSSL/1.1.1n
zip: extension present, unzip not available, 7-Zip not available
PS C:\xampp\htdocs\menukarte>


Fehlermeldungen

S C:\xampp\htdocs\menukarte> composer require mmucklo/grid-bundle
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^7.3 for mmucklo/grid-bundle
./composer.json has been updated
Running composer update mmucklo/grid-bundle
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.4.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- laminas/laminas-code 3.4.1 requires php ^7.1 -> your php version (8.1.6) does not satisfy that requirement.
- symfony/proxy-manager-bridge v5.4.6 requires friendsofphp/proxy-manager-lts ^1.0.2 -> satisfiable by friendsofphp/proxy-manager-lts[v1.0.12].
- friendsofphp/proxy-manager-lts v1.0.12 requires laminas/laminas-code ~3.4.1|^4.0 -> satisfiable by laminas/laminas-code[3.4.1].
- symfony/proxy-manager-bridge is locked to version v5.4.6 and an update of this package was not requested.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require mmucklo/grid-bundle:*" to figure out if any version is installable, or "composer require mmucklo/grid-bundle:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
PS C:\xampp\htdocs\menukarte>

where is ma fault ??
Thanks
Uwe Pfeiffer

ClassMetadata Namespace Fix

I'm using DtcGridBundle with DtcQueueBundle:

I got the following error, when displaying almost any DtcQueue interface:

Argument 2 passed to Dtc\GridBundle\Grid\Source\ColumnSource::getCachedColumnInfo() must be an instance of Doctrine\Common\Persistence\Mapping\ClassMetadata, instance of Doctrine\ORM\Mapping\ClassMetadata given

I found that changing the import (Line 6) in Dtc\GridBundle\Grid\Source\ColumnSource:

FROM:
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
TO:
use Doctrine\ORM\Mapping\ClassMetadata;

=> Simply fixes the issue

This has to do with some changes recently done in Doctrine Persistence

I made this issue to help people having the same issue as me.
Can you please include this fix? Or do you need a PR?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.