},
},
+ language => {
+ # Make locales.pl happy: $self->render("simple_system_setting/_language_form")
+ class => 'Language',
+ titles => {
+ list => t8('Languages'),
+ add => t8('Add language'),
+ edit => t8('Edit language'),
+ },
+ list_attributes => [
+ { method => 'description', title => t8('Description'), },
+ { method => 'template_code', title => t8('Template Code'), },
+ { method => 'article_code', title => t8('Article Code'), },
+ { title => t8('Number Format'), formatter => sub { $_[0]->output_numberformat || t8('use program settings') } },
+ { title => t8('Date Format'), formatter => sub { $_[0]->output_dateformat || t8('use program settings') } },
+ { title => t8('Long Dates'), formatter => sub { $_[0]->output_longdates ? t8('yes') : t8('no') } },
+ ],
+ },
+
part_classification => {
# Make locales.pl happy: $self->render("simple_system_setting/_part_classification_form")
class => 'PartClassification',
},
},
+ requirement_spec_acceptance_status => {
+ # Make locales.pl happy: $self->render("simple_system_setting/_requirement_spec_acceptance_status_form")
+ class => 'RequirementSpecAcceptanceStatus',
+ titles => {
+ list => t8('Acceptance Statuses'),
+ add => t8('Add acceptance status'),
+ edit => t8('Edit acceptance status'),
+ },
+ list_attributes => [
+ { method => 'name', title => t8('Name') },
+ { method => 'description', title => t8('Description') },
+ ],
+ },
+
+ requirement_spec_complexity => {
+ class => 'RequirementSpecComplexity',
+ titles => {
+ list => t8('Complexities'),
+ add => t8('Add complexity'),
+ edit => t8('Edit complexity'),
+ },
+ },
+
requirement_spec_predefined_text => {
# Make locales.pl happy: $self->render("simple_system_setting/_requirement_spec_predefined_text_form")
class => 'RequirementSpecPredefinedText',
],
},
+ requirement_spec_risk => {
+ class => 'RequirementSpecRisk',
+ titles => {
+ list => t8('Risk levels'),
+ add => t8('Add risk level'),
+ edit => t8('Edit risk level'),
+ },
+ },
+
+ 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 = (
# type-specific helper functions
#
+sub setup_requirement_spec_acceptance_status {
+ my ($self) = @_;
+
+ no warnings 'once';
+ $self->{valid_names} = \@SL::DB::RequirementSpecAcceptanceStatus::valid_names;
+}
+
+sub setup_requirement_spec_status {
+ my ($self) = @_;
+
+ no warnings 'once';
+ $self->{valid_names} = \@SL::DB::RequirementSpecStatus::valid_names;
+}
+
+sub setup_language {
+ my ($self) = @_;
+
+ $self->{numberformats} = [ '1,000.00', '1000.00', '1.000,00', '1000,00', "1'000.00" ];
+ $self->{dateformats} = [ qw(mm/dd/yy dd/mm/yy dd.mm.yy yyyy-mm-dd) ];
+}
+
1;
__END__