Open jagltoro opened 10 years ago
You ve only one column in your table model :
/**
@ORM\Entity(repositoryClass="Open\OpenBundle\Repository\UsuarioRepository") / class Pilotos { /*
/**
/**
/**
*/ private $edad;
eg $edad is not a column
2014-03-07 17:17 GMT+01:00 jagltoro notifications@github.com:
Now i can see the AdminGenerator, but it only shows the ID for the table. And some errors of style. I attached an image. [image: 1]https://f.cloud.github.com/assets/6497296/2359094/ad17851c-a613-11e3-8ad6-b41067b28b37.png
My Generator.yml, Entity and Repository are here:
729https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/issues/729
Reply to this email directly or view it on GitHubhttps://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/issues/730 .
Fixed that ORM. Thanks!!, i wouldn't notice that
Now about the text?
pagerfanta.next
pagerfanta.view.perpage
pagerfanta.num.elements
action.generic.new
list.button.filter
list.button.reset
What i have to do to correct it? Also the documentation about translation is a bit confusing, how i activate the default spanish translation?
generator: admingenerator.generator.doctrine
params:
model: At\OtBundle\Entity\Pilotos
namespace_prefix: At
concurrency_lock: ~
bundle_name: OtBundle
i18n_catalog: GeneratorBundle
Like that??
Thanks in advance
See https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/blob/master/Resources/doc/internationalization/generator-translation.mdto understand i18n config. I think you forgot to activate the symfony config http://symfony.com/doc/current/book/translation.html#configurationdon t forget to clear your cache after.
Cedric Le 7 mars 2014 22:48, "jagltoro" notifications@github.com a écrit :
Fixed that ORM. Thanks!!, i wouldn't notice that
Now about the text?
pagerfanta.next pagerfanta.view.perpage pagerfanta.num.elements action.generic.new list.button.filter list.button.reset
What i have to do to correct it? Also the documentation about translation is a bit confusing, how i activate the default spanish translation?
generator: admingenerator.generator.doctrine params: model: At\OtBundle\Entity\Pilotos namespace_prefix: At concurrency_lock: ~ bundle_name: OtBundle i18n_catalog: GeneratorBundle
Like that??
Thanks in advance
Reply to this email directly or view it on GitHubhttps://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/issues/730#issuecomment-37071431 .
Thanks a lot.. Really helpme and hope helps others.. One last thing, can i show partials like Sf1?
Yes see https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/pull/514
You can use partial or subcontrollers
Cedric Le 8 mars 2014 01:38, "jagltoro" notifications@github.com a écrit :
Thanks a lot.. Really helpme and hope helps others.. One last thing, can i show partials like Sf1?
Reply to this email directly or view it on GitHubhttps://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/issues/730#issuecomment-37082808 .
need partials more like SF1 Like this below
builders:
list:
params:
title: Persons
display: [_photo,id,firstName,lastName]
sort: [ id, ASC ]
actions:
new: ~
object_actions:
edit: ~
Just override blocks in twig
http://symfony2admingenerator.org/documentation/list.html#overwrite-the-rendering-of-a-field
See in cache to find good block name and good file Le 27 mars 2014 18:44, "jagltoro" notifications@github.com a écrit :
need partials more like SF1 Like this below
builders: list: params: title: Persons display: [_photo,id,firstName,lastName] sort: [ id, ASC ] actions: new: ~ object_actions: edit: ~
Reply to this email directly or view it on GitHubhttps://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/issues/730#issuecomment-38836928 .
That field is not in the Entity, is ahother new that i want to be shown. This is a custom field just to show the photo of a person, it's not stored in any entity, is directly in a folder in web/images. I dont know if this could work calling a controller action. Because i need it to for some others fields, doing some calls to DB
have read this: https://github.com/avocode/FormExtensions/issues/46 https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/issues/90
But now says : Method "foto" for object "Myapp\MyBundle\Entity\People" does not exist in Admingenerated/MyappMyBundle/Resources/views/PList/row.html.twig at line 5
params:
....
fields:
id: {label: Id}
primerNombre: {label: 1º Nombre}
primerApellido: {label: 1º Apellido}
foto:
label: Image
dbType: string
addFormOptions:
data_class: Symfony\Component\HttpFoundation\File\File
Try to set :
foto:
label: Image
getter: myCustomGetter
Cedric
I need something more like this: https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/pull/514 In the list, because i dont have a method to that photo, or is stored in a DB. this is the line i want to be shown in list:
<img src="{{ assets('images/fotos_personal/'~f.id~'.jpg') }}" width="80"/><br/>
builders:
list:
params:
title: Persons
display: [photo,id,firstName,lastName]
sort: [ id, ASC ]
actions:
new: ~
object_actions:
edit: ~
The list use in fact a default getter in background to buid cache this one will be overwritten by your custom block. Try :
params: fields: photo: sort_on: id getter: id filter
list: params: display: [ photo, .... ]
and in row.html.twig
{% block list_td_column_photo %}{#Check block name in cache #}
{% endblock %}
Cédric
2014-03-28 18:06 GMT+01:00 jagltoro notifications@github.com:
I need something more like this:
514https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/pull/514
In the list, because i dont have a method to that photo, or is stored in a DB. this is the line i want to be shown in list:
builders: list: params: title: Persons display: [photo,id,firstName,lastName] sort: [ id, ASC ] actions: new: ~ object_actions: edit: ~
Reply to this email directly or view it on GitHubhttps://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/issues/730#issuecomment-38943308 .
Now i can see the AdminGenerator, but it only shows the ID for the table. And some errors of style. I attached an image.
My Generator.yml, Entity and Repository are here: https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/issues/729