CrudGeneratorBundle icon indicating copy to clipboard operation
CrudGeneratorBundle copied to clipboard

Bootstrap + filters

Open mrcmorales opened this issue 11 years ago • 11 comments

Hola,

Estoy provando el bundle, he cargado el css de bootstrap en base.html.twig, pero en el list view no lo veo con el estilo bootstrap ni me salen los filtros? es normal?

Gracias

Saludos

mrcmorales avatar May 24 '13 15:05 mrcmorales

No utiliza el base. Tiene su propia vista layou El 24/05/2013 12:54, "Marc Morales Valldepérez" [email protected] escribió:

Hola,

Estoy provando el bundle, he cargado el css de bootstrap en base.html.twig, pero en el list view no lo veo con el estilo bootstrap ni me salen los filtros? es normal?

Gracias

Saludos

— Reply to this email directly or view it on GitHubhttps://github.com/jordillonch/CrudGeneratorBundle/issues/16 .

gonzaloalonsod avatar May 24 '13 16:05 gonzaloalonsod

Todas las plantillas tienen: {% extends '::base.html.twig' %} no?

Es decir, deberia verlo como en la captura de pantalla del readme de este mismo bundle?

No se si el problema viene porque estoy cargando bootstrap v.2.3.1 Gracias

mrcmorales avatar May 24 '13 16:05 mrcmorales

no... tienen

{{ "{% extends 'MWSimpleCrudGeneratorBundle::layout.html.twig' %}" }}

2013/5/24 Marc Morales Valldepérez [email protected]

Todas las plantillas tienen: {% extends '::base.html.twig' %} no?

— Reply to this email directly or view it on GitHubhttps://github.com/jordillonch/CrudGeneratorBundle/issues/16#issuecomment-18414276 .

Gonzalo Alonso

gonzaloalonsod avatar May 24 '13 16:05 gonzaloalonsod

Vaia, pues algo tengo mal, los views que me ha generado el comando app/console jordillonch:generate:crud, todos esos views extenden de base.

He cambiado por el extends {{ "{% extends 'MWSimpleCrudGeneratorBundle::layout.html.twig' %}" }} y me dice que el template no existe....

mrcmorales avatar May 24 '13 16:05 mrcmorales

Oh disculpa me equivoque de bundle :/ igual miro el codigo y deberia generarte de esta manera: {{ "{% extends 'JordiLlonchCrudGeneratorBundle::layout.html.twig' %}" }}

gonzaloalonsod avatar May 24 '13 16:05 gonzaloalonsod

I've been having the same problem as mrcmorales, it could be related to recent updates on Synfomy but for now I'm clueless, I'll do what I can to help tho.

It's not only about the extends, it's about all the templates, this bundle is pulling Sensio templates instead of it's own, that's the bug.

Will comment any finding about this.

vxf avatar May 24 '13 19:05 vxf

Han habido problemas ya que el bundle de Sensio ha cambiado bastante, tenemos pensada hacer una versión que no extienda de él y evite estos problemas pero de momento no hemos podido.

Sé que no es una gran solución pero para un proyecto que estoy haciendo con Symfony 2.2 me ha valido con este composer:

    "jordillonch/crud-generator": "dev-master#d73b3c7aced44b19f663132dfdfb464451e2f9a7",

Intentaremos tener lista la nueva versión sin dependencias lo antes posible, pero mientras tanto, decid si esto os vale

Saludos y disculpas!

ricardclau avatar May 24 '13 20:05 ricardclau

Gracias ricardclau

I already analysed the commits way back to that, it's interesting that such commit is working which I noticed was yours.

Particularly interesting is one of the latest commits which is code similar to the one in the Sensio I'm still figuring what went wrong.

vxf avatar May 24 '13 20:05 vxf

In the previous versions of Sensio bundle all crud actions where POST / GET. Now they added PUT / DELETE methods and also changed the base template they are extending from so the skeleton is completely different.

I think that commits after my hash tried to make it work with the new stuff but obviously something was wrong :)

Anyway, if it works for you, let's keep this commit as the "safe" one and I'll do my best to fix it all at once in the following days!

ricardclau avatar May 24 '13 20:05 ricardclau

Para ver los estilos:

php app/console assets:install

Para que se copien del bundle a la web y puedas ver-lo con estilos.

jaznow avatar Nov 21 '13 18:11 jaznow

Hola! Yo tuve tu mismo inconveniente y lo reparé agregando al index.html.twig la siguientes líneas

    $(document).ready(function () {
        //--- Aplicar estilo de paginación a Jordillonch
        $('div.pagination ul').addClass('pagination pagination-sm');
    });

dkachuk avatar Feb 24 '15 14:02 dkachuk