6 |
use base 'Jifty::View::Declare::CRUD'; |
use base 'Jifty::View::Declare::CRUD'; |
7 |
use Jifty::View::Declare -base; |
use Jifty::View::Declare -base; |
8 |
|
|
9 |
|
use Data::Dump qw/dump/; |
10 |
|
|
11 |
sub object_type { 'Unit' }; |
sub object_type { 'Unit' }; |
12 |
|
|
13 |
sub display_columns { |
sub display_columns { |
32 |
toplogy |
toplogy |
33 |
technique |
technique |
34 |
description |
description |
35 |
contstruction |
construction |
36 |
iconography |
iconography |
37 |
decoration |
decoration |
38 |
motifs |
motifs |
50 |
sources |
sources |
51 |
bibliography |
bibliography |
52 |
copyright |
copyright |
53 |
|
material |
54 |
/ ); |
/ ); |
55 |
} |
} |
56 |
|
|
107 |
); |
); |
108 |
} else { |
} else { |
109 |
my %opt; |
my %opt; |
110 |
$opt{render_mode} = 'read' if ! $editing; |
if ( ! $editing ) { |
111 |
|
$opt{render_mode} = 'read'; |
112 |
|
# skip fields without values |
113 |
|
$opt{render_as} = 'hidden' if ! defined( $update->record->$f ); |
114 |
|
} |
115 |
render_param( $update => $f, %opt ); |
render_param( $update => $f, %opt ); |
116 |
} |
} |
117 |
}; |
}; |
150 |
|
|
151 |
foreach my $f ( $self->display_columns ) { |
foreach my $f ( $self->display_columns ) { |
152 |
# last if $f eq 'material' && ! $id; |
# last if $f eq 'material' && ! $id; |
153 |
render_param( $create => $f ); # unless $f eq 'material'; |
render_param( $create => $f ) unless $f eq 'material'; |
154 |
#warn "## $f"; |
#warn "## $f"; |
155 |
} |
} |
156 |
|
|