This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » Admin-generator, column order by i18n fields
Admin-generator, column order by i18n fields [message #102914] Thu, 22 July 2010 08:29 Go to next message
pixworld  is currently offline pixworld
Messages: 13
Registered: July 2010
Location: Le Mans
Junior Member
Good morning,

I'm having issue similar to this one:

http://groups.google.fr/group/symfony-users/browse_thread/th read/d051444058cecf24


In fact I want, in the admin-generator list, my columns to be sortable by i18n fields too.

Here is schema.yml:

page:
  tableName: pages
  actAs:
    I18n:
      fields: [intitule, corps]
      actAs:
        Sluggable: { fields: [intitule], uniqueBy: [lang, intitule] }
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    intitule:
      type: string(100)
      notnull: true
    corps:
      type: clob(65535)
      notnull: true
    actif:
      type: boolean
      notnull: true
    date:
      type: date


Here is my generator.yml:

generator:
  class: sfDoctrineGenerator
  param:
    model_class:           page
    theme:                 admin
    non_verbose_templates: true
    with_show:             false
    singular:              ~
    plural:                ~
    route_prefix:          page
    with_doctrine_route:   true
    actions_base_class:    sfActions

    config:
      actions: ~
      fields:  ~
      list:
        #titre de la liste
        title: Pages List
        #ordre et element a afficher
        display: [=intitule, actif, date]
       #nb par page		
        max_per_page: 5
       #ordonner la liste 
      filter:
        #elements de filtre		  
        display: [date]
      form: 
      edit:
        #titre du formulaire edition 	  
        title: Edit %%intitule%%
      new:
        # titre du formulaire ajout 		  
        title: Add page


I can sort by Actif and Date (by clicking on the head of the column in the list) but not by Intitule

Can you help me ?

Thanks

[Updated on: Thu, 22 July 2010 08:32]

Re: Admin-generator, column order by i18n fields [message #102962 is a reply to message #102914 ] Thu, 22 July 2010 23:57 Go to previous messageGo to next message
Sergic  is currently offline Sergic
Messages: 7
Registered: December 2008
Junior Member
hi. a few hours ago some people recommended me to install propel 1.5
i found there option
        display: [=intitule, actif, date]
        fields: 
          intitule:      { is_sortable: true }

and there appeared link on i18n field
but there need to add some like
list:
  display: [title, Author]
  query_methods: [joinWithAuthor]
  fields: 
    - Author:      { is_sortable: true, sort_method: orderByAuthorLastName }

see this http://www.symfony-project.org/plugins/sfPropel15Plugin/0_9_ 0 Sorting On A Virtual Column
need exp symfony developer to help us build that sorting

[Updated on: Thu, 22 July 2010 23:57]

Re: Admin-generator, column order by i18n fields [message #102986 is a reply to message #102914 ] Fri, 23 July 2010 11:13 Go to previous message
pixworld  is currently offline pixworld
Messages: 13
Registered: July 2010
Location: Le Mans
Junior Member
Thank you for your reply, but I can't use propel at all in my project ...

Anyone have an idea for solutions using Doctrine ??
Previous Topic:Where to create global variable that require parameter values
Next Topic:Using 2 diferents views with the same db table
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software