Revision d139dd31
Von Moritz Bunkus vor fast 11 Jahren hinzugefügt
SL/DB/Manager/Employee.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::DB::Helper::Manager; |
6 |
use SL::DB::Helper::Sorted; |
|
6 | 7 |
use base qw(SL::DB::Helper::Manager); |
7 | 8 |
|
8 | 9 |
sub object_class { 'SL::DB::Employee' } |
9 | 10 |
|
10 | 11 |
__PACKAGE__->make_manager_methods; |
11 | 12 |
|
13 |
sub _sort_spec { |
|
14 |
( |
|
15 |
default => [ 'name', 1 ], |
|
16 |
columns => { |
|
17 |
SIMPLE => 'ALL', |
|
18 |
map { +($_ => "lower(employee.$_)") } qw(deleted_email deleted_fax deleted_signature deleted_tel login name) |
|
19 |
}, |
|
20 |
); |
|
21 |
} |
|
22 |
|
|
12 | 23 |
sub current { |
13 | 24 |
return undef unless $::form && $::form->{login}; |
14 | 25 |
return shift->find_by(login => $::form->{login}); |
Auch abrufbar als: Unified diff
Verkäufer-/Bearbeiter-Drop-Downs in mehreren Masken sortiert anzeigen