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 {
}
}
+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;
<div class="filter_toggle" style="display:none">
<a href="#" onClick="javascript:$('.filter_toggle').toggle()">[% LxERP.t8("Hide Filter") %]</a>
- <form method="post" action="controller.pl">
+ <form method="post" action="controller.pl" id="search_form">
[%- L.hidden_tag("is_template", is_template) %]
<p>
[%- END %]
</table>
</p>
-
- [% L.hidden_tag("action", "RequirementSpec/list") %]
-
- <p>[% L.submit_tag("dummy", LxERP.t8("Continue")) %]</p>
</form>
</div>