Revision 8c7e4493
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
SL/Template/Plugin/LxERP.pm | ||
---|---|---|
2 | 2 |
|
3 | 3 |
use base qw( Template::Plugin ); |
4 | 4 |
use Template::Plugin; |
5 |
use List::Util qw(first); |
|
5 |
|
|
6 |
use List::Util qw(min); |
|
7 |
|
|
8 |
use SL::AM; |
|
6 | 9 |
|
7 | 10 |
sub new { |
8 | 11 |
my $class = shift; |
... | ... | |
18 | 21 |
return ''; |
19 | 22 |
} |
20 | 23 |
|
24 |
sub format_amount_units { |
|
25 |
my ($self, $amount, $amount_unit, $part_unit) = @_; |
|
26 |
|
|
27 |
return $main::form->format_amount_units('amount' => $amount, |
|
28 |
'part_unit' => $part_unit, |
|
29 |
'amount_unit' => $amount_unit, |
|
30 |
'conv_units' => 'convertible_not_smaller'); |
|
31 |
} |
|
32 |
|
|
21 | 33 |
sub format_percent { |
22 | 34 |
my ($self, $var, $places, $skip_zero) = @_; |
23 | 35 |
|
... | ... | |
33 | 45 |
return $var; |
34 | 46 |
} |
35 | 47 |
|
36 |
1; |
|
48 |
sub format_string { |
|
49 |
my $self = shift; |
|
50 |
my $string = shift; |
|
51 |
|
|
52 |
return $main::form->format_string($string, @_); |
|
53 |
} |
|
54 |
|
|
55 |
sub numtextrows { |
|
56 |
my $self = shift; |
|
57 |
|
|
58 |
return $main::form->numtextrows(@_); |
|
59 |
} |
|
60 |
|
|
61 |
sub _turn90_word { |
|
62 |
my $self = shift; |
|
63 |
my $word = shift || ""; |
|
37 | 64 |
|
65 |
return join '<br>', map { $main::form->quote_html($_) } split(m//, $word); |
|
66 |
} |
|
67 |
|
|
68 |
sub turn90 { |
|
69 |
my $self = shift; |
|
70 |
my $word = shift; |
|
71 |
my $args = shift; |
|
72 |
|
|
73 |
$args ||= { }; |
|
74 |
$word ||= ""; |
|
75 |
|
|
76 |
$args->{split_by} ||= 'chars'; |
|
77 |
$args->{class} = " class=\"$args->{class}\"" if ($args->{class}); |
|
78 |
|
|
79 |
if ($args->{split_by} eq 'words') { |
|
80 |
my @words = split m/\s+/, $word; |
|
81 |
|
|
82 |
if (1 >= scalar @words) { |
|
83 |
return $self->_turn90_word($words[0]); |
|
84 |
} |
|
85 |
|
|
86 |
return qq|<table><tr>| . join('', map { '<td valign="bottom"' . $args->{class} . '>' . $self->_turn90_word($_) . '</td>' } @words) . qq|</tr></table>|; |
|
87 |
|
|
88 |
} else { |
|
89 |
return $self->_turn90_word($word); |
|
90 |
} |
|
91 |
} |
|
92 |
|
|
93 |
1; |
Auch abrufbar als: Unified diff
Umstellung der Benutzerverwaltung von Dateien im Verzeichnis "users" auf die Verwendung einer Authentifizierungsdatenbank.
Es ist erforderlich, die Dateien doc/UPGRADE und doc/INSTALL/index.html zu lesen und die angesprochenen Punkte auszuführen, um nach einem Upgrade weiter arbeiten zu können.