Re: [symfony-users] Re: Symfony frontend sort by th

2010-03-10 Thread Gareth McCumskey
Mine was written in Propel. You will need to use the Doctrine
equivalent methods in the correct places. I have never used Doctrine
(yet) so can't do that for you

On Wed, Mar 10, 2010 at 3:17 PM, ziclo lauren...@gmail.com wrote:
 Gareth,

 Is your solution compatible with Doctrine ? I have a lot of errors
 when i try to implement it.

 Ziclo

 On 5 mar, 07:17, Gareth McCumskey gmccums...@gmail.com wrote:
 In your view in the header cell:

 th?php echo 
 link_to(image_tag('sort_icon.png'),'module/action?sort=column_name')
 ? /th

 In your action:

 $this-data = TablePeer::getData($parameters, 
 $request-getParameter('sort'));

 In your model for class TablePeer:

 public static function getData($parameters, $sort_by)
 {
   $c = new Criteria();
   //Set all criteria that needs setting
   $c-addAscendingOrderByColumn(self::$sort_by);
   $results = self::doSelect($c);

   return $results;

 }

 see? Easy! :)



 On Thu, Mar 4, 2010 at 5:46 PM, ziclo lauren...@gmail.com wrote:
  Does anyone has a tutorial about that ? The backend is usefull but a
  good tutorial would be appreciate in order to be able to do that kind
  of common functionnalities.

  Tnak you

  On 18 fév, 11:16, ziclo lauren...@gmail.com wrote:
  Hello,

  That what i'm going to do. Thank you

  On 18 fév, 09:12, Gareth McCumskey gmccums...@gmail.com wrote:

   Why not just implement it yourself? You don't need to have everything
   pre-written for it. Simply make the column heading a link pointing to
   an action that re-runs the query with the correct ORDER BY sql in
   it

   On Sat, Feb 13, 2010 at 3:55 PM, ziclo lauren...@gmail.com wrote:
Hi,

I would like to be able to sort (order by ASC ou DESC) by clicking on
a colon title (th). The same way as the backend of the jobeet
tutorial.
I don't want it on the backend but on the frontend.

With doctrine i can use the pager without difficulties but i do not
know how to sort a list (result of a query) by a simple click on the
title of a colonn.

Does a tutorial exists about that ?

Thank you.

Ziclo

--
You received this message because you are subscribed to the Google 
Groups symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://groups.google.com/group/symfony-users?hl=en.

   --
   Gareth McCumskeyhttp://garethmccumskey.blogspot.com
   twitter: @garethmcc

  --
  If you want to report a vulnerability issue on symfony, please send it to 
  security at symfony-project.com

  You received this message because you are subscribed to the Google
  Groups symfony users group.
  To post to this group, send email to symfony-users@googlegroups.com
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc

 --
 If you want to report a vulnerability issue on symfony, please send it to 
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Symfony frontend sort by th

2010-03-08 Thread Gareth McCumskey
It is actually really simple to employ sorting yourself, thats why I
guess there are no tutorials dedicated to that specifically. The
example I gave you works well so I personally don't understand what is
difficult about it.

On Mon, Mar 8, 2010 at 2:52 PM, ziclo lauren...@gmail.com wrote:
 Thank you all. I just think that a tutorial should exists on how to
 create sortable columns like the way it is in the backend. Same thing
 for the use of filters. These are common functionnalities that i want
 to use for the frontend.
 I thought it would be simple to implement but not. I don't want to use
 javascript because the frontend is likely to be accessed by mobile
 phones.

 And for me, security problems are the responsability of all symfony
 users. But if i use a framework it is mainly because i want to focus
 my efforts on business things (business class) not on security
 issues.

 On 6 mar, 20:13, Gareth McCumskey gmccums...@gmail.com wrote:
 I'm afraid not. The entire point of passing GET and POST variables
 into the sfWebRequest object is to allow for cleaning of potentially
 mailicious code. You say hoiw would it know? How would you know? How
 would you code it remove potentially malicious content? If the
 sfWebRequest object did nothing more than just hold a carbon copy of
 parameters passed, we might as well not bother and just directly
 access $_GET and $_POST!

 As for the security fix you mentioned, it is true that was a problem
 and that was because one small aspect of the existing cleaning
 mechanisms in symfony was overlooked. If the sfWebRequest object did
 NOT clean up the GET and/or POST parameters, why did the symfony core
 team fix it? If it wasn't supposed to clean the parameters there
 shouldn't have been anything to fix!

 On Sat, Mar 6, 2010 at 12:45 PM, Daniel Lohse



 annismcken...@googlemail.com wrote:
  That's incorrect, Gareth. The security fix for symfony 1.4.3 just last 
  week was on the *exact* same lines of code because you could inject SQL in 
  the Doctrine admin generator.

  How would symfony guess what you want to remove (clean) or not? :)

  Daniel

  On 06.03.2010, at 08:10, Gareth McCumskey wrote:

  Firstly, symfony does that for you ;). Secondly it was just a quick
  example to get him on the right road. I didn't have time to sit and
  show a fully worked, real world example.

  Jsut to reiterate, symfony already checks what parameters are passed
  through GET and POST for you for SQL injection and cleans them. Try it
  yourself if you don't believe me. Its one of the great benefits of
  using a framework.

  On Fri, Mar 5, 2010 at 8:12 PM, Augusto Flavio afla...@gmail.com wrote:
  Hi Gareth,

  the method that you show us have a security problem: inject sql. You 
  need to
  check what kind of parameter the user is sending.

  if (!in_array($parameter, array('asc', 'desc'))) {
     //do something
  } else  {
     //execute the query
  }

  bye

  Augusto Morais

  --
  If you want to report a vulnerability issue on symfony, please send it to
  security at symfony-project.com

  You received this message because you are subscribed to the Google
  Groups symfony users group.
  To post to this group, send email to symfony-users@googlegroups.com
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

  --
  Gareth McCumskey
 http://garethmccumskey.blogspot.com
  twitter: @garethmcc

  --
  If you want to report a vulnerability issue on symfony, please send it to 
  security at symfony-project.com

  You received this message because you are subscribed to the Google
  Groups symfony users group.
  To post to this group, send email to symfony-users@googlegroups.com
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

  --
  If you want to report a vulnerability issue on symfony, please send it to 
  security at symfony-project.com

  You received this message because you are subscribed to the Google
  Groups symfony users group.
  To post to this group, send email to symfony-users@googlegroups.com
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc

 --
 If you want to report a vulnerability issue on symfony, please send it to 
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en





Re: [symfony-users] Re: Symfony frontend sort by th

2010-03-08 Thread Augusto Flavio
Hi Daniel,


thanks for your reply about the injection SQL security fix in Doctrine admin
generator of symfony 1.4.3.


Bye.


Augusto Morais

2010/3/8 ziclo lauren...@gmail.com

 Thank you all. I just think that a tutorial should exists on how to
 create sortable columns like the way it is in the backend. Same thing
 for the use of filters. These are common functionnalities that i want
 to use for the frontend.
 I thought it would be simple to implement but not. I don't want to use
 javascript because the frontend is likely to be accessed by mobile
 phones.

 And for me, security problems are the responsability of all symfony
 users. But if i use a framework it is mainly because i want to focus
 my efforts on business things (business class) not on security
 issues.

 On 6 mar, 20:13, Gareth McCumskey gmccums...@gmail.com wrote:
  I'm afraid not. The entire point of passing GET and POST variables
  into the sfWebRequest object is to allow for cleaning of potentially
  mailicious code. You say hoiw would it know? How would you know? How
  would you code it remove potentially malicious content? If the
  sfWebRequest object did nothing more than just hold a carbon copy of
  parameters passed, we might as well not bother and just directly
  access $_GET and $_POST!
 
  As for the security fix you mentioned, it is true that was a problem
  and that was because one small aspect of the existing cleaning
  mechanisms in symfony was overlooked. If the sfWebRequest object did
  NOT clean up the GET and/or POST parameters, why did the symfony core
  team fix it? If it wasn't supposed to clean the parameters there
  shouldn't have been anything to fix!
 
  On Sat, Mar 6, 2010 at 12:45 PM, Daniel Lohse
 
 
 
  annismcken...@googlemail.com wrote:
   That's incorrect, Gareth. The security fix for symfony 1.4.3 just last
 week was on the *exact* same lines of code because you could inject SQL in
 the Doctrine admin generator.
 
   How would symfony guess what you want to remove (clean) or not? :)
 
   Daniel
 
   On 06.03.2010, at 08:10, Gareth McCumskey wrote:
 
   Firstly, symfony does that for you ;). Secondly it was just a quick
   example to get him on the right road. I didn't have time to sit and
   show a fully worked, real world example.
 
   Jsut to reiterate, symfony already checks what parameters are passed
   through GET and POST for you for SQL injection and cleans them. Try it
   yourself if you don't believe me. Its one of the great benefits of
   using a framework.
 
   On Fri, Mar 5, 2010 at 8:12 PM, Augusto Flavio afla...@gmail.com
 wrote:
   Hi Gareth,
 
   the method that you show us have a security problem: inject sql. You
 need to
   check what kind of parameter the user is sending.
 
   if (!in_array($parameter, array('asc', 'desc'))) {
  //do something
   } else  {
  //execute the query
   }
 
   bye
 
   Augusto Morais
 
   --
   If you want to report a vulnerability issue on symfony, please send
 it to
   security at symfony-project.com
 
   You received this message because you are subscribed to the Google
   Groups symfony users group.
   To post to this group, send email to symfony-users@googlegroups.com
   To unsubscribe from this group, send email to
   symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/symfony-users?hl=en
 
   --
   Gareth McCumskey
  http://garethmccumskey.blogspot.com
   twitter: @garethmcc
 
   --
   If you want to report a vulnerability issue on symfony, please send it
 to security at symfony-project.com
 
   You received this message because you are subscribed to the Google
   Groups symfony users group.
   To post to this group, send email to symfony-users@googlegroups.com
   To unsubscribe from this group, send email to
   symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/symfony-users?hl=en
 
   --
   If you want to report a vulnerability issue on symfony, please send it
 to security at symfony-project.com
 
   You received this message because you are subscribed to the Google
   Groups symfony users group.
   To post to this group, send email to symfony-users@googlegroups.com
   To unsubscribe from this group, send email to
   symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/symfony-users?hl=en
 
  --
  Gareth McCumskeyhttp://garethmccumskey.blogspot.com
  twitter: @garethmcc

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 

Re: [symfony-users] Re: Symfony frontend sort by th

2010-03-06 Thread Daniel Lohse
That's incorrect, Gareth. The security fix for symfony 1.4.3 just last week was 
on the *exact* same lines of code because you could inject SQL in the Doctrine 
admin generator.

How would symfony guess what you want to remove (clean) or not? :)


Daniel

On 06.03.2010, at 08:10, Gareth McCumskey wrote:

 Firstly, symfony does that for you ;). Secondly it was just a quick
 example to get him on the right road. I didn't have time to sit and
 show a fully worked, real world example.
 
 Jsut to reiterate, symfony already checks what parameters are passed
 through GET and POST for you for SQL injection and cleans them. Try it
 yourself if you don't believe me. Its one of the great benefits of
 using a framework.
 
 On Fri, Mar 5, 2010 at 8:12 PM, Augusto Flavio afla...@gmail.com wrote:
 Hi Gareth,
 
 
 the method that you show us have a security problem: inject sql. You need to
 check what kind of parameter the user is sending.
 
 
 
 if (!in_array($parameter, array('asc', 'desc'))) {
//do something
 } else  {
//execute the query
 }
 
 
 bye
 
 
 
 Augusto Morais
 
 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com
 
 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en
 
 
 
 
 -- 
 Gareth McCumskey
 http://garethmccumskey.blogspot.com
 twitter: @garethmcc
 
 -- 
 If you want to report a vulnerability issue on symfony, please send it to 
 security at symfony-project.com
 
 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Symfony frontend sort by th

2010-03-06 Thread Gareth McCumskey
I'm afraid not. The entire point of passing GET and POST variables
into the sfWebRequest object is to allow for cleaning of potentially
mailicious code. You say hoiw would it know? How would you know? How
would you code it remove potentially malicious content? If the
sfWebRequest object did nothing more than just hold a carbon copy of
parameters passed, we might as well not bother and just directly
access $_GET and $_POST!

As for the security fix you mentioned, it is true that was a problem
and that was because one small aspect of the existing cleaning
mechanisms in symfony was overlooked. If the sfWebRequest object did
NOT clean up the GET and/or POST parameters, why did the symfony core
team fix it? If it wasn't supposed to clean the parameters there
shouldn't have been anything to fix!

On Sat, Mar 6, 2010 at 12:45 PM, Daniel Lohse
annismcken...@googlemail.com wrote:
 That's incorrect, Gareth. The security fix for symfony 1.4.3 just last week 
 was on the *exact* same lines of code because you could inject SQL in the 
 Doctrine admin generator.

 How would symfony guess what you want to remove (clean) or not? :)


 Daniel

 On 06.03.2010, at 08:10, Gareth McCumskey wrote:

 Firstly, symfony does that for you ;). Secondly it was just a quick
 example to get him on the right road. I didn't have time to sit and
 show a fully worked, real world example.

 Jsut to reiterate, symfony already checks what parameters are passed
 through GET and POST for you for SQL injection and cleans them. Try it
 yourself if you don't believe me. Its one of the great benefits of
 using a framework.

 On Fri, Mar 5, 2010 at 8:12 PM, Augusto Flavio afla...@gmail.com wrote:
 Hi Gareth,


 the method that you show us have a security problem: inject sql. You need to
 check what kind of parameter the user is sending.



 if (!in_array($parameter, array('asc', 'desc'))) {
    //do something
 } else  {
    //execute the query
 }


 bye



 Augusto Morais

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




 --
 Gareth McCumskey
 http://garethmccumskey.blogspot.com
 twitter: @garethmcc

 --
 If you want to report a vulnerability issue on symfony, please send it to 
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

 --
 If you want to report a vulnerability issue on symfony, please send it to 
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Symfony frontend sort by th

2010-03-05 Thread Augusto Flavio
Hi Gareth,


the method that you show us have a security problem: inject sql. You need to
check what kind of parameter the user is sending.



if (!in_array($parameter, array('asc', 'desc'))) {
   //do something
} else  {
   //execute the query
}


bye



Augusto Morais

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Symfony frontend sort by th

2010-03-05 Thread Gareth McCumskey
Firstly, symfony does that for you ;). Secondly it was just a quick
example to get him on the right road. I didn't have time to sit and
show a fully worked, real world example.

Jsut to reiterate, symfony already checks what parameters are passed
through GET and POST for you for SQL injection and cleans them. Try it
yourself if you don't believe me. Its one of the great benefits of
using a framework.

On Fri, Mar 5, 2010 at 8:12 PM, Augusto Flavio afla...@gmail.com wrote:
 Hi Gareth,


 the method that you show us have a security problem: inject sql. You need to
 check what kind of parameter the user is sending.



 if (!in_array($parameter, array('asc', 'desc'))) {
    //do something
 } else  {
    //execute the query
 }


 bye



 Augusto Morais

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Symfony frontend sort by th

2010-03-04 Thread Susan Ditmore
If you just want to sort the results on the immediate page, you can use this
with the jquery plugin:

http://tablesorter.com/docs/

If you want to be able to sort across multiple pages, tell me what you're
using for pagination and I can give you a few ideas (but it will be more
difficult).

On Thu, Mar 4, 2010 at 10:46 AM, ziclo lauren...@gmail.com wrote:

 Does anyone has a tutorial about that ? The backend is usefull but a
 good tutorial would be appreciate in order to be able to do that kind
 of common functionnalities.

 Tnak you

 On 18 fév, 11:16, ziclo lauren...@gmail.com wrote:
  Hello,
 
  That what i'm going to do. Thank you
 
  On 18 fév, 09:12, Gareth McCumskey gmccums...@gmail.com wrote:
 
   Why not just implement it yourself? You don't need to have everything
   pre-written for it. Simply make the column heading a link pointing to
   an action that re-runs the query with the correct ORDER BY sql in
   it
 
   On Sat, Feb 13, 2010 at 3:55 PM, ziclo lauren...@gmail.com wrote:
Hi,
 
I would like to be able to sort (order by ASC ou DESC) by clicking on
a colon title (th). The same way as the backend of the jobeet
tutorial.
I don't want it on the backend but on the frontend.
 
With doctrine i can use the pager without difficulties but i do not
know how to sort a list (result of a query) by a simple click on the
title of a colonn.
 
Does a tutorial exists about that ?
 
Thank you.
 
Ziclo
 
--
You received this message because you are subscribed to the Google
 Groups symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
For more options, visit this group athttp://
 groups.google.com/group/symfony-users?hl=en.
 
   --
   Gareth McCumskeyhttp://garethmccumskey.blogspot.com
   twitter: @garethmcc

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
To categorize is human; to distribute, divine.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Symfony frontend sort by th

2010-03-04 Thread Gareth McCumskey
In your view in the header cell:

th?php echo 
link_to(image_tag('sort_icon.png'),'module/action?sort=column_name')
? /th

In your action:

$this-data = TablePeer::getData($parameters, $request-getParameter('sort'));

In your model for class TablePeer:

public static function getData($parameters, $sort_by)
{
  $c = new Criteria();
  //Set all criteria that needs setting
  $c-addAscendingOrderByColumn(self::$sort_by);
  $results = self::doSelect($c);

  return $results;
}


see? Easy! :)
On Thu, Mar 4, 2010 at 5:46 PM, ziclo lauren...@gmail.com wrote:
 Does anyone has a tutorial about that ? The backend is usefull but a
 good tutorial would be appreciate in order to be able to do that kind
 of common functionnalities.

 Tnak you

 On 18 fév, 11:16, ziclo lauren...@gmail.com wrote:
 Hello,

 That what i'm going to do. Thank you

 On 18 fév, 09:12, Gareth McCumskey gmccums...@gmail.com wrote:

  Why not just implement it yourself? You don't need to have everything
  pre-written for it. Simply make the column heading a link pointing to
  an action that re-runs the query with the correct ORDER BY sql in
  it

  On Sat, Feb 13, 2010 at 3:55 PM, ziclo lauren...@gmail.com wrote:
   Hi,

   I would like to be able to sort (order by ASC ou DESC) by clicking on
   a colon title (th). The same way as the backend of the jobeet
   tutorial.
   I don't want it on the backend but on the frontend.

   With doctrine i can use the pager without difficulties but i do not
   know how to sort a list (result of a query) by a simple click on the
   title of a colonn.

   Does a tutorial exists about that ?

   Thank you.

   Ziclo

   --
   You received this message because you are subscribed to the Google 
   Groups symfony users group.
   To post to this group, send email to symfony-us...@googlegroups.com.
   To unsubscribe from this group, send email to 
   symfony-users+unsubscr...@googlegroups.com.
   For more options, visit this group 
   athttp://groups.google.com/group/symfony-users?hl=en.

  --
  Gareth McCumskeyhttp://garethmccumskey.blogspot.com
  twitter: @garethmcc

 --
 If you want to report a vulnerability issue on symfony, please send it to 
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Symfony frontend sort by th

2010-02-14 Thread Daniel Lohse
You should take a look at the internal Sympal plugin sfSympalDataGridPlugin. 
This will do what you want and there's also some documentation about it on the 
Sympal homepage here: 
http://www.sympalphp.org/documentation/1_0/book/data-grid/en .

Jon recently committed some changes that should make it independent of Sympal. 
I know it works without it because I've used it just recently on a non-Sympal 
project.

I also have some gems hidden inside that project's sfSympalDataGridPlugin fork 
that should find their way into the Sympal repository soon-ish but they don't 
have unit tests right now. :)


Regards, Daniel

On 14.02.2010, at 14:46, Dimitar wrote:

 I am looking for the same thing, with Doctrine and SF 1.4 If anyone
 can help I am very interested too.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 symfony users group.
 To post to this group, send email to symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to 
 symfony-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/symfony-users?hl=en.
 

-- 
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.