From 4b211b2b087d445984df5220437400bced1dd1dd Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 11 Jan 2013 12:58:32 +0100 Subject: [PATCH] Ansprechpersonen: Feld "Funktion/Position" --- SL/CT.pm | 4 ++-- SL/DB/MetaSetup/Contact.pm | 1 + bin/mozilla/ct.pl | 3 ++- locale/de/all | 1 + sql/Pg-upgrade2/contacts_add_cp_function.sql | 5 +++++ templates/webpages/ct/_contact.html | 5 +++++ templates/webpages/ct/search_contact.html | 8 +++++++- 7 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 sql/Pg-upgrade2/contacts_add_cp_function.sql diff --git a/SL/CT.pm b/SL/CT.pm index 082afdf25..a19609525 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -551,7 +551,7 @@ sub _save_contact { my @columns = qw(cp_title cp_givenname cp_name cp_email cp_phone1 cp_phone2 cp_abteilung cp_fax cp_mobile1 cp_mobile2 cp_satphone cp_satfax cp_project cp_privatphone cp_privatemail cp_birthday cp_gender - cp_street cp_zipcode cp_city); + cp_street cp_zipcode cp_city cp_function); my @values = map( { if ( $_ eq 'cp_gender' ) { @@ -1123,7 +1123,7 @@ sub search_contacts { 'vcnumber' => 'vcnumber, cp_name, cp_givenname', ); - my %sortcols = map { $_ => 1 } qw(cp_name cp_givenname cp_phone1 cp_phone2 cp_mobile1 cp_email cp_street cp_zipcode cp_city vcname vcnumber); + my %sortcols = map { $_ => 1 } qw(cp_name cp_givenname cp_phone1 cp_phone2 cp_mobile1 cp_email cp_street cp_zipcode cp_city cp_function vcname vcnumber); my $order_by = $sortcols{$::form->{sort}} ? $::form->{sort} : 'cp_name'; $::form->{sort} = $order_by; diff --git a/SL/DB/MetaSetup/Contact.pm b/SL/DB/MetaSetup/Contact.pm index 322f82647..20dae29d5 100644 --- a/SL/DB/MetaSetup/Contact.pm +++ b/SL/DB/MetaSetup/Contact.pm @@ -34,6 +34,7 @@ __PACKAGE__->meta->setup( cp_zipcode => { type => 'text' }, cp_city => { type => 'text' }, cp_birthday => { type => 'date' }, + cp_function => { type => 'text' }, ], primary_key_columns => [ 'cp_id' ], diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index d7cebc4dc..7c1b2248f 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -303,7 +303,7 @@ sub list_contacts { my @columns = qw( cp_id vcname vcnumber cp_name cp_givenname cp_street cp_zipcode cp_city cp_phone1 cp_phone2 - cp_mobile1 cp_mobile2 cp_email cp_abteilung cp_birthday cp_gender + cp_mobile1 cp_mobile2 cp_email cp_abteilung cp_function cp_birthday cp_gender ); my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; @@ -336,6 +336,7 @@ sub list_contacts { 'cp_mobile2' => { 'text' => $::locale->text('Mobile2'), }, 'cp_email' => { 'text' => $::locale->text('E-mail'), }, 'cp_abteilung' => { 'text' => $::locale->text('Department'), }, + 'cp_function' => { 'text' => $::locale->text('Function/position'), }, 'cp_birthday' => { 'text' => $::locale->text('Birthday'), }, 'cp_gender' => { 'text' => $::locale->text('Gender'), }, %column_defs_cvars, diff --git a/locale/de/all b/locale/de/all index 2c824308a..627fbffe7 100644 --- a/locale/de/all +++ b/locale/de/all @@ -913,6 +913,7 @@ $self->{texts} = { 'Full Access' => 'Vollzugriff', 'Full Preview' => 'Alles', 'Full access to all functions' => 'Vollzugriff auf alle Funktionen', + 'Function/position' => 'Funktion/Position', 'Fwd' => 'Vorwärts', 'GL Transaction' => 'Dialogbuchung', 'GL transactions changeable' => 'Änderbarkeit von Dialogbuchungen', diff --git a/sql/Pg-upgrade2/contacts_add_cp_function.sql b/sql/Pg-upgrade2/contacts_add_cp_function.sql new file mode 100644 index 000000000..571d61e3d --- /dev/null +++ b/sql/Pg-upgrade2/contacts_add_cp_function.sql @@ -0,0 +1,5 @@ +-- @tag: contacts_add_cp_function +-- @description: Feld 'Funktion/Position' zu Kontakten +-- @depends: release_3_0_0 +-- @charset: utf-8 +ALTER TABLE contacts ADD COLUMN cp_function text; diff --git a/templates/webpages/ct/_contact.html b/templates/webpages/ct/_contact.html index 2b126c62d..f6c9b8a5a 100644 --- a/templates/webpages/ct/_contact.html +++ b/templates/webpages/ct/_contact.html @@ -35,6 +35,11 @@ + + [% 'Function/position' | $T8 %] + [% L.input_tag('cp_function', cp_function, size=40) %] + + [% 'Given Name' | $T8 %] diff --git a/templates/webpages/ct/search_contact.html b/templates/webpages/ct/search_contact.html index f7d291be5..af95c2d00 100644 --- a/templates/webpages/ct/search_contact.html +++ b/templates/webpages/ct/search_contact.html @@ -1,5 +1,7 @@ [%- USE HTML %] [%- USE T8 %] +[%- USE L %] +[%- USE LxERP %]
@@ -110,6 +112,11 @@ + + [% L.checkbox_tag('l.cp_function', value='Y', label=LxERP.t8('Function/position'), class='checkbox') %] + + + @@ -127,4 +134,3 @@
- -- 2.20.1