added admin settings for advanced search
This commit is contained in:
parent
8f32d4e98b
commit
e9a136db4c
@ -7,11 +7,11 @@ function materio_search_api_settings(){
|
|||||||
foreach ($indexes as $machine_name => $index) {
|
foreach ($indexes as $machine_name => $index) {
|
||||||
if($index->status == 1)
|
if($index->status == 1)
|
||||||
$index_options[$index->machine_name] = $index->name;
|
$index_options[$index->machine_name] = $index->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$languages = locale_language_list();
|
$languages = locale_language_list();
|
||||||
// dsm($languages, 'languages');
|
// dsm($languages, 'languages');
|
||||||
|
|
||||||
foreach ($languages as $lcode => $name) {
|
foreach ($languages as $lcode => $name) {
|
||||||
$form['mainsearchindex_'.$lcode] = array(
|
$form['mainsearchindex_'.$lcode] = array(
|
||||||
'#type'=>'select',
|
'#type'=>'select',
|
||||||
@ -36,7 +36,7 @@ function materio_search_api_settings(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: select the activated viewmodes for change view mode and selected view mode
|
// TODO: select the activated viewmodes for change view mode and selected view mode
|
||||||
$entity_infos = entity_get_info();
|
$entity_infos = entity_get_info();
|
||||||
// dsm($entity_infos, 'entity_infos');
|
// dsm($entity_infos, 'entity_infos');
|
||||||
foreach ($entity_infos['node']['view modes'] as $viewmode => $value) {
|
foreach ($entity_infos['node']['view modes'] as $viewmode => $value) {
|
||||||
@ -68,6 +68,19 @@ function materio_search_api_settings(){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$vocabularies = taxonomy_get_vocabularies();
|
||||||
|
// dsm($vocabularies, 'vocabularies');
|
||||||
|
foreach ($vocabularies as $vid => $voc){
|
||||||
|
$vocs_options[$vid] = $voc->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
$form['advancedsearchvocs'] = array(
|
||||||
|
'#type'=>'select',
|
||||||
|
'#options'=>$vocs_options,
|
||||||
|
'#default_value' => variable_get('advancedsearchvocs', array()),
|
||||||
|
'#title' => t('Advanced Search Vocabularies'),
|
||||||
|
'#multiple' => true,
|
||||||
|
);
|
||||||
|
|
||||||
return system_settings_form($form);
|
return system_settings_form($form);
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user