Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4e070acf

Von Sven Schöling vor fast 9 Jahren hinzugefügt

  • ID 4e070acf473ae9992a3561594cce55123be0a7ec
  • Vorgänger c8c1042a
  • Nachfolger 92879200

TopQuickSearch: Konfiguration in client_config

Unterschiede anzeigen:

SL/Controller/TopQuickSearch.pm
57 57
  map { $_->new } @available_modules;
58 58
}
59 59

  
60
sub enabled_modules {
61
  my %enabled_names = map {
62
    $_ => 1
63
  } @{ $::instance_conf->get_quick_search_modules };
64

  
65
  grep {
66
    $enabled_names{$_->name}
67
  } $_[0]->available_modules
68
}
69

  
60 70
sub active_modules {
61 71
  grep {
62 72
    $::auth->assert($_->auth, 1)
63
  } $_[0]->available_modules
73
  } $_[0]->enabled_modules
64 74
}
65 75

  
66 76
sub init_module {
......
118 128
This controller provides abstraction for different search plugins, and ensures
119 129
that all follow a common useability scheme.
120 130

  
121
Modules should be configurable, but currently are not. Diabling modules can be
122
done by removing them from available_modules.
131
Modules should be configurable per user, but currently are not. Disabling
132
modules can be done by removing them from available_modules or in client_config.
123 133

  
124 134
=head1 BEHAVIOUR REQUIREMENTS
125 135

  
......
161 171

  
162 172
=head1 INTERFACE
163 173

  
164
Plugins need to provide:
165

  
166
 - name
167
 - localized description for config
168
 - localized description for textfield
169
 - autocomplete callback
170
 - redirect callback
171

  
172
the frontend will only generate urls of the forms:
173
  action=TopQuickSearch/autocomplete&module=<module>&term=<term>
174
  action=TopQuickSearch/search&module=<module>&term=<term>
174
The full interface is described in L<SL::Controller::TopQuickSeach::Base>
175 175

  
176 176
=head1 TODO
177 177

  
178
 - filter available searches with auth
179 178
 - toggling with cofiguration doesn't work yet
180 179

  
181 180
=head1 BUGS

Auch abrufbar als: Unified diff