X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FReaction%2FUI%2FViewPort%2FCollection%2FGrid.pm;h=3719aa78de150e16607bcb8d65deb21679536a74;hb=577fe414348267534faf952536025a61a3c0598f;hp=f881ebda7f549dd3fb7ef72cc3cb753889a1eec6;hpb=2dba7201f38bfdf9a4132220d98b7691a5f9a257;p=catagits%2FReaction.git diff --git a/lib/Reaction/UI/ViewPort/Collection/Grid.pm b/lib/Reaction/UI/ViewPort/Collection/Grid.pm index f881ebd..3719aa7 100644 --- a/lib/Reaction/UI/ViewPort/Collection/Grid.pm +++ b/lib/Reaction/UI/ViewPort/Collection/Grid.pm @@ -19,7 +19,7 @@ class Grid is 'Reaction::UI::ViewPort::Collection', which { implements _build_field_labels => as { my $self = shift; my %labels; - for my $field ( @{$self->field_order}){ + for my $field ( @{$self->computed_field_order}){ $labels{$field} = join(' ', map{ ucfirst } split('_', $field)); } return \%labels; @@ -30,8 +30,6 @@ class Grid is 'Reaction::UI::ViewPort::Collection', which { implements _build_computed_field_order => as { my ($self) = @_; - confess("current_collection lacks a value for 'member_type' attribute") - unless $self->current_collection->has_member_type; my %excluded = map { $_ => undef } @{ $self->excluded_fields }; #treat _$field_name as private and exclude fields with no reader my @names = grep { $_ !~ /^_/ && !exists($excluded{$_})} map { $_->name }