projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pflichtenheftpunkte bearbeiten
[kivitendo-erp.git]
/
SL
/
Presenter
/
RequirementSpecItem.pm
diff --git
a/SL/Presenter/RequirementSpecItem.pm
b/SL/Presenter/RequirementSpecItem.pm
index
ed4f567
..
b7f377e
100644
(file)
--- a/
SL/Presenter/RequirementSpecItem.pm
+++ b/
SL/Presenter/RequirementSpecItem.pm
@@
-5,10
+5,16
@@
use strict;
use parent qw(Exporter);
use Exporter qw(import);
use parent qw(Exporter);
use Exporter qw(import);
-our @EXPORT = qw(requirement_spec_item_jstree_data requirement_spec_item_dependency_list);
+our @EXPORT = qw(requirement_spec_item_
tree_node_title requirement_spec_item_
jstree_data requirement_spec_item_dependency_list);
use Carp;
use Carp;
+sub requirement_spec_item_tree_node_title {
+ my ($self, $item) = @_;
+
+ return join(' ', map { $_ || '' } ($item->fb_number, $self->truncate($item->parent_id ? $item->description : $item->title, at => 30), '<' . $item->id . '>'));
+}
+
sub requirement_spec_item_jstree_data {
my ($self, $item, %params) = @_;
sub requirement_spec_item_jstree_data {
my ($self, $item, %params) = @_;
@@
-16,7
+22,7
@@
sub requirement_spec_item_jstree_data {
my $type = !$item->parent_id ? 'section' : 'function-block';
return {
my $type = !$item->parent_id ? 'section' : 'function-block';
return {
- data =>
join(' ', map { $_ || '' } ($item->fb_number, $item->title, '<' . $item->id . '>')
),
+ data =>
$self->requirement_spec_item_tree_node_title($item
),
metadata => { id => $item->id, type => $type },
attr => { id => "fb-" . $item->id, href => $params{href} || '#', class => $type . '-context-menu' },
children => \@children,
metadata => { id => $item->id, type => $type },
attr => { id => "fb-" . $item->id, href => $params{href} || '#', class => $type . '-context-menu' },
children => \@children,