From: Moritz Bunkus Date: Thu, 12 May 2011 09:32:26 +0000 (+0200) Subject: Standard-Sortierung für Language-Model X-Git-Tag: release-2.6.3~25^2~46 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5c5cbb9f90449da8064d749183586a78b4216742;p=kivitendo-erp.git Standard-Sortierung für Language-Model Conflicts: SL/Controller/DeliveryPeriod.pm SL/Controller/DeliveryTerm.pm --- diff --git a/SL/DB/Language.pm b/SL/DB/Language.pm index abfdebce0..3248f386c 100644 --- a/SL/DB/Language.pm +++ b/SL/DB/Language.pm @@ -1,13 +1,8 @@ -# This file has been auto-generated only because it didn't exist. -# Feel free to modify it at will; it will not be overwritten automatically. - package SL::DB::Language; use strict; use SL::DB::MetaSetup::Language; - -# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -__PACKAGE__->meta->make_manager_class; +use SL::DB::Manager::Language; 1; diff --git a/SL/DB/Manager/Language.pm b/SL/DB/Manager/Language.pm new file mode 100644 index 000000000..db0d29a72 --- /dev/null +++ b/SL/DB/Manager/Language.pm @@ -0,0 +1,21 @@ +package SL::DB::Manager::Language; + +use strict; + +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); + +use SL::DB::Helper::Sorted; + +sub object_class { 'SL::DB::Language' } + +__PACKAGE__->make_manager_methods; + +sub _sort_spec { + return ( default => [ 'description', 1 ], + columns => { SIMPLE => 'ALL', + map { ( $_ => "lower(language.${_})" ) } qw(description template_code article_code), + }); +} + +1;