projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GDPDU: customer, vendor und chart auf einige wenige Spalten beschränken
[kivitendo-erp.git]
/
SL
/
Controller
/
TopQuickSearch
/
Article.pm
diff --git
a/SL/Controller/TopQuickSearch/Article.pm
b/SL/Controller/TopQuickSearch/Article.pm
index
9bedb43
..
89f9d8d
100644
(file)
--- a/
SL/Controller/TopQuickSearch/Article.pm
+++ b/
SL/Controller/TopQuickSearch/Article.pm
@@
-35,7
+35,8
@@
sub query_autocomplete {
}
sub select_autocomplete {
}
sub select_autocomplete {
- redirect_to_part($::form->{id});
+ my ($self) = @_;
+ $self->redirect_to_part($::form->{id});
}
sub do_search {
}
sub do_search {
@@
-44,23
+45,28
@@
sub do_search {
my $objects = $self->models->get;
return !@$objects ? ()
my $objects = $self->models->get;
return !@$objects ? ()
- : @$objects == 1 ? redirect_to_part($objects->[0]->id)
- : redirect_to_search($::form->{term});
+ : @$objects == 1 ?
$self->
redirect_to_part($objects->[0]->id)
+ :
$self->
redirect_to_search($::form->{term});
}
sub redirect_to_search {
}
sub redirect_to_search {
+ my ($self, $term) = @_;
+
SL::Controller::Base->new->url_for(
SL::Controller::Base->new->url_for(
- controller => 'ic.pl',
- action => 'generate_report',
- all => $_[0],
+ controller => 'ic.pl',
+ action => 'generate_report',
+ all => $term,
+ (searchitems => $self->type) x!!$self->type,
);
}
sub redirect_to_part {
);
}
sub redirect_to_part {
+ my ($self, $term) = @_;
+
SL::Controller::Base->new->url_for(
controller => 'ic.pl',
action => 'edit',
SL::Controller::Base->new->url_for(
controller => 'ic.pl',
action => 'edit',
- id => $
_[0]
,
+ id => $
term
,
);
}
);
}
@@
-76,7
+82,7
@@
sub init_models {
model => 'Part',
source => {
filter => {
model => 'Part',
source => {
filter => {
- (
$self->type)
,
+ (
type => $self->type) x!!$self->type
,
'all:substr:multi::ilike' => $::form->{term},
},
},
'all:substr:multi::ilike' => $::form->{term},
},
},