Revision 442b26e2
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Presenter/RequirementSpecItem.pm | ||
---|---|---|
5 | 5 |
use parent qw(Exporter); |
6 | 6 |
|
7 | 7 |
use Exporter qw(import); |
8 |
our @EXPORT = qw(requirement_spec_item_jstree_data requirement_spec_item_dependency_list); |
|
8 |
our @EXPORT = qw(requirement_spec_item_tree_node_title requirement_spec_item_jstree_data requirement_spec_item_dependency_list);
|
|
9 | 9 |
|
10 | 10 |
use Carp; |
11 | 11 |
|
12 |
sub requirement_spec_item_tree_node_title { |
|
13 |
my ($self, $item) = @_; |
|
14 |
|
|
15 |
return join(' ', map { $_ || '' } ($item->fb_number, $self->truncate($item->parent_id ? $item->description : $item->title, at => 30), '<' . $item->id . '>')); |
|
16 |
} |
|
17 |
|
|
12 | 18 |
sub requirement_spec_item_jstree_data { |
13 | 19 |
my ($self, $item, %params) = @_; |
14 | 20 |
|
... | ... | |
16 | 22 |
my $type = !$item->parent_id ? 'section' : 'function-block'; |
17 | 23 |
|
18 | 24 |
return { |
19 |
data => join(' ', map { $_ || '' } ($item->fb_number, $item->title, '<' . $item->id . '>')),
|
|
25 |
data => $self->requirement_spec_item_tree_node_title($item),
|
|
20 | 26 |
metadata => { id => $item->id, type => $type }, |
21 | 27 |
attr => { id => "fb-" . $item->id, href => $params{href} || '#', class => $type . '-context-menu' }, |
22 | 28 |
children => \@children, |
Auch abrufbar als: Unified diff
Pflichtenheftpunkte bearbeiten