1 package SL::Presenter::RequirementSpec;
5 use SL::Presenter::EscapedText qw(escape is_escaped);
7 use Exporter qw(import);
8 our @EXPORT_OK = qw(requirement_spec);
12 sub requirement_spec {
13 my ($requirement_spec, %params) = @_;
15 $params{display} ||= 'inline';
17 croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/;
20 $params{no_link} ? '' : '<a href="controller.pl?action=RequirementSpec/show&id=' . escape($requirement_spec->id) . '">',
21 escape($requirement_spec->id),
22 $params{no_link} ? '' : '</a>',