Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision be60b289

Von Werner Hahn vor mehr als 7 Jahren hinzugefügt

  • ID be60b289f589a8d4cad16c75734d078cd34b8264
  • Vorgänger e0e75548
  • Nachfolger 4e9e467a

WebshopApi: ShopOrder Presenter

Unterschiede anzeigen:

SL/Presenter.pm
22 22
use SL::Presenter::RequirementSpecItem;
23 23
use SL::Presenter::RequirementSpecTextBlock;
24 24
use SL::Presenter::SepaExport;
25
use SL::Presenter::ShopOrder;
25 26
use SL::Presenter::Text;
26 27
use SL::Presenter::Tag;
27 28
use SL::Presenter::BankAccount;
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&amp;id='.$self->escape($shop_order->id).'">',
21
    $self->escape($shop_order->shop_ordernumber),
22
    $params{no_link} ? '' : '</a>',
23
  );
24
  return $self->escaped_text($text);
25
}
26
1;

Auch abrufbar als: Unified diff