<%perl>; $m->comp("/widgets/wrappers/sharky/table_top.mc", caption => "Category Keywords", number => 1); $m->out("

"); foreach my $cat ($media->get_category) { $m->out(qq{
}.$lang->maketext('Category').': | ' . $cat->get_name . "
\n"); my $flag = ''.$lang->maketext('Keywords').':'; foreach my $kw ($cat->get_keywords) { $m->out(qq{
$flag | } . $kw->get_name . "
\n"); $flag = ' '; } } $m->out("

"); $m->comp("/widgets/wrappers/sharky/table_bottom.mc"); # Output the keywords. $m->comp("/widgets/wrappers/sharky/table_top.mc", caption => "Media Keywords", number => 2); $m->comp('/widgets/add_more/add_more.mc', type => 'keyword', param => $param, fields => [qw(keyword)], name => 'keyword', deleteLabelOnly => 1, reset_key => $media->get_id, objs => $keywords, incr => 4, no_edit => [qw(keyword)], num => @$keywords >= 4 ? @$keywords + 2 : 4); $m->comp("/widgets/wrappers/sharky/table_bottom.mc"); # Output the save buttons. $m->comp('/widgets/profile/formButtons.mc', type => 'media', section => 'workflow', no_del => 1, return => '/workflow/profile/media', widget => $widget, cb => 'add_kw_cb'); <%args> $widget $param => undef <%init>; my $media = get_state_data($widget, 'media'); my $keywords = $media->get_keywords || [];