Revision fb1cb898
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/DB/RequirementSpecTextBlock.pm | ||
---|---|---|
11 | 11 |
use SL::DB::MetaSetup::RequirementSpecTextBlock; |
12 | 12 |
use SL::DB::Manager::RequirementSpecTextBlock; |
13 | 13 |
use SL::DB::Helper::ActsAsList; |
14 |
use SL::DB::Helper::AttrHTML; |
|
14 | 15 |
use SL::Locale::String; |
15 | 16 |
|
16 | 17 |
__PACKAGE__->meta->add_relationship( |
... | ... | |
24 | 25 |
__PACKAGE__->meta->initialize; |
25 | 26 |
|
26 | 27 |
__PACKAGE__->configure_acts_as_list(group_by => [qw(requirement_spec_id output_position)]); |
28 |
__PACKAGE__->attr_html('text'); |
|
27 | 29 |
|
28 | 30 |
__PACKAGE__->before_save(\ &_before_save_invalidate_requirement_spec_version); |
29 | 31 |
__PACKAGE__->before_delete(\&_before_delete_invalidate_requirement_spec_version); |
... | ... | |
69 | 71 |
sub content_excerpt { |
70 | 72 |
my ($self) = @_; |
71 | 73 |
|
72 |
return Common::truncate($self->text // '', at => 200); |
|
74 |
return Common::truncate($self->text_as_stripped_html // '', at => 200);
|
|
73 | 75 |
} |
74 | 76 |
|
75 | 77 |
1; |
Auch abrufbar als: Unified diff
Pflichtenhefttextblöcke: HTML nutzen