From: Moritz Bunkus Date: Thu, 12 Jan 2017 16:06:02 +0000 (+0100) Subject: ActionBar: Verwendung bei Pflichtenheft(vorlagen)suche X-Git-Tag: release-3.5.4~1328 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0c23c415e83273c23ffe10e9004ebd2930eee69d;p=kivitendo-erp.git ActionBar: Verwendung bei Pflichtenheft(vorlagen)suche --- 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 @@