Revision ee51b82f
Von Tamino Steinert vor etwa 2 Jahren hinzugefügt
SL/Presenter/Chart.pm | ||
---|---|---|
10 | 10 |
use Carp; |
11 | 11 |
use Data::Dumper; |
12 | 12 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
13 |
use SL::Presenter::Tag qw(input_tag name_to_id html_tag); |
|
13 |
use SL::Presenter::Tag qw(input_tag name_to_id html_tag link_tag);
|
|
14 | 14 |
|
15 | 15 |
sub chart { |
16 | 16 |
my ($chart, %params) = @_; |
... | ... | |
19 | 19 |
|
20 | 20 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
21 | 21 |
|
22 |
my $text = join '', (
|
|
23 |
$params{no_link} ? '' : '<a href="am.pl?action=edit_account&id=' . escape($chart->id) . '">',
|
|
24 |
escape($chart->accno),
|
|
25 |
$params{no_link} ? '' : '</a>',
|
|
26 |
);
|
|
22 |
my $text = escape($chart->accno);
|
|
23 |
if (! delete $params{no_link}) {
|
|
24 |
my $href = 'am.pl?action=edit_account&id=' . escape($chart->id);
|
|
25 |
$text = link_tag($href, $text, %params);
|
|
26 |
}
|
|
27 | 27 |
is_escaped($text); |
28 | 28 |
} |
29 | 29 |
|
... | ... | |
82 | 82 |
Returns a rendered version (actually an instance of |
83 | 83 |
L<SL::Presenter::EscapedText>) of the chart object C<$object> |
84 | 84 |
|
85 |
C<%params> can include: |
|
85 |
Remaining C<%params> are passed to the function |
|
86 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
86 | 87 |
|
87 |
=over 4
|
|
88 |
=over 2
|
|
88 | 89 |
|
89 | 90 |
=item * display |
90 | 91 |
|
91 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
92 |
representations are identical and produce the chart's name linked |
|
93 |
to the corresponding 'edit' action. |
|
92 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
93 |
C<SL::Presenter::Tag::link_tag>. |
|
94 |
|
|
95 |
=item * no_link |
|
96 |
|
|
97 |
If falsish (the default) then the account number will be linked to the "edit" |
|
98 |
dialog. |
|
94 | 99 |
|
95 | 100 |
=back |
96 | 101 |
|
SL/Presenter/CustomerVendor.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(input_tag html_tag name_to_id select_tag); |
|
6 |
use SL::Presenter::Tag qw(input_tag html_tag name_to_id select_tag link_tag);
|
|
7 | 7 |
|
8 | 8 |
use Exporter qw(import); |
9 | 9 |
our @EXPORT_OK = qw(customer_vendor customer vendor customer_vendor_picker customer_picker vendor_picker); |
... | ... | |
32 | 32 |
|
33 | 33 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
34 | 34 |
|
35 |
my $callback = $params{callback} ? '&callback=' . $::form->escape($params{callback}) : ''; |
|
36 |
|
|
37 |
my $text = join '', ( |
|
38 |
$params{no_link} ? '' : '<a href="controller.pl?action=CustomerVendor/edit&db=' . $type . '&id=' . escape($cv->id) . '">', |
|
39 |
escape($cv->name), |
|
40 |
$params{no_link} ? '' : '</a>', |
|
41 |
); |
|
35 |
my $text = escape($cv->name); |
|
36 |
if (! delete $params{no_link}) { |
|
37 |
my $href = 'controller.pl?action=CustomerVendor/edit&db=' . $type |
|
38 |
. '&id=' . escape($cv->id); |
|
39 |
$text = link_tag($href, $text, %params); |
|
40 |
} |
|
42 | 41 |
|
43 | 42 |
is_escaped($text); |
44 | 43 |
} |
... | ... | |
113 | 112 |
Returns a rendered version (actually an instance of |
114 | 113 |
L<SL::Presenter::EscapedText>) of the customer object C<$object>. |
115 | 114 |
|
116 |
C<%params> can include: |
|
115 |
Remaining C<%params> are passed to the function |
|
116 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
117 | 117 |
|
118 | 118 |
=over 2 |
119 | 119 |
|
120 | 120 |
=item * display |
121 | 121 |
|
122 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
123 |
representations are identical and produce the customer's name linked |
|
124 |
to the corresponding 'edit' action. |
|
122 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
123 |
C<SL::Presenter::Tag::link_tag>. |
|
125 | 124 |
|
126 | 125 |
=item * no_link |
127 | 126 |
|
... | ... | |
135 | 134 |
Returns a rendered version (actually an instance of |
136 | 135 |
L<SL::Presenter::EscapedText>) of the vendor object C<$object>. |
137 | 136 |
|
138 |
C<%params> can include: |
|
137 |
Remaining C<%params> are passed to the function |
|
138 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
139 | 139 |
|
140 | 140 |
=over 2 |
141 | 141 |
|
142 | 142 |
=item * display |
143 | 143 |
|
144 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
145 |
representations are identical and produce the vendor's name linked |
|
146 |
to the corresponding 'edit' action. |
|
144 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
145 |
C<SL::Presenter::Tag::link_tag>. |
|
147 | 146 |
|
148 | 147 |
=item * no_link |
149 | 148 |
|
SL/Presenter/DeliveryOrder.pm | ||
---|---|---|
5 | 5 |
use SL::DB::DeliveryOrder::TypeData (); |
6 | 6 |
use SL::Locale::String qw(t8); |
7 | 7 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
8 |
use SL::Presenter::Tag qw(link_tag); |
|
8 | 9 |
|
9 | 10 |
use Exporter qw(import); |
10 | 11 |
our @EXPORT_OK = qw(sales_delivery_order purchase_delivery_order delivery_order_status_line); |
... | ... | |
57 | 58 |
|
58 | 59 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
59 | 60 |
|
60 |
my $text = join '', ( |
|
61 |
$params{no_link} ? '' : '<a href="do.pl?action=edit&type=' . $type . '&id=' . escape($delivery_order->id) . '">', |
|
62 |
escape($delivery_order->donumber), |
|
63 |
$params{no_link} ? '' : '</a>', |
|
64 |
); |
|
61 |
my $text = escape($delivery_order->donumber); |
|
62 |
if (! delete $params{no_link}) { |
|
63 |
my $href = 'do.pl?action=edit&type=' . $type |
|
64 |
. '&id=' . escape($delivery_order->id); |
|
65 |
$text = link_tag($href, $text, %params); |
|
66 |
} |
|
67 |
|
|
65 | 68 |
is_escaped($text); |
66 | 69 |
} |
67 | 70 |
|
... | ... | |
128 | 131 |
L<SL::Presenter::EscapedText>) of the sales delivery order object |
129 | 132 |
C<$object>. |
130 | 133 |
|
131 |
C<%params> can include: |
|
134 |
Remaining C<%params> are passed to the function |
|
135 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
132 | 136 |
|
133 | 137 |
=over 2 |
134 | 138 |
|
135 | 139 |
=item * display |
136 | 140 |
|
137 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
138 |
representations are identical and produce the objects's delivery |
|
139 |
order number linked to the corresponding 'edit' action. |
|
141 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
142 |
C<SL::Presenter::Tag::link_tag>. |
|
140 | 143 |
|
141 | 144 |
=item * no_link |
142 | 145 |
|
... | ... | |
151 | 154 |
L<SL::Presenter::EscapedText>) of the purchase delivery order object |
152 | 155 |
C<$object>. |
153 | 156 |
|
154 |
C<%params> can include: |
|
157 |
Remaining C<%params> are passed to the function |
|
158 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
155 | 159 |
|
156 | 160 |
=over 2 |
157 | 161 |
|
158 | 162 |
=item * display |
159 | 163 |
|
160 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
161 |
representations are identical and produce the objects's delivery |
|
162 |
order number linked to the corresponding 'edit' action. |
|
164 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
165 |
C<SL::Presenter::Tag::link_tag>. |
|
163 | 166 |
|
164 | 167 |
=item * no_link |
165 | 168 |
|
SL/Presenter/Dunning.pm | ||
---|---|---|
18 | 18 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
19 | 19 |
|
20 | 20 |
my $text = escape($dunning->dunning_config->dunning_description); |
21 |
|
|
22 | 21 |
if (! delete $params{no_link}) { |
23 | 22 |
my @flags; |
24 | 23 |
push @flags, 'showold=1'; |
SL/Presenter/EmailJournal.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(link_tag); |
|
6 | 7 |
|
7 | 8 |
use Exporter qw(import); |
8 | 9 |
our @EXPORT_OK = qw(email_journal); |
... | ... | |
16 | 17 |
|
17 | 18 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
18 | 19 |
|
19 |
my $text = join '', ( |
|
20 |
$params{no_link} ? '' : '<a href="controller.pl?action=EmailJournal/show&id=' . escape($email_journal_entry->id) . '">', |
|
21 |
escape($email_journal_entry->subject), |
|
22 |
$params{no_link} ? '' : '</a>', |
|
23 |
); |
|
20 |
my $text = escape($email_journal_entry->subject); |
|
21 |
if (! delete $params{no_link}) { |
|
22 |
my $href = 'controller.pl?action=EmailJournal/show' |
|
23 |
. '&id=' . escape($email_journal_entry->id); |
|
24 |
$text = link_tag($href, $text, %params); |
|
25 |
} |
|
24 | 26 |
|
25 | 27 |
is_escaped($text); |
26 | 28 |
} |
... | ... | |
57 | 59 |
L<SL::Presenter::EscapedText>) of the email journal object C<$object> |
58 | 60 |
. |
59 | 61 |
|
60 |
|
|
61 |
C<%params> can include:
|
|
62 |
Remaining C<%params> are passed to the function |
|
63 |
C<SL::Presenter::Tag::link_tag>. It can include:
|
|
62 | 64 |
|
63 | 65 |
=over 2 |
64 | 66 |
|
65 | 67 |
=item * display |
66 | 68 |
|
67 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
68 |
representations are identical and produce the invoice number linked |
|
69 |
to the corresponding 'edit' action. |
|
69 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function C<SL::Presenter::Tag::link_tag>. |
|
70 | 70 |
|
71 | 71 |
=item * no_link |
72 | 72 |
|
SL/Presenter/FileObject.pm | ||
---|---|---|
54 | 54 |
L<SL::Presenter::EscapedText>) of the file object |
55 | 55 |
C<$file_object>. |
56 | 56 |
|
57 |
C<%params> can include: |
|
57 |
Remaining C<%params> are passed to the function |
|
58 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
58 | 59 |
|
59 | 60 |
=over 2 |
60 | 61 |
|
SL/Presenter/GL.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(link_tag); |
|
6 | 7 |
|
7 | 8 |
use Exporter qw(import); |
8 | 9 |
our @EXPORT_OK = qw(gl_transaction); |
... | ... | |
16 | 17 |
|
17 | 18 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
18 | 19 |
|
19 |
my $text = join '', (
|
|
20 |
$params{no_link} ? '' : '<a href="gl.pl?action=edit&id=' . escape($gl_transaction->id) . '">',
|
|
21 |
escape($gl_transaction->reference),
|
|
22 |
$params{no_link} ? '' : '</a>',
|
|
23 |
);
|
|
20 |
my $text = escape($gl_transaction->reference);
|
|
21 |
if (! delete $params{no_link}) {
|
|
22 |
my $href = 'gl.pl?action=edit&id=' . escape($gl_transaction->id);
|
|
23 |
$text = link_tag($href, $text, %params);
|
|
24 |
}
|
|
24 | 25 |
|
25 | 26 |
is_escaped($text); |
26 | 27 |
} |
... | ... | |
51 | 52 |
Returns a rendered version (actually an instance of |
52 | 53 |
L<SL::Presenter::EscapedText>) of a gl object C<$object>. |
53 | 54 |
|
54 |
C<%params> can include: |
|
55 |
Remaining C<%params> are passed to the function |
|
56 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
55 | 57 |
|
56 | 58 |
=over 2 |
57 | 59 |
|
58 | 60 |
=item * display |
59 | 61 |
|
60 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
61 |
representations are identical and produce the trans_id number linked |
|
62 |
to the corresponding 'edit' action. |
|
62 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
63 |
C<SL::Presenter::Tag::link_tag>. |
|
63 | 64 |
|
64 | 65 |
=item * no_link |
65 | 66 |
|
SL/Presenter/Invoice.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(link_tag); |
|
6 | 7 |
|
7 | 8 |
use Exporter qw(import); |
8 | 9 |
our @EXPORT_OK = qw(invoice sales_invoice ar_transaction purchase_invoice ap_transaction); |
... | ... | |
58 | 59 |
|
59 | 60 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
60 | 61 |
|
61 |
my $text = join '', ( |
|
62 |
$params{no_link} ? '' : '<a href="' . $controller . '.pl?action=edit&type=invoice&id=' . escape($invoice->id) . '">', |
|
63 |
escape($invoice->invnumber), |
|
64 |
$params{no_link} ? '' : '</a>', |
|
65 |
); |
|
62 |
my $text = escape($invoice->invnumber); |
|
63 |
if (! delete $params{no_link}) { |
|
64 |
my $href = $controller . '.pl?action=edit&type=invoice' |
|
65 |
. '&id=' . escape($invoice->id); |
|
66 |
$text = link_tag($href, $text, %params); |
|
67 |
} |
|
66 | 68 |
|
67 | 69 |
is_escaped($text); |
68 | 70 |
} |
... | ... | |
111 | 113 |
L<SL::Presenter::EscapedText>) of an ar/ap/is/ir object C<$object> . Determines |
112 | 114 |
which type (sales or purchase, invoice or not) the object is. |
113 | 115 |
|
114 |
C<%params> can include: |
|
116 |
Remaining C<%params> are passed to the function |
|
117 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
115 | 118 |
|
116 | 119 |
=over 2 |
117 | 120 |
|
118 | 121 |
=item * display |
119 | 122 |
|
120 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
121 |
representations are identical and produce the invoice number linked |
|
122 |
to the corresponding 'edit' action. |
|
123 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
124 |
C<SL::Presenter::Tag::link_tag>. |
|
123 | 125 |
|
124 | 126 |
=item * no_link |
125 | 127 |
|
... | ... | |
134 | 136 |
L<SL::Presenter::EscapedText>) of the sales invoice object C<$object> |
135 | 137 |
. |
136 | 138 |
|
137 |
C<%params> can include: |
|
139 |
Remaining C<%params> are passed to the function |
|
140 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
138 | 141 |
|
139 | 142 |
=over 2 |
140 | 143 |
|
141 | 144 |
=item * display |
142 | 145 |
|
143 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
144 |
representations are identical and produce the invoice number linked |
|
145 |
to the corresponding 'edit' action. |
|
146 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
147 |
C<SL::Presenter::Tag::link_tag>. |
|
146 | 148 |
|
147 | 149 |
=item * no_link |
148 | 150 |
|
... | ... | |
157 | 159 |
L<SL::Presenter::EscapedText>) of the AR transaction object C<$object> |
158 | 160 |
. |
159 | 161 |
|
160 |
C<%params> can include: |
|
162 |
Remaining C<%params> are passed to the function |
|
163 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
161 | 164 |
|
162 | 165 |
=over 2 |
163 | 166 |
|
164 | 167 |
=item * display |
165 | 168 |
|
166 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
167 |
representations are identical and produce the invoice number linked |
|
168 |
to the corresponding 'edit' action. |
|
169 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
170 |
C<SL::Presenter::Tag::link_tag>. |
|
169 | 171 |
|
170 | 172 |
=item * no_link |
171 | 173 |
|
... | ... | |
180 | 182 |
L<SL::Presenter::EscapedText>) of the purchase invoice object |
181 | 183 |
C<$object>. |
182 | 184 |
|
183 |
C<%params> can include: |
|
185 |
Remaining C<%params> are passed to the function |
|
186 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
184 | 187 |
|
185 | 188 |
=over 2 |
186 | 189 |
|
187 | 190 |
=item * display |
188 | 191 |
|
189 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
190 |
representations are identical and produce the invoice number name |
|
191 |
linked to the corresponding 'edit' action. |
|
192 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
193 |
C<SL::Presenter::Tag::link_tag>. |
|
192 | 194 |
|
193 | 195 |
=item * no_link |
194 | 196 |
|
... | ... | |
203 | 205 |
L<SL::Presenter::EscapedText>) of the AP transaction object C<$object> |
204 | 206 |
. |
205 | 207 |
|
206 |
C<%params> can include: |
|
208 |
Remaining C<%params> are passed to the function |
|
209 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
207 | 210 |
|
208 | 211 |
=over 2 |
209 | 212 |
|
210 | 213 |
=item * display |
211 | 214 |
|
212 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
213 |
representations are identical and produce the invoice number linked |
|
214 |
to the corresponding 'edit' action. |
|
215 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
216 |
C<SL::Presenter::Tag::link_tag>. |
|
215 | 217 |
|
216 | 218 |
=item * no_link |
217 | 219 |
|
SL/Presenter/Letter.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(link_tag); |
|
6 | 7 |
|
7 | 8 |
use Exporter qw(import); |
8 | 9 |
our @EXPORT_OK = qw(letter); |
... | ... | |
16 | 17 |
|
17 | 18 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
18 | 19 |
|
19 |
my $text = join '', ( |
|
20 |
$params{no_link} ? '' : '<a href="controller.pl?action=Letter/edit&letter.id=' . escape($letter->id) . '">', |
|
21 |
escape($letter->letternumber), |
|
22 |
$params{no_link} ? '' : '</a>', |
|
23 |
); |
|
20 |
my $text = escape($letter->letternumber); |
|
21 |
if (! delete $params{no_link}) { |
|
22 |
my $href = 'controller.pl?action=Letter/edit' |
|
23 |
. '&letter.id=' . escape($letter->id); |
|
24 |
$text = link_tag($href, $text, %params); |
|
25 |
} |
|
24 | 26 |
|
25 | 27 |
is_escaped($text); |
26 | 28 |
} |
... | ... | |
52 | 54 |
L<SL::Presenter::EscapedText>) of the letter object C<$object> |
53 | 55 |
. |
54 | 56 |
|
55 |
C<%params> can include: |
|
57 |
Remaining C<%params> are passed to the function |
|
58 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
56 | 59 |
|
57 | 60 |
=over 2 |
58 | 61 |
|
59 | 62 |
=item * display |
60 | 63 |
|
61 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
62 |
representations are identical and produce the invoice number linked |
|
63 |
to the corresponding 'edit' action. |
|
64 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
65 |
C<SL::Presenter::Tag::link_tag>. |
|
64 | 66 |
|
65 | 67 |
=item * no_link |
66 | 68 |
|
SL/Presenter/Order.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(link_tag); |
|
6 | 7 |
|
7 | 8 |
use Exporter qw(import); |
8 | 9 |
our @EXPORT_OK = qw(sales_quotation sales_order request_quotation purchase_order); |
... | ... | |
42 | 43 |
|
43 | 44 |
my $number_method = $order->quotation ? 'quonumber' : 'ordnumber'; |
44 | 45 |
|
45 |
my $link_start = ''; |
|
46 |
my $link_end = ''; |
|
47 |
unless ($params{no_link}) { |
|
46 |
my $text = escape($order->$number_method); |
|
47 |
if (! delete $params{no_link}) { |
|
48 | 48 |
my $action = $::instance_conf->get_feature_experimental_order |
49 | 49 |
? 'controller.pl?action=Order/edit' |
50 | 50 |
: 'oe.pl?action=edit'; |
51 |
$link_start = '<a href="' . $action . '&type=' . $type . '&id=' . escape($order->id) . '">'; |
|
52 |
$link_end = '</a>'; |
|
51 |
my $href = $action |
|
52 |
. '&type=' . $type |
|
53 |
. '&id=' . escape($order->id); |
|
54 |
$text = link_tag($href, $text, %params); |
|
53 | 55 |
} |
54 | 56 |
|
55 |
my $text = join '', ($link_start, escape($order->$number_method), $link_end); |
|
56 |
|
|
57 | 57 |
is_escaped($text); |
58 | 58 |
} |
59 | 59 |
|
... | ... | |
99 | 99 |
L<SL::Presenter::EscapedText>) of the sales quotation object |
100 | 100 |
C<$object>. |
101 | 101 |
|
102 |
C<%params> can include: |
|
102 |
Remaining C<%params> are passed to the function |
|
103 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
103 | 104 |
|
104 | 105 |
=over 2 |
105 | 106 |
|
106 | 107 |
=item * display |
107 | 108 |
|
108 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
109 |
representations are identical and produce the objects's |
|
110 |
quotation number linked to the corresponding 'edit' action. |
|
109 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
110 |
C<SL::Presenter::Tag::link_tag>. |
|
111 | 111 |
|
112 | 112 |
=item * no_link |
113 | 113 |
|
... | ... | |
121 | 121 |
Returns a rendered version (actually an instance of |
122 | 122 |
L<SL::Presenter::EscapedText>) of the sales order object C<$object>. |
123 | 123 |
|
124 |
C<%params> can include: |
|
124 |
Remaining C<%params> are passed to the function |
|
125 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
125 | 126 |
|
126 | 127 |
=over 2 |
127 | 128 |
|
128 | 129 |
=item * display |
129 | 130 |
|
130 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
131 |
representations are identical and produce the objects's |
|
132 |
order number linked to the corresponding 'edit' action. |
|
131 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
132 |
C<SL::Presenter::Tag::link_tag>. |
|
133 | 133 |
|
134 | 134 |
=item * no_link |
135 | 135 |
|
... | ... | |
144 | 144 |
L<SL::Presenter::EscapedText>) of the request for quotation object |
145 | 145 |
C<$object>. |
146 | 146 |
|
147 |
C<%params> can include: |
|
147 |
Remaining C<%params> are passed to the function |
|
148 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
148 | 149 |
|
149 | 150 |
=over 2 |
150 | 151 |
|
151 | 152 |
=item * display |
152 | 153 |
|
153 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
154 |
representations are identical and produce the objects's |
|
155 |
quotation number linked to the corresponding 'edit' action. |
|
154 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
155 |
C<SL::Presenter::Tag::link_tag>. |
|
156 | 156 |
|
157 | 157 |
=item * no_link |
158 | 158 |
|
... | ... | |
167 | 167 |
L<SL::Presenter::EscapedText>) of the purchase order object |
168 | 168 |
C<$object>. |
169 | 169 |
|
170 |
C<%params> can include: |
|
170 |
Remaining C<%params> are passed to the function |
|
171 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
171 | 172 |
|
172 | 173 |
=over 2 |
173 | 174 |
|
174 | 175 |
=item * display |
175 | 176 |
|
176 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
177 |
representations are identical and produce the objects's |
|
178 |
order number linked to the corresponding 'edit' action. |
|
177 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
178 |
C<SL::Presenter::Tag::link_tag>. |
|
179 | 179 |
|
180 | 180 |
=item * no_link |
181 | 181 |
|
SL/Presenter/Part.pm | ||
---|---|---|
24 | 24 |
|
25 | 25 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
26 | 26 |
|
27 |
my $text = join '', ( |
|
28 |
$params{no_link} ? '' : '<a href="controller.pl?action=Part/edit&part.id=' . escape($part->id) . '">', |
|
29 |
escape($part->partnumber), |
|
30 |
$params{no_link} ? '' : '</a>', |
|
31 |
); |
|
27 |
my $text = escape($part->partnumber); |
|
28 |
if (! delete $params{no_link}) { |
|
29 |
my $href = 'controller.pl?action=Part/edit' |
|
30 |
. '&part.id=' . escape($part->id); |
|
31 |
$text = link_tag($href, $text, %params); |
|
32 |
} |
|
32 | 33 |
|
33 | 34 |
is_escaped($text); |
34 | 35 |
} |
... | ... | |
163 | 164 |
Returns a rendered version (actually an instance of |
164 | 165 |
L<SL::Presenter::EscapedText>) of the part object C<$object> |
165 | 166 |
|
166 |
C<%params> can include: |
|
167 |
Remaining C<%params> are passed to the function |
|
168 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
167 | 169 |
|
168 | 170 |
=over 4 |
169 | 171 |
|
170 | 172 |
=item * display |
171 | 173 |
|
172 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
173 |
representations are identical and produce the part's name linked |
|
174 |
to the corresponding 'edit' action. |
|
174 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
175 |
C<SL::Presenter::Tag::link_tag>. |
|
176 |
|
|
177 |
=item * no_link |
|
178 |
|
|
179 |
If falsish (the default) then the part number will be linked to the "edit" |
|
180 |
dialog. |
|
175 | 181 |
|
176 | 182 |
=back |
177 | 183 |
|
SL/Presenter/Project.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(input_tag html_tag name_to_id select_tag); |
|
6 |
use SL::Presenter::Tag qw(input_tag html_tag name_to_id select_tag link_tag);
|
|
7 | 7 |
|
8 | 8 |
use Exporter qw(import); |
9 | 9 |
our @EXPORT_OK = qw(project project_picker); |
... | ... | |
19 | 19 |
|
20 | 20 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
21 | 21 |
|
22 |
my $description = $project->full_description(style => $params{style}); |
|
23 |
my $callback = $params{callback} ? '&callback=' . $::form->escape($params{callback}) : ''; |
|
22 |
my $description = $project->full_description(style => delete $params{style}); |
|
23 |
my $callback = $params{callback} ? |
|
24 |
'&callback=' . $::form->escape(delete $params{callback}) |
|
25 |
: ''; |
|
26 |
|
|
27 |
my $text = escape($description); |
|
28 |
if (! delete $params{no_link}) { |
|
29 |
my $href = 'controller.pl?action=Project/edit' |
|
30 |
. '&id=' . escape($project->id) |
|
31 |
. $callback; |
|
32 |
$text = link_tag($href, $text, %params); |
|
33 |
} |
|
24 | 34 |
|
25 |
my $text = join '', ( |
|
26 |
$params{no_link} ? '' : '<a href="controller.pl?action=Project/edit&id=' . escape($project->id) . $callback . '">', |
|
27 |
escape($description), |
|
28 |
$params{no_link} ? '' : '</a>', |
|
29 |
); |
|
30 | 35 |
is_escaped($text); |
31 | 36 |
} |
32 | 37 |
|
... | ... | |
81 | 86 |
Returns a rendered version (actually an instance of |
82 | 87 |
L<SL::Presenter::EscapedText>) of the project object C<$customer>. |
83 | 88 |
|
84 |
C<%params> can include: |
|
89 |
Remaining C<%params> are passed to the function |
|
90 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
85 | 91 |
|
86 | 92 |
=over 2 |
87 | 93 |
|
88 | 94 |
=item * display |
89 | 95 |
|
90 |
Either C<inline> (the default) or C<table-cell>. At the moment both |
|
91 |
representations are identical and produce the project's description |
|
92 |
(controlled by the C<style> parameter) linked to the corresponding |
|
93 |
'edit' action. |
|
96 |
Either C<inline> (the default) or C<table-cell>. Is passed to the function |
|
97 |
C<SL::Presenter::Tag::link_tag>. |
|
94 | 98 |
|
95 | 99 |
=item * style |
96 | 100 |
|
97 | 101 |
Determines what exactly will be output. Can be one of the values with |
98 | 102 |
C<both> being the default if it is missing: |
99 | 103 |
|
104 |
=item * no_link |
|
105 |
|
|
106 |
If falsish (the default) then the description will be linked to the "edit" |
|
107 |
dialog. |
|
108 |
|
|
100 | 109 |
=over 2 |
101 | 110 |
|
102 | 111 |
=item C<projectnumber> (or simply C<number>) |
SL/Presenter/RequirementSpec.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(link_tag); |
|
6 | 7 |
|
7 | 8 |
use Exporter qw(import); |
8 | 9 |
our @EXPORT_OK = qw(requirement_spec); |
... | ... | |
16 | 17 |
|
17 | 18 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
18 | 19 |
|
19 |
my $text = join '', ( |
|
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>', |
|
23 |
); |
|
20 |
my $text = escape($requirement_spec->id); |
|
21 |
if (! delete $params{no_link}) { |
|
22 |
my $href = 'controller.pl?action=RequirementSpec/show' |
|
23 |
. '&id=' . escape($requirement_spec->id); |
|
24 |
$text = link_tag($href, $text, %params); |
|
25 |
} |
|
24 | 26 |
|
25 | 27 |
is_escaped($text); |
26 | 28 |
} |
SL/Presenter/SepaExport.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(link_tag); |
|
6 | 7 |
|
7 | 8 |
use Exporter qw(import); |
8 | 9 |
our @EXPORT_OK = qw(sepa_export); |
... | ... | |
16 | 17 |
|
17 | 18 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
18 | 19 |
|
19 |
my $text = join '', ( |
|
20 |
$params{no_link} ? '' : '<a href="sepa.pl?action=bank_transfer_edit&vc=' . escape($sepa_export->vc) . '&id=' . escape($sepa_export->id) . '">', |
|
21 |
escape($sepa_export->id), |
|
22 |
$params{no_link} ? '' : '</a>', |
|
23 |
); |
|
20 |
my $text = escape($sepa_export->id); |
|
21 |
if (! delete $params{no_link}) { |
|
22 |
my $href = 'sepa.pl?action=bank_transfer_edit' |
|
23 |
. '&vc=' . escape($sepa_export->vc) |
|
24 |
. '&id=' . escape($sepa_export->id); |
|
25 |
$text = link_tag($href, $text, %params); |
|
26 |
} |
|
27 |
|
|
24 | 28 |
is_escaped($text); |
25 | 29 |
} |
26 | 30 |
|
SL/Presenter/ShopOrder.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 |
use SL::Presenter::Tag qw(link_tag); |
|
6 | 7 |
|
7 | 8 |
use Exporter qw(import); |
8 | 9 |
our @EXPORT_OK = qw(shop_order); |
... | ... | |
16 | 17 |
|
17 | 18 |
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; |
18 | 19 |
|
19 |
my $text = join '', ( |
|
20 |
$params{no_link} ? '' : '<a href="controller.pl?action=ShopOrder/show&id='. escape($shop_order->id) .'">', |
|
21 |
escape($shop_order->shop_ordernumber), |
|
22 |
$params{no_link} ? '' : '</a>', |
|
23 |
); |
|
20 |
my $text = escape($shop_order->shop_ordernumber); |
|
21 |
if (! delete $params{no_link}) { |
|
22 |
my $href = 'controller.pl?action=ShopOrder/show' |
|
23 |
. '&id='. escape($shop_order->id); |
|
24 |
$text = link_tag($href, $text, %params); |
|
25 |
} |
|
24 | 26 |
|
25 | 27 |
is_escaped($text); |
26 | 28 |
} |
SL/Presenter/WebdavObject.pm | ||
---|---|---|
55 | 55 |
L<SL::Presenter::EscapedText>) of the webdav object |
56 | 56 |
C<$webdav_object>. |
57 | 57 |
|
58 |
C<%params> can include: |
|
58 |
Remaining C<%params> are passed to the function |
|
59 |
C<SL::Presenter::Tag::link_tag>. It can include: |
|
59 | 60 |
|
60 | 61 |
=over 2 |
61 | 62 |
|
Auch abrufbar als: Unified diff
Presenter: nutze link_tag anstelle von html im perl-code
(cherry picked aus Kundenprojekt)