1 package SL::Presenter::RequirementSpecTextBlock;
5 use Exporter qw(import);
6 our @EXPORT_OK = qw(requirement_spec_text_block_jstree_data);
12 sub requirement_spec_text_block_jstree_data {
13 my ($text_block, %params) = @_;
15 my $class = 'text-block-context-menu tooltip';
16 $class .= ' flagged' if $text_block->is_flagged;
19 data => $text_block->title || '',
20 metadata => { id => $text_block->id, type => 'text-block' },
21 attr => { id => "tb-" . $text_block->id, href => $params{href} || '#', class => $class, title => $text_block->content_excerpt },
25 sub jstree_data { goto &requirement_spec_text_block_jstree_data }