From: Bernd Bleßmann Date: Tue, 17 Nov 2020 13:20:08 +0000 (+0100) Subject: Zeiterfassung: SimpleSystemSettings für Typen X-Git-Tag: kivitendo-mebil_0.1-0~9^2~341 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=11da80946e1d6365543722b4ba29e44886601d86;p=kivitendo-erp.git Zeiterfassung: SimpleSystemSettings für Typen --- diff --git a/SL/Controller/SimpleSystemSetting.pm b/SL/Controller/SimpleSystemSetting.pm index f8dd4bc49..640414d47 100644 --- a/SL/Controller/SimpleSystemSetting.pm +++ b/SL/Controller/SimpleSystemSetting.pm @@ -268,6 +268,21 @@ my %supported_types = ( ], }, + time_recording_type => { + # Make locales.pl happy: $self->render("simple_system_setting/_time_recording_type_form") + class => 'TimeRecordingType', + auth => 'config', + titles => { + list => t8('Time Recording Types'), + add => t8('Add time recording type'), + edit => t8('Edit time recording type'), + }, + list_attributes => [ + { method => 'abbreviation', title => t8('Abbreviation') }, + { method => 'description', title => t8('Description') }, + { method => 'obsolete', title => t8('Obsolete'), formatter => sub { $_[0]->obsolete ? t8('yes') : t8('no') } }, + ], + }, ); my @default_list_attributes = ( diff --git a/menus/user/10-time-recording.yaml b/menus/user/10-time-recording.yaml new file mode 100644 index 000000000..204d8a9a0 --- /dev/null +++ b/menus/user/10-time-recording.yaml @@ -0,0 +1,8 @@ +--- +- parent: system + id: system_time_recording_types + name: Time Recording Types + order: 2370 + params: + action: SimpleSystemSetting/list + type: time_recording_type diff --git a/templates/webpages/simple_system_setting/_time_recording_type_form.html b/templates/webpages/simple_system_setting/_time_recording_type_form.html new file mode 100644 index 000000000..aa136f363 --- /dev/null +++ b/templates/webpages/simple_system_setting/_time_recording_type_form.html @@ -0,0 +1,19 @@ +[%- USE LxERP -%][%- USE L -%] + + + + + + + + + + + + + +
[% LxERP.t8("Abbreviation") %] + [%- L.input_tag("object.abbreviation", SELF.object.abbreviation, "data-validate"="required", "data-title"=LxERP.t8("Abbreviation")) %] +
[% LxERP.t8("Description") %] + [%- L.input_tag("object.description", SELF.object.description, "data-title"=LxERP.t8("Description")) %] +
[% LxERP.t8("Obsolete") %][% L.checkbox_tag("object.obsolete", checked=SELF.object.obsolete, for_submit=1) %]