X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=SL%2FController%2FTopQuickSearch%2FBase.pm;fp=SL%2FController%2FTopQuickSearch%2FBase.pm;h=1c9e5d349b224bb8b568ed3fb2d1120300dc1525;hp=0000000000000000000000000000000000000000;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/SL/Controller/TopQuickSearch/Base.pm b/SL/Controller/TopQuickSearch/Base.pm new file mode 100644 index 000000000..1c9e5d349 --- /dev/null +++ b/SL/Controller/TopQuickSearch/Base.pm @@ -0,0 +1,87 @@ +package SL::Controller::TopQuickSearch::Base; + +use strict; +use parent qw(Rose::Object); + +sub auth { die 'must be overwritten' } + +sub name { die 'must be overwritten' } + +sub description_config { die 'must be overwritten' } + +sub description_field { die 'must be overwritten' } + +sub query_autocomplete { die 'must be overwritten' } + +sub select_autocomplete { die 'must be overwritten' } + +sub do_search { die 'must be overwritten' } + +1; + +__END__ + +=encoding utf-8 + +=head1 NAME + +SL::Controller::TopQuickSearch::Base - base interface class for quick search plugins + +=head1 DESCRIPTION + +see L + +=head1 INTERFACE + +An implementation must provide these functions. + +=over 4 + +=item C + +Must return a string used for access checks. Empty string or undef will mean +unrestricted access. + +=item C + +Internal name, must be plain ASCII. + +=item C + +Localized name used in the configuration. + +=item C + +Localized name used in the search field as hint. Should fit into an input of +length 20. + +=item C + +Needs to take C from C<$::form> and must return an arrayref of JSON +serializable matches fit for jquery autocomplete. + +=item C + +Needs to take C from C<$::form> and must return a redirect string to be +used with C pointing to a representation of +the selected object. + +=item C + +Needs to take C from C<$::form> and must return a redirect string to be +used with C pointing to a representation of +the search results. If the search will display only only one match, it should +instead return the same result as if that object was selected directly using +C. + +=back + +=head1 BUGS + +None yet :) + +=head1 AUTHOR + +Sven Schöling Es.schoeling@linet-services.deE + +=cut