Revision e8e03e2c
Von Werner Hahn vor mehr als 8 Jahren hinzugefügt
SL/Presenter/ShopOrder.pm | ||
---|---|---|
1 |
package SL::Presenter::ShopOrder; |
|
2 |
|
|
3 |
use strict; |
|
4 |
|
|
5 |
use parent qw(Exporter); |
|
6 |
|
|
7 |
use Exporter qw(import); |
|
8 |
our @EXPORT = qw(shop_order); |
|
9 |
|
|
10 |
use Carp; |
|
11 |
|
|
12 |
sub shop_order { |
|
13 |
my ($self, $shop_order, $type, %params) = @_; |
|
14 |
|
|
15 |
$params{display} ||= 'inline'; |
|
16 |
|
|
17 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
|
18 |
|
|
19 |
my $text = join '', ( |
|
20 |
$params{no_link} ? '' : '<a href="controller.pl?action=ShopOrder/show&id='.$self->escape($shop_order->id).'">', |
|
21 |
$self->escape($shop_order->id), |
|
22 |
$params{no_link} ? '' : '</a>', |
|
23 |
); |
|
24 |
return $self->escaped_text($text); |
|
25 |
} |
|
26 |
1; |
Auch abrufbar als: Unified diff
record links fehlende Datei