1 package SL::Presenter::RequirementSpec;
5 use parent qw(Exporter);
7 use Exporter qw(import);
8 our @EXPORT = qw(requirement_spec);
12 sub requirement_spec {
13 my ($self, $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=' . $self->escape($requirement_spec->id) . '">',
21 $self->escape($requirement_spec->id),
22 $params{no_link} ? '' : '</a>',
24 return $self->escaped_text($text);