1 package SL::Presenter::RequirementSpecTextBlock;
5 use parent qw(Exporter);
7 use Exporter qw(import);
8 our @EXPORT = qw(requirement_spec_text_block_jstree_data);
14 sub requirement_spec_text_block_jstree_data {
15 my ($self, $text_block, %params) = @_;
17 my $class = 'text-block-context-menu tooltip';
18 $class .= ' flagged' if $text_block->is_flagged;
21 data => $text_block->title || '',
22 metadata => { id => $text_block->id, type => 'text-block' },
23 attr => { id => "tb-" . $text_block->id, href => $params{href} || '#', class => $class, title => $text_block->content_excerpt },