246 |
if ( ! $body ) { |
if ( ! $body ) { |
247 |
my $run = $a->{run} || 'as_markup'; |
my $run = $a->{run} || 'as_markup'; |
248 |
warn "# no body, invoke $self->$run on ", ref($self); |
warn "# no body, invoke $self->$run on ", ref($self); |
249 |
eval { |
$body = $self->$run; |
|
$body = $self->$run; |
|
|
}; |
|
|
$body = $self->error( $@, '' ) if $@; |
|
250 |
} |
} |
251 |
if ( $self->content_type !~ m{html} ) { |
if ( $self->content_type !~ m{html} ) { |
252 |
warn "# return only $self body ", $self->content_type; |
warn "# return only $self body ", $self->content_type; |
383 |
} |
} |
384 |
|
|
385 |
warn "ERROR: $error\n"; |
warn "ERROR: $error\n"; |
386 |
|
$self->add_icon('error'); |
387 |
return |
return |
388 |
qq|<pre class="frey-error$fatal">| |
qq|<pre class="frey-error$fatal">| |
389 |
. $self->html_links( $error ) . |
. $self->html_links( $error ) . |
464 |
|
|
465 |
sub icon_path { |
sub icon_path { |
466 |
my ($self,$class,$variant) = @_; |
my ($self,$class,$variant) = @_; |
|
# $class ||= $self->title; |
|
467 |
|
|
468 |
sub icon_exists { |
sub icon_exists { |
469 |
my $class = shift; |
my $class = shift; |
494 |
sub add_icon { |
sub add_icon { |
495 |
my ($self,$variant) = @_; |
my ($self,$variant) = @_; |
496 |
|
|
497 |
my $class = ref($self); |
my $class = $self->class if $self->can('class'); |
498 |
$class = $self->class if $self->can('class'); |
#$class ||= $self->title; |
499 |
|
$class ||= ref($self); |
500 |
my $icon_path = $self->icon_path( $class, $variant ) || return; |
my $icon_path = $self->icon_path( $class, $variant ) || return; |
501 |
|
|
502 |
$icon_html .= qq|<link rel="icon" type="image/png" href="/$icon_path">|; |
$icon_html .= qq|<link rel="icon" type="image/png" href="/$icon_path">|; |