Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 30d53fc8

Von Bernd Bleßmann vor mehr als 4 Jahren hinzugefügt

  • ID 30d53fc86a48efdd6f613c571afad322d5f11b39
  • Vorgänger 371ab59d
  • Nachfolger cc6d7fec

Abteilungen bei Ansprechpersonen: SimpleSettings-Controller zum Editieren

Unterschiede anzeigen:

SL/Controller/SimpleSystemSetting.pm
56 56
    ],
57 57
  },
58 58

  
59
  contact_department => {
60
    class  => 'ContactDepartment',
61
    auth   => 'config',
62
    titles => {
63
      list => t8('Contact Departments'),
64
      add  => t8('Add department'),
65
      edit => t8('Edit department'),
66
    },
67
  },
68

  
59 69
  contact_title => {
60 70
    class  => 'ContactTitle',
61 71
    auth   => 'config',
SL/DB/ContactDepartment.pm
5 5

  
6 6
use strict;
7 7

  
8
use SL::Util qw(trim);
9

  
8 10
use SL::DB::MetaSetup::ContactDepartment;
9 11
use SL::DB::Manager::ContactDepartment;
10 12

  
11 13
__PACKAGE__->meta->initialize;
12 14

  
15
__PACKAGE__->before_save('_before_save_trim_content');
16

  
17
sub _before_save_trim_content {
18
  $_[0]->description(trim($_[0]->description));
19
  return 1;
20
}
21

  
13 22
1;
SL/DB/Manager/ContactDepartment.pm
7 7

  
8 8
use parent qw(SL::DB::Helper::Manager);
9 9

  
10
use SL::DB::Helper::Sorted;
11

  
10 12
sub object_class { 'SL::DB::ContactDepartment' }
11 13

  
12 14
__PACKAGE__->make_manager_methods;
13 15

  
16
sub _sort_spec {
17
  return ( default => [ 'description', 1 ],
18
           columns => { SIMPLE => 'ALL',
19
                        map { ( $_ => "lower(contact_departments.$_)" ) } qw(description)
20
                      });
21
}
22

  
14 23
1;
locale/de/all
667 667
  'Confirm!'                    => 'Bestätigen Sie!',
668 668
  'Confirmation'                => 'Auftragsbestätigung',
669 669
  'Contact'                     => 'Kontakt',
670
  'Contact Departments'         => 'Abteilungen von Ansprechpersonen',
670 671
  'Contact Person'              => 'Ansprechperson',
671 672
  'Contact Person (database ID)' => 'Ansprechperson (Datenbank-ID)',
672 673
  'Contact Person (name)'       => 'Ansprechperson (Name)',
locale/en/all
667 667
  'Confirm!'                    => '',
668 668
  'Confirmation'                => '',
669 669
  'Contact'                     => '',
670
  'Contact Departments'         => '',
670 671
  'Contact Person'              => '',
671 672
  'Contact Person (database ID)' => '',
672 673
  'Contact Person (name)'       => '',
menus/user/00-erp.yaml
1189 1189
  params:
1190 1190
    action: SimpleSystemSetting/list
1191 1191
    type: contact_title
1192
- parent: system
1193
  id: system_contact_departments
1194
  name: Contact Departments
1195
  order: 1430
1196
  params:
1197
    action: SimpleSystemSetting/list
1198
    type: contact_department
1192 1199
- parent: system
1193 1200
  id: system_project_types
1194 1201
  name: Project Types

Auch abrufbar als: Unified diff