Better documentation #85
Comments
Yes indeed the datatable is not very finished actually. https://github.com/KnpLabs/rad-edition-site Just make a pull request, and the changes would be automatically deployed after the merge. Moreover, the wiki can accept modification / additions too: https://github.com/KnpLabs/KnpRadBundle/wiki/_pages PS: concerning your code, I would prefer put this config in the twig template directly: <table class="table table-hover table-bordered table-condensed">
{{ bootstrap_datatable(items, {bootstrap: 'Twitter_Bootstrap', routes: {
show: { path: 'app_user_show' }}
) }}
</table>
|
I'm ok to append documentation to your wiki. What is "KnpLabs/rad-edition-site" ? Concerning the config in my example, I think I'll put it in a yaml config file. Thanks for all |
Great! :) The rad-edition-site is the code behind http://rad.knplabs.com . (PS: my example was for the docs). |
Concerning the changes, there are some internal renamings that needs to be done (like bootstrap option, see #86 ) Moreover, the array of route options are too much. We should better generate directly the url using |
at the end it would look like: <table class="table table-hover table-bordered table-condensed">
{{ bootstrap_datatable(items, {theme: 'Twitter_Bootstrap', links: {
show: { url: path('app_user_show', { id: user.id }) },
delete: { url: path('app_user_delete', { id: user.id }) }
) }}
</table>
|
I think both implementations are interesting. first version of user path
corresponding config file
second version of the user path
corresponding config file
However, the standard implementation you are suggesting is effectively easier. |
I note too that block names / routes, are not corresponding to routes auto created : Tokens used by block are :
However, routes name are ending with :
Config file used to enable buttons in datatable :
It should be better to use the same naming. |
yes indeed! |
oups, that was a mistake from my side. |
datatable headers are build like this :
I think it's a good idea to autogenerate "id". |
sure! this is indeed not good. |
Moreover, we do not need an ID on this element. so why generating one? Maybe we even do not need classes. |
indeed .. seems there are a lot of undocumented features. |
ah, I haven't looked at the wiki yet |
Hi all,
First of all, thanks for this great work. 馃憤
I've tested routing, forms and datatables and it's really easy to use.
With symfony 2.2 I've been obliged to use this :
Concerning the globale documentation, it is really poor.
For example, reading the code, I found how to add button in the table building this var :
and setting it in the twig template like that :
But I haven't been able to find such documentation about it.
Thanks for your feedback.
The text was updated successfully, but these errors were encountered: