+ ->render;
+}
+
+sub init_models {
+ my ($self) = @_;
+
+ SL::Controller::Helper::GetModels->new(
+ controller => $self,
+ sorted => {
+ _default => {
+ by => 'customer',
+ dir => 1,
+ },
+ %sort_columns,
+ },
+ query => [
+ and => [
+ working_copy_id => undef,
+ is_template => $::form->{is_template} ? 1 : 0,
+ ],
+ ],
+ with_objects => [ 'customer', 'type', 'status', 'project' ],
+ );
+}
+
+sub init_html_template {
+ my ($self) = @_;
+ my $base_name = $self->requirement_spec->type->template_file_name || 'requirement_spec';
+ my $template = SL::Helper::CreatePDF->find_template(name => $base_name, extension => 'html');
+ return !!$template;
+}
+
+sub _setup_form_action_bar {
+ my ($self) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Save'),
+ submit => [ '#basic_settings_form', { action => 'RequirementSpec/' . ($self->requirement_spec->id ? 'update' : 'create') } ],
+ accesskey => 'enter',
+ ],
+
+ link => [
+ t8('Abort'),
+ link => $self->url_for(action => 'list', is_template => $self->requirement_spec->is_template),
+ ],
+ );
+ }
+}
+
+sub _setup_search_action_bar {
+ my ($self, %params) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Update'),
+ submit => [ '#search_form', { action => 'RequirementSpec/list' } ],
+ accesskey => 'enter',
+ ],
+ link => [
+ t8('Add'),
+ link => $self->url_for(action => 'new', is_template => $::form->{is_template}),
+ ],
+ );
+ }