27 |
|
|
28 |
my $icon = ''; |
my $icon = ''; |
29 |
if ( ! $self->can('icon_path') ) { |
if ( ! $self->can('icon_path') ) { |
30 |
warn "FIXME: re-apply Frey::Web on $self"; |
$self->TODO( "re-apply Frey::Web on $self" ); |
31 |
Frey::Web->meta->apply( $self ); |
Frey::Web->meta->apply( $self ); |
32 |
} |
} |
33 |
$icon = $self->icon_path( $class ); |
$icon = $self->icon_path( $class ); |
34 |
if ($icon) { |
if ($icon) { |
35 |
push @icons, $icon; |
push @icons, $icon; |
36 |
$icon = qq|<!-- icon:$icon -->|; |
$icon = qq|<!-- icon:$icon -->|; |
37 |
|
} else { |
38 |
|
$icon = ''; |
39 |
} |
} |
40 |
|
|
41 |
my $html |
my $html |
74 |
|
|
75 |
my $icons_html = $self->combine_images( @icons ); |
my $icons_html = $self->combine_images( @icons ); |
76 |
sub icon { |
sub icon { |
77 |
my $path = shift; |
my ($icons_html,$path) = @_; |
78 |
warn "# icon $path"; |
warn "# icon $path"; |
79 |
$icons_html->{ $path } || die "can't find $path in ",dump($icons_html); |
$icons_html->{ $path } || die "can't find $path in ",dump($icons_html); |
80 |
}; |
}; |
83 |
qq|<table>| . join("\n", |
qq|<table>| . join("\n", |
84 |
map { |
map { |
85 |
my $html = $row->{$_}; |
my $html = $row->{$_}; |
86 |
$html =~ s{<!-- icon:(\S+) -->}{icon($1)}gse; |
$html =~ s{<!-- icon:(\S+) -->}{icon($icons_html,$1)}gse; |
87 |
$html; |
$html; |
88 |
} |
} |
89 |
sort { |
sort { |