X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5e55cce6abaf16fb9425bcdc5a669eaaddca3319..5a0288d0a911692670707444f64e9ae74a8632b0:/SL/Controller/SimpleSystemSetting.pm diff --git a/SL/Controller/SimpleSystemSetting.pm b/SL/Controller/SimpleSystemSetting.pm index 979c2d298..e18a0a5d3 100644 --- a/SL/Controller/SimpleSystemSetting.pm +++ b/SL/Controller/SimpleSystemSetting.pm @@ -141,6 +141,52 @@ my %supported_types = ( }, }, + requirement_spec_predefined_text => { + # Make locales.pl happy: $self->render("simple_system_setting/_requirement_spec_predefined_text_form") + class => 'RequirementSpecPredefinedText', + titles => { + list => t8('Pre-defined Texts'), + add => t8('Add pre-defined text'), + edit => t8('Edit pre-defined text'), + }, + list_attributes => [ + { method => 'description', title => t8('Description') }, + { method => 'title', title => t8('Title') }, + { title => t8('Content'), formatter => sub { my $t = $_[0]->text_as_stripped_html; length($t) > 50 ? substr($t, 0, 50) . '…' : $t } }, + { title => t8('Useable for text blocks'), formatter => sub { $_[0]->useable_for_text_blocks ? t8('yes') : t8('no') } }, + { title => t8('Useable for sections'), formatter => sub { $_[0]->useable_for_sections ? t8('yes') : t8('no') } }, + ], + }, + + requirement_spec_status => { + # Make locales.pl happy: $self->render("simple_system_setting/_requirement_spec_status_form") + class => 'RequirementSpecStatus', + titles => { + list => t8('Requirement Spec Statuses'), + add => t8('Add requirement spec status'), + edit => t8('Edit requirement spec status'), + }, + list_attributes => [ + { method => 'name', title => t8('Name') }, + { method => 'description', title => t8('Description') }, + ], + }, + + requirement_spec_type => { + # Make locales.pl happy: $self->render("simple_system_setting/_requirement_spec_type_form") + class => 'RequirementSpecType', + titles => { + list => t8('Requirement Spec Types'), + add => t8('Add requirement spec type'), + edit => t8('Edit requirement spec type'), + }, + list_attributes => [ + { method => 'description', title => t8('Description') }, + { method => 'section_number_format', title => t8('Section number format') }, + { method => 'function_block_number_format', title => t8('Function block number format') }, + ], + }, + ); my @default_list_attributes = ( @@ -292,6 +338,13 @@ sub render_form { # type-specific helper functions # +sub setup_requirement_spec_status { + my ($self) = @_; + + no warnings 'once'; + $self->{valid_names} = \@SL::DB::RequirementSpecStatus::valid_names; +} + 1; __END__