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 |
52 |
} |
} |
53 |
|
|
54 |
my @run = map { |
my @run = map { |
55 |
|
my $invoke = $_; |
56 |
s{^as_}{}; |
s{^as_}{}; |
57 |
qq|<a target="$class" href="/$class/as_$_" title="$class->as_$_">$_</a>|; |
s{_as_\w+}{}; |
58 |
|
qq|<a target="$class" href="/$class/$invoke" title="$class->$invoke">$_</a>|; |
59 |
} $self->class_runnable( $class ); |
} $self->class_runnable( $class ); |
60 |
push @run, qq|<a target="$class" href="/Frey-ObjectBrowser?class=$class">collection</a>| if $class->can('collection_table'); |
push @run, qq|<a target="$class" href="/Frey-ObjectBrowser?class=$class">collection</a>| if $class->can('collection_table'); |
61 |
|
|
76 |
|
|
77 |
my $icons_html = $self->combine_images( @icons ); |
my $icons_html = $self->combine_images( @icons ); |
78 |
sub icon { |
sub icon { |
79 |
my $path = shift; |
my ($icons_html,$path) = @_; |
|
warn "# icon $path"; |
|
80 |
$icons_html->{ $path } || die "can't find $path in ",dump($icons_html); |
$icons_html->{ $path } || die "can't find $path in ",dump($icons_html); |
81 |
}; |
}; |
82 |
|
|
84 |
qq|<table>| . join("\n", |
qq|<table>| . join("\n", |
85 |
map { |
map { |
86 |
my $html = $row->{$_}; |
my $html = $row->{$_}; |
87 |
$html =~ s{<!-- icon:(\S+) -->}{icon($1)}gse; |
$html =~ s{<!-- icon:(\S+) -->}{icon($icons_html,$1)}gse; |
88 |
$html; |
$html; |
89 |
} |
} |
90 |
sort { |
sort { |