On 25/Nov - 12:19, Jesse Vincent wrote: > > Yves, can you tell me a bit more about this? It seems like it could > break the display of immutable columns, though I may be > misunderstanding.
The original use of display_columns in crud view show two columns when the column contains a refers_to (certainly id and name) and was alphabeticaly sorted. In bottom of the crud list, create fragment does not sort fields. I didn't want to change the behaviour of display_columns and readable_attribute so the use of update fields to show the crud view looks better. Immutable columns like email address in User plugin are always showed. I tried to touch only the crud view, does it break somethink else? > Best, > Jesse > > > On Wed, Nov 25, 2009 at 06:40:33AM -0500, Jifty commits wrote: > > Author: yves > > Date: Wed Nov 25 06:40:31 2009 > > New Revision: 7674 > > > > Modified: > > jifty/trunk/lib/Jifty/View/Declare/CRUD.pm > > > > Log: > > use update fields in Crud view, > > we have the same sort order than in create fragment and no more double > > columns for refers_to fields > > > > > > Modified: jifty/trunk/lib/Jifty/View/Declare/CRUD.pm > > ============================================================================== > > --- jifty/trunk/lib/Jifty/View/Declare/CRUD.pm (original) > > +++ jifty/trunk/lib/Jifty/View/Declare/CRUD.pm Wed Nov 25 06:40:31 2009 > > @@ -443,7 +443,7 @@ > > moniker => "update-" . Jifty->web->serial, > > ); > > > > - my @fields = $self->display_columns; > > + my @fields = $self->display_columns($update); > > for my $field (@fields) { > > div { { class is 'crud-field view-argument-'.$field}; > > $self->render_field( > > @@ -640,10 +640,11 @@ > > my $sort_by = shift; > > my $order = shift; > > my $record_class = $self->record_class; > > + my $update = $record_class->as_update_action(); > > > > div { > > { class is "crud-column-headers" }; > > - for my $argument ($self->display_columns) { > > + for my $argument ($self->display_columns($update)) { > > div { > > { class is 'crud-column-header' }; > > ul { attr { class => 'crud-sort-menu', style => > > 'display:none;' }; > > _______________________________________________ > > Jifty-commit mailing list > > jifty-com...@lists.jifty.org > > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-commit > > > > -- > _______________________________________________ > jifty-devel mailing list > jifty-devel@lists.jifty.org > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel > > -- --------------------------------------------------------------- Yves Agostini CRI - Université Paul Verlaine -Metz agost...@univ-metz.fr http://www.crium.univ-metz.fr tel: 03 87 31 52 63 fax: 03 87 31 53 33 PGP: 842CC261 _______________________________________________ jifty-devel mailing list jifty-devel@lists.jifty.org http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel