From 0c23c415e83273c23ffe10e9004ebd2930eee69d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 12 Jan 2017 17:06:02 +0100 Subject: [PATCH] ActionBar: Verwendung bei Pflichtenheft(vorlagen)suche --- SL/Controller/RequirementSpec.pm | 21 ++++++++++++++++++- .../webpages/requirement_spec/_filter.html | 6 +----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/SL/Controller/RequirementSpec.pm b/SL/Controller/RequirementSpec.pm index 9fd3cf328..1bc49d6c7 100644 --- a/SL/Controller/RequirementSpec.pm +++ b/SL/Controller/RequirementSpec.pm @@ -53,8 +53,9 @@ my %sort_columns = ( sub action_list { my ($self) = @_; + $self->_setup_search_action_bar; $self->prepare_report; - $self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get); + $self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get, action_bar => 1); } sub action_new { @@ -703,4 +704,22 @@ sub _setup_form_action_bar { } } +sub _setup_search_action_bar { + my ($self, %params) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Search'), + submit => [ '#search_form', { action => 'RequirementSpec/list' } ], + accesskey => 'enter', + ], + link => [ + t8('Add'), + link => $self->url_for(action => 'new', is_template => $::form->{is_template}), + ], + ); + } +} + 1; diff --git a/templates/webpages/requirement_spec/_filter.html b/templates/webpages/requirement_spec/_filter.html index 201709ff9..0fd06bd78 100644 --- a/templates/webpages/requirement_spec/_filter.html +++ b/templates/webpages/requirement_spec/_filter.html @@ -7,7 +7,7 @@ -- 2.20.1