Revision b66801e2
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/Presenter/DeliveryOrder.pm | ||
---|---|---|
use SL::Presenter::Tag qw(link_tag);
|
||
|
||
use Exporter qw(import);
|
||
our @EXPORT_OK = qw(sales_delivery_order purchase_delivery_order delivery_order_status_line);
|
||
our @EXPORT_OK = qw(
|
||
show delivery_order delivery_order_status_line
|
||
sales_delivery_order purchase_delivery_order
|
||
rma_delivery_order supplier_delivery_order
|
||
);
|
||
|
||
use Carp;
|
||
|
||
sub sales_delivery_order {
|
||
my ($delivery_order, %params) = @_;
|
||
sub show {goto &delivery_order};
|
||
|
||
return _do_record($delivery_order, 'sales_delivery_order', %params);
|
||
}
|
||
sub sales_delivery_order {goto &delivery_order}
|
||
|
||
sub rma_delivery_order {
|
||
my ($delivery_order, %params) = @_;
|
||
|
||
return _do_new_record($delivery_order, 'rma_delivery_order', %params);
|
||
}
|
||
sub rma_delivery_order {goto &delivery_order};
|
||
|
||
sub purchase_delivery_order {
|
||
my ($delivery_order, %params) = @_;
|
||
sub purchase_delivery_order {goto &delivery_order};
|
||
|
||
return _do_record($delivery_order, 'purchase_delivery_order', %params);
|
||
}
|
||
sub supplier_delivery_order {goto &delivery_order};
|
||
|
||
sub supplier_delivery_order {
|
||
sub delivery_order {
|
||
my ($delivery_order, %params) = @_;
|
||
|
||
return _do_new_record($delivery_order, 'supplier_delivery_order', %params);
|
||
}
|
||
|
||
sub _do_new_record {
|
||
my ($delivery_order, $type, %params) = @_;
|
||
|
||
$params{display} ||= 'inline';
|
||
|
||
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/;
|
||
|
||
my $text = join '', (
|
||
$params{no_link} ? '' : '<a href="controller.pl?action=DeliveryOrder/edit&type=' . $type . '&id=' . escape($delivery_order->id) . '">',
|
||
escape($delivery_order->donumber),
|
||
$params{no_link} ? '' : '</a>',
|
||
);
|
||
is_escaped($text);
|
||
}
|
||
|
||
sub _do_record {
|
||
my ($delivery_order, $type, %params) = @_;
|
||
|
||
$params{display} ||= 'inline';
|
||
|
||
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/;
|
||
... | ... | |
my $object = SL::DB::Manager::DeliveryOrder->get_first(where => [ record_type => PURCHASE_DELIVERY_ORDER_TYPE ]);
|
||
my $html = SL::Presenter::DeliveryOrder::purchase_delivery_order($object, display => 'inline');
|
||
|
||
#...
|
||
|
||
# or for all types:
|
||
my $html = SL::Presenter::DeliveryOrder::delivery_order($object);
|
||
my $html = $object->presenter->show();
|
||
|
||
=head1 FUNCTIONS
|
||
|
||
=over 4
|
||
|
||
=item C<sales_delivery_order $object, %params>
|
||
=item C<show $object %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the sales delivery order object
|
||
C<$object>.
|
||
Alias for C<delivery_order $object %params>.
|
||
|
||
Remaining C<%params> are passed to the function
|
||
C<SL::Presenter::Tag::link_tag>. It can include:
|
||
=item C<sales_delivery_order $object, %params>
|
||
|
||
=over 2
|
||
Alias for C<delivery_order $object %params>.
|
||
|
||
=item * display
|
||
=item C<purchase_delivery_order $object, %params>
|
||
|
||
Either C<inline> (the default) or C<table-cell>. Is passed to the function
|
||
C<SL::Presenter::Tag::link_tag>.
|
||
Alias for C<delivery_order $object %params>.
|
||
|
||
=item * no_link
|
||
=item C<rma_delivery_order $object, %params>
|
||
|
||
If falsish (the default) then the delivery order number will be linked
|
||
to the "edit delivery order" dialog from the sales menu.
|
||
Alias for C<delivery_order $object %params>.
|
||
|
||
=back
|
||
=item C<supplier_delivery_order $object, %params>
|
||
|
||
=item C<purchase_delivery_order $object, %params>
|
||
Alias for C<delivery_order $object %params>.
|
||
|
||
=item C<delivery_order $object, %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the purchase delivery order object
|
||
L<SL::Presenter::EscapedText>) of the sales delivery order object
|
||
C<$object>.
|
||
|
||
Remaining C<%params> are passed to the function
|
||
C<SL::Presenter::Tag::link_tag>. It can include:
|
||
L<SL::Presenter::Tag/link_tag>. It can include:
|
||
|
||
=over 2
|
||
|
||
... | ... | |
=item * no_link
|
||
|
||
If falsish (the default) then the delivery order number will be linked
|
||
to the "edit delivery order" dialog from the purchase menu.
|
||
to the "edit delivery order" dialog from the sales menu.
|
||
|
||
=back
|
||
|
SL/Presenter/Dunning.pm | ||
---|---|---|
use SL::Presenter::Tag qw(link_tag);
|
||
|
||
use Exporter qw(import);
|
||
our @EXPORT_OK = qw(dunning);
|
||
our @EXPORT_OK = qw(show dunning);
|
||
|
||
use Carp;
|
||
|
||
sub show {goto &dunning};
|
||
|
||
sub dunning {
|
||
my ($dunning, %params) = @_;
|
||
|
||
... | ... | |
|
||
my $text = escape($dunning->dunning_config->dunning_description);
|
||
if (! delete $params{no_link}) {
|
||
my @flags;
|
||
my @flags = ();
|
||
push @flags, 'showold=1';
|
||
push @flags, 'l_mails=1' if $::instance_conf->get_email_journal;
|
||
push @flags, 'l_webdav=1' if $::instance_conf->get_webdav;
|
||
... | ... | |
}
|
||
|
||
1;
|
||
|
||
__END__
|
||
|
||
=pod
|
||
|
||
=encoding utf8
|
||
|
||
=head1 NAME
|
||
|
||
SL::Presenter::Dunning - Presenter module for SL::DB::Dunning objects
|
||
|
||
=head1 SYNOPSIS
|
||
|
||
my $object = SL::DB::Manager::Dunning->get_first();
|
||
my $html = SL::Presenter::Dunning::dunning($object);
|
||
# or
|
||
my $html = $object->presenter->show();
|
||
|
||
=head1 FUNCTIONS
|
||
|
||
=over 4
|
||
|
||
=item C<show $object>
|
||
|
||
Alias for C<dunning $object %params>.
|
||
|
||
=item C<dunning $object %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the dunning object
|
||
C<$object>.
|
||
|
||
Remaining C<%params> are passed to the function
|
||
C<SL::Presenter::Tag::link_tag>. It can include:
|
||
|
||
=over 2
|
||
|
||
=item * no_link
|
||
|
||
If falsish (the default) then the dunning will be linked to the "show" dialog.
|
||
|
||
=back
|
||
|
||
=back
|
||
|
||
=head1 BUGS
|
||
|
||
Nothing here yet.
|
||
|
||
=head1 AUTHOR
|
||
|
||
Tamino Steinert E<lt>tamino.steinert@tamino.stE<gt>
|
||
|
||
=cut
|
SL/Presenter/EmailJournal.pm | ||
---|---|---|
use SL::DB::EmailJournalAttachment;
|
||
|
||
use Exporter qw(import);
|
||
our @EXPORT_OK = qw(email_journal entry_status attachment_preview);
|
||
our @EXPORT_OK = qw(show email_journal entry_status attachment_preview);
|
||
|
||
use Carp;
|
||
|
||
sub show {goto &email_journal};
|
||
|
||
sub email_journal {
|
||
my ($email_journal_entry, %params) = @_;
|
||
|
||
... | ... | |
|
||
my $journal_entry = SL::DB::Manager::EmailJournal->get_first();
|
||
my $html = SL::Presenter::EmailJournal::email_journal($journal_entry, display => 'inline');
|
||
# or
|
||
my $html = $journal_entry->presenter->show();
|
||
|
||
# pp $html
|
||
# <a href="controller.pl?action=EmailJournal/show&id=1">IDEV Daten fuer webdav/idev/2017-KW-26.csv erzeugt</a>
|
||
... | ... | |
|
||
=over 4
|
||
|
||
=item C<show $object %params>
|
||
|
||
Alias for C<email_journal $object %params>.
|
||
|
||
=item C<email_journal $object, %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
SL/Presenter/GL.pm | ||
---|---|---|
use SL::Presenter::Tag qw(link_tag);
|
||
|
||
use Exporter qw(import);
|
||
our @EXPORT_OK = qw(gl_transaction);
|
||
our @EXPORT_OK = qw(show gl_transaction);
|
||
|
||
use Carp;
|
||
|
||
sub show {goto &gl_transaction};
|
||
|
||
sub gl_transaction {
|
||
my ($gl_transaction, %params) = @_;
|
||
|
||
... | ... | |
|
||
my $object = SL::DB::Manager::GLTransaction->get_first();
|
||
my $html = SL::Presenter::GL::gl_transaction($object, display => 'inline');
|
||
# or
|
||
my $html = $object->presenter->show();
|
||
|
||
=head1 FUNCTIONS
|
||
|
||
=over 4
|
||
|
||
=item C<show $object %params>
|
||
|
||
Alias for C<gl_transaction $object %params>.
|
||
|
||
=item C<gl_transaction $object, %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
SL/Presenter/Invoice.pm | ||
---|---|---|
use SL::Presenter::Tag qw(link_tag);
|
||
|
||
use Exporter qw(import);
|
||
our @EXPORT_OK = qw(invoice sales_invoice ar_transaction purchase_invoice ap_transaction);
|
||
our @EXPORT_OK = qw(show invoice sales_invoice ar_transaction purchase_invoice ap_transaction);
|
||
|
||
use Carp;
|
||
|
||
sub show {goto &invoice};
|
||
|
||
sub invoice {
|
||
my ($invoice, %params) = @_;
|
||
|
||
... | ... | |
|
||
# use with any of the above ar/ap/is/ir types:
|
||
my $html = SL::Presenter::Invoice::invoice($object, display => 'inline');
|
||
my $html = $object->presenter->show();
|
||
|
||
=head1 FUNCTIONS
|
||
|
||
=over 4
|
||
|
||
=item C<show $object>
|
||
|
||
Alias for C<invoice $object %params>.
|
||
|
||
=item C<invoice $object, %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
SL/Presenter/Letter.pm | ||
---|---|---|
use SL::Presenter::Tag qw(link_tag);
|
||
|
||
use Exporter qw(import);
|
||
our @EXPORT_OK = qw(letter);
|
||
our @EXPORT_OK = qw(show letter);
|
||
|
||
use Carp;
|
||
|
||
sub show {goto &letter};
|
||
|
||
sub letter {
|
||
my ($letter, %params) = @_;
|
||
|
||
... | ... | |
|
||
my $letter = SL::DB::Manager::Letter->get_first(where => [ … ]);
|
||
my $html = SL::Presenter::Letter::letter($letter, display => 'inline');
|
||
# or
|
||
my $html = $letter->presenter->show();
|
||
|
||
=head1 FUNCTIONS
|
||
|
||
=over 4
|
||
|
||
=item C<show $object>
|
||
|
||
Alias for C<letter $object %params>.
|
||
|
||
=item C<letter $object, %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
SL/Presenter/Order.pm | ||
---|---|---|
use SL::Presenter::Tag qw(link_tag);
|
||
|
||
use Exporter qw(import);
|
||
our @EXPORT_OK = qw(sales_quotation sales_order request_quotation purchase_order purchase_order_confirmation);
|
||
our @EXPORT_OK = qw(show order sales_quotation sales_order_intake sales_order request_quotation purchase_quotation_intake purchase_order purchase_order_confirmation);
|
||
|
||
use Carp;
|
||
|
||
sub sales_quotation {
|
||
my ($order, %params) = @_;
|
||
|
||
return _oe_record($order, 'sales_quotation', %params);
|
||
}
|
||
|
||
sub sales_order_intake {
|
||
my ($order, %params) = @_;
|
||
|
||
return _oe_record($order, 'sales_order_intake', %params);
|
||
}
|
||
|
||
sub sales_order {
|
||
my ($order, %params) = @_;
|
||
sub show {goto &order}
|
||
|
||
return _oe_record($order, 'sales_order', %params);
|
||
}
|
||
sub sales_quotation {goto &order}
|
||
|
||
sub request_quotation {
|
||
my ($order, %params) = @_;
|
||
sub sales_order_intake {goto &order}
|
||
|
||
return _oe_record($order, 'request_quotation', %params);
|
||
}
|
||
sub sales_order {goto &order}
|
||
|
||
sub purchase_quotation_intake {
|
||
my ($order, %params) = @_;
|
||
sub request_quotation {goto &order}
|
||
|
||
return _oe_record($order, 'purchase_quotation_intake', %params);
|
||
}
|
||
sub purchase_quotation_intake {goto &order}
|
||
|
||
sub purchase_order {
|
||
my ($order, %params) = @_;
|
||
sub purchase_order {goto &order}
|
||
|
||
return _oe_record($order, 'purchase_order', %params);
|
||
}
|
||
sub purchase_order_confirmation {goto &order}
|
||
|
||
sub purchase_order_confirmation {
|
||
sub order {
|
||
my ($order, %params) = @_;
|
||
|
||
return _oe_record($order, 'purchase_order_confirmation', %params);
|
||
}
|
||
|
||
sub _oe_record {
|
||
my ($order, $type, %params) = @_;
|
||
my $type = $order->record_type;
|
||
|
||
$params{display} ||= 'inline';
|
||
|
||
... | ... | |
my $object = SL::DB::Manager::Order->get_first(where => [ SL::DB::Manager::Order->type_filter('purchase_order') ]);
|
||
my $html = SL::Presenter::Order::purchase_order($object, display => 'inline');
|
||
|
||
# or for all types:
|
||
my $html = SL::Presenter::Order::order($object);
|
||
my $html = $object->presenter->show();
|
||
|
||
=head1 FUNCTIONS
|
||
|
||
=over 4
|
||
|
||
=item C<sales_quotation $object, %params>
|
||
=item C<show $object %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the sales quotation object
|
||
C<$object>.
|
||
Alias for C<order $object %params>.
|
||
|
||
Remaining C<%params> are passed to the function
|
||
C<SL::Presenter::Tag::link_tag>. It can include:
|
||
=item C<sales_quotation $object %params>
|
||
|
||
=over 2
|
||
Alias for C<order $object %params>.
|
||
|
||
=item * display
|
||
=item C<sales_order_intake $object %params>
|
||
|
||
Either C<inline> (the default) or C<table-cell>. Is passed to the function
|
||
C<SL::Presenter::Tag::link_tag>.
|
||
Alias for C<order $object %params>.
|
||
|
||
=item * no_link
|
||
=item C<sales_order $object %params>
|
||
|
||
If falsish (the default) then the order number will be linked to the
|
||
"edit quotation" dialog from the sales menu.
|
||
Alias for C<order $object %params>.
|
||
|
||
=back
|
||
=item C<request_quotation $object %params>
|
||
|
||
=item C<sales_order $object, %params>
|
||
Alias for C<order $object %params>.
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the sales order object C<$object>.
|
||
=item C<purchase_quotation_intake $object %params>
|
||
|
||
Remaining C<%params> are passed to the function
|
||
C<SL::Presenter::Tag::link_tag>. It can include:
|
||
|
||
=over 2
|
||
|
||
=item * display
|
||
|
||
Either C<inline> (the default) or C<table-cell>. Is passed to the function
|
||
C<SL::Presenter::Tag::link_tag>.
|
||
Alias for C<order $object %params>.
|
||
|
||
=item * no_link
|
||
|
||
If falsish (the default) then the order number will be linked
|
||
to the "edit order" dialog from the sales menu.
|
||
|
||
=back
|
||
|
||
=item C<request_quotation $object, %params>
|
||
=item C<purchase_order $object %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the request for quotation object
|
||
C<$object>.
|
||
|
||
Remaining C<%params> are passed to the function
|
||
C<SL::Presenter::Tag::link_tag>. It can include:
|
||
|
||
=over 2
|
||
|
||
=item * display
|
||
|
||
Either C<inline> (the default) or C<table-cell>. Is passed to the function
|
||
C<SL::Presenter::Tag::link_tag>.
|
||
|
||
=item * no_link
|
||
|
||
If falsish (the default) then the order number will be linked to the
|
||
"edit request for quotation" dialog from the purchase menu.
|
||
|
||
=back
|
||
Alias for C<order $object %params>.
|
||
|
||
=item C<purchase_order $object, %params>
|
||
=item C<order $object %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the purchase order object
|
||
... | ... | |
=item * no_link
|
||
|
||
If falsish (the default) then the order number will be linked
|
||
to the "edit order" dialog from the purchase menu.
|
||
to the "edit order" dialog.
|
||
|
||
=back
|
||
|
SL/Presenter/Reclamation.pm | ||
---|---|---|
use strict;
|
||
|
||
use SL::Presenter::EscapedText qw(escape is_escaped);
|
||
use SL::Presenter::Tag qw(html_tag);
|
||
use SL::Presenter::Tag qw(link_tag);
|
||
|
||
use Exporter qw(import);
|
||
our @EXPORT_OK = qw(sales_reclamation purchase_reclamation);
|
||
our @EXPORT_OK = qw(show sales_reclamation purchase_reclamation);
|
||
|
||
use Carp;
|
||
|
||
sub sales_reclamation {
|
||
my ($reclamation, %params) = @_;
|
||
sub show {goto &reclamation};
|
||
|
||
return _reclamation_record($reclamation, 'sales_reclamation', %params);
|
||
}
|
||
sub sales_reclamation {goto &reclamation}
|
||
sub purchase_reclamation {goto &reclamation}
|
||
|
||
sub purchase_reclamation {
|
||
sub reclamation {
|
||
my ($reclamation, %params) = @_;
|
||
|
||
return _reclamation_record($reclamation, 'purchase_reclamation', %params);
|
||
}
|
||
|
||
sub _reclamation_record {
|
||
my ($reclamation, $type, %params) = @_;
|
||
|
||
$params{display} ||= 'inline';
|
||
|
||
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/;
|
||
|
||
my $text = escape($reclamation->record_number);
|
||
unless ($params{no_link}) {
|
||
my $id = $reclamation->id;
|
||
$text = html_tag('a', $text, href => escape("controller.pl?action=Reclamation/edit&type=${type}&id=${id}"));
|
||
my $href = 'controller.pl?action=Reclamation/edit&id=' . escape($reclamation->id);
|
||
$text = link_tag($href, $text, %params);
|
||
}
|
||
|
||
is_escaped($text);
|
||
... | ... | |
my $object = SL::DB::Manager::Reclamation->get_first(
|
||
where => [ SL::DB::Manager::Reclamation->type_filter('sales_reclamation') ]
|
||
);
|
||
my $html = SL::Presenter::Reclamation::sales_reclamation(
|
||
$object, display => 'inline'
|
||
);
|
||
my $html = SL::Presenter::Reclamation::sales_reclamation($object);
|
||
|
||
# Purchase reclamations:
|
||
my $object = SL::DB::Manager::Reclamation->get_first(
|
||
where => [ SL::DB::Manager::Reclamation->type_filter('purchase_reclamation') ]
|
||
);
|
||
my $html = SL::Presenter::Reclamation::purchase_reclamation(
|
||
my $html = SL::Presenter::Reclamation::purchase_reclamation($object);
|
||
|
||
# or for all types:
|
||
my $html = SL::Presenter::Reclamation::reclamation(
|
||
$object, display => 'inline'
|
||
);
|
||
my $html = $object->presenter->show();
|
||
|
||
=head1 FUNCTIONS
|
||
|
||
=over 4
|
||
|
||
=item C<sales_reclamation $object, %params>
|
||
=item C<show $object %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the sales reclamation object C<$object>.
|
||
|
||
C<%params> can include:
|
||
Alias for C<reclamation $object %params>.
|
||
|
||
=over 2
|
||
|
||
=item * display
|
||
=item C<sales_reclamation $object, %params>
|
||
|
||
Either C<inline> (the default) or C<table-cell>. At the moment both
|
||
representations are identical and produce the objects's
|
||
reclamation number linked to the corresponding 'edit' action.
|
||
Alias for C<reclamation $object %params>.
|
||
|
||
=item * no_link
|
||
=item C<purchase_reclamation $object, %params>
|
||
|
||
If falsish (the default) then the reclamation number will be linked to the
|
||
"edit reclamation" dialog from the sales menu.
|
||
Alias for C<reclamation $object %params>.
|
||
|
||
=back
|
||
|
||
=item C<purchase_reclamation $object, %params>
|
||
=item C<reclamation $object %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the purchase reclamation object C<$object>.
|
||
L<SL::Presenter::EscapedText>) of the sales reclamation object C<$object>.
|
||
|
||
C<%params> can include:
|
||
|
||
=over 2
|
||
|
||
=item * display
|
||
|
||
Either C<inline> (the default) or C<table-cell>. At the moment both
|
||
representations are identical and produce the objects's reclamation number
|
||
linked to the corresponding 'edit' action.
|
||
|
||
=item * no_link
|
||
|
||
If falsish (the default) then the reclamation number will be linked to the
|
||
"edit reclamation" dialog from the purchase menu.
|
||
"edit reclamation" dialog.
|
||
|
||
=back
|
||
|
||
When C<$params{no_link}> is falsish, other C<%params> get passed to
|
||
L<SL::Presenter::Tag/link_tag> .
|
||
|
||
=back
|
||
|
||
=head1 BUGS
|
SL/Presenter/RequirementSpec.pm | ||
---|---|---|
use SL::Presenter::Tag qw(link_tag);
|
||
|
||
use Exporter qw(import);
|
||
our @EXPORT_OK = qw(requirement_spec);
|
||
our @EXPORT_OK = qw(show requirement_spec);
|
||
|
||
use Carp;
|
||
|
||
sub show {goto &requirement_spec};
|
||
|
||
sub requirement_spec {
|
||
my ($requirement_spec, %params) = @_;
|
||
|
||
... | ... | |
}
|
||
|
||
1;
|
||
|
||
__END__
|
||
|
||
=pod
|
||
|
||
=encoding utf8
|
||
|
||
=head1 NAME
|
||
|
||
SL::Presenter::RequirementSpec - Presenter module for SL::DB::RequirementSpec objects
|
||
|
||
=head1 SYNOPSIS
|
||
|
||
my $object = SL::DB::Manager::RequirementSpec->get_first();
|
||
my $html = SL::Presenter::RequirementSpec::requirement_spec($object);
|
||
# or
|
||
my $html = $object->presenter->show();
|
||
|
||
=head1 FUNCTIONS
|
||
|
||
=over 4
|
||
|
||
=item C<show $object>
|
||
|
||
Alias for C<requirement_spec $object %params>.
|
||
|
||
=item C<requirement_spec $object %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the bank transaction object
|
||
C<$object>. C<%params> gets passed to L<SL::Presenter::Tag/link_tag>.
|
||
|
||
=back
|
||
|
||
=head1 BUGS
|
||
|
||
Nothing here yet.
|
||
|
||
=head1 AUTHOR
|
||
|
||
Tamino Steinert E<lt>tamino.steinert@tamino.stE<gt>
|
||
|
||
=cut
|
SL/Presenter/ShopOrder.pm | ||
---|---|---|
use SL::Presenter::Tag qw(link_tag);
|
||
|
||
use Exporter qw(import);
|
||
our @EXPORT_OK = qw(shop_order);
|
||
our @EXPORT_OK = qw(show shop_order);
|
||
|
||
use Carp;
|
||
|
||
sub show {goto &shop_order};
|
||
|
||
sub shop_order {
|
||
my ($shop_order, $type, %params) = @_;
|
||
my ($shop_order, %params) = @_;
|
||
|
||
$params{display} ||= 'inline';
|
||
|
||
... | ... | |
|
||
is_escaped($text);
|
||
}
|
||
|
||
1;
|
||
|
||
__END__
|
||
|
||
=pod
|
||
|
||
=encoding utf8
|
||
|
||
=head1 NAME
|
||
|
||
SL::Presenter::ShopOrder - Presenter module for SL::DB::ShopOrder objects
|
||
|
||
=head1 SYNOPSIS
|
||
|
||
my $object = SL::DB::Manager::ShopOrder->get_first();
|
||
my $html = SL::Presenter::ShopOrder::shop_order($object);
|
||
# or
|
||
my $html = $object->presenter->show();
|
||
|
||
=head1 FUNCTIONS
|
||
|
||
=over 4
|
||
|
||
=item C<show $object>
|
||
|
||
Alias for C<shop_order $object %params>.
|
||
|
||
=item C<shop_order $object %params>
|
||
|
||
Returns a rendered version (actually an instance of
|
||
L<SL::Presenter::EscapedText>) of the shop order object
|
||
C<$object>.
|
||
|
||
Remaining C<%params> are passed to the function
|
||
C<SL::Presenter::Tag::link_tag>. It can include:
|
||
|
||
=over 2
|
||
|
||
=item * no_link
|
||
|
||
If falsish (the default) then the shop order will be linked to the "show" dialog.
|
||
|
||
=back
|
||
|
||
C<%params> gets passed to L<SL::Presenter::Tag/link_tag>.
|
||
|
||
=back
|
||
|
||
=head1 BUGS
|
||
|
||
Nothing here yet.
|
||
|
||
=head1 AUTHOR
|
||
|
||
Tamino Steinert E<lt>tamino.steinert@tamino.stE<gt>
|
||
|
||
=cut
|
Auch abrufbar als: Unified diff
S:Presenter:Record: Alias Funktion "show" in verwendeten Objekten