| Reaction documentation | Contained in the Reaction distribution. |
Reaction::UI::Widget::Field::Image - An image field
This Reaction::UI::Widget::Field widget represents an image.
If the viewport's value_string is true, it will render the has_image
fragment after setting the uri argument to the value of the viewport's
uri.
If the value_string is false the no_image fragment will be rendered.
See Reaction::Class for authors.
See Reaction::Class for the license.
| Reaction documentation | Contained in the Reaction distribution. |
package Reaction::UI::Widget::Field::Image; use Reaction::UI::WidgetClass; use namespace::clean -except => [ qw(meta) ]; extends 'Reaction::UI::Widget::Field'; implements fragment image { if($_{viewport}->value_string) { arg uri => $_{viewport}->uri; render 'has_image'; } else { render 'no_image'; } }; __PACKAGE__->meta->make_immutable; 1; __END__