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

"); foreach my $cat ($story->get_categories) { $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 => "Story Keywords", number => 2); $m->comp('/widgets/add_more/add_more.mc', type => 'keyword', param => $param, fields => [qw(keyword)], name => 'keyword', deleteLabelOnly => 1, reset_key => $story->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 => 'story', section => 'workflow', no_del => 1, return => '/workflow/profile/story', widget => $widget, cb => 'add_kw_cb'); <%args> $widget $param => undef <%init>; my $story = get_state_data($widget, 'story'); my $keywords = $story->get_keywords || [];