advenced search block is in place, remains to build the whole logic
This commit is contained in:
parent
1d4fcf0d89
commit
38648c1670
@ -443,6 +443,7 @@ function materio_search_api_term_property_dup_name($term){
|
|||||||
|
|
||||||
return $term->name_field[$lang][0]['value'];
|
return $term->name_field[$lang][0]['value'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// function materio_search_api_term_property_name_translated($term){
|
// function materio_search_api_term_property_name_translated($term){
|
||||||
// if($term->vid == 4){
|
// if($term->vid == 4){
|
||||||
// print_r(get_defined_vars());
|
// print_r(get_defined_vars());
|
||||||
@ -458,10 +459,12 @@ function materio_search_api_term_property_dup_name($term){
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/**
|
|
||||||
* - - -- - - - - - - blocks - - - - - - - - - - -
|
// ____ __ __
|
||||||
*
|
// / __ )/ /___ _____/ /_______
|
||||||
*/
|
// / __ / / __ \/ ___/ //_/ ___/
|
||||||
|
// / /_/ / / /_/ / /__/ ,< (__ )
|
||||||
|
// /_____/_/\____/\___/_/|_/____/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements hook_block_info().
|
* Implements hook_block_info().
|
||||||
@ -472,7 +475,7 @@ function materio_search_api_block_info() {
|
|||||||
'cache' => DRUPAL_NO_CACHE
|
'cache' => DRUPAL_NO_CACHE
|
||||||
);
|
);
|
||||||
|
|
||||||
$blocks['materio_search_api_advanced_search'] = array(
|
$blocks['mo_searchapi_advanced_search'] = array(
|
||||||
'info' => t('Materio search api advanced search'),
|
'info' => t('Materio search api advanced search'),
|
||||||
'cache' => DRUPAL_NO_CACHE
|
'cache' => DRUPAL_NO_CACHE
|
||||||
);
|
);
|
||||||
@ -506,7 +509,7 @@ function materio_search_api_block_view($delta = '') {
|
|||||||
$block['content'] = theme('materio_search_api_search_block', array());
|
$block['content'] = theme('materio_search_api_search_block', array());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'materio_search_api_advanced_search':
|
case 'mo_searchapi_advanced_search':
|
||||||
if (user_access('use materio advanced search')) {
|
if (user_access('use materio advanced search')) {
|
||||||
$block['subject'] = t('Advanced Search');
|
$block['subject'] = t('Advanced Search');
|
||||||
$block['content'] = theme('materio_search_api_advanced_search_block', array());
|
$block['content'] = theme('materio_search_api_advanced_search_block', array());
|
||||||
@ -726,7 +729,7 @@ function materio_search_api_search_form_submit($form, &$form_state){
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* materiobase_search_form()
|
* materio_search_api_advanced_search_form()
|
||||||
*/
|
*/
|
||||||
function materio_search_api_advanced_search_form($form, &$form_state){
|
function materio_search_api_advanced_search_form($form, &$form_state){
|
||||||
// dsm($form_state, 'form_state');
|
// dsm($form_state, 'form_state');
|
||||||
@ -747,10 +750,19 @@ function materio_search_api_advanced_search_form($form, &$form_state){
|
|||||||
$form['actu'] = array(
|
$form['actu'] = array(
|
||||||
'#type' => 'markup',
|
'#type' => 'markup',
|
||||||
'#markup' => $link,
|
'#markup' => $link,
|
||||||
//'<a href="'.base_path().'actuality" class="back-search-home"><i class="fi-home"></i></a>'
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$form['searchfield'] = array(
|
||||||
|
'#type' => 'textfield',
|
||||||
|
'#default_value' => $path == 'explore' ? $keys : $default_value, // TODO: set the search page path global or a variable in settings
|
||||||
|
// '#autocomplete_path' => 'materiosearchapi/autocomplete/searchapi',
|
||||||
|
//'#autocomplete_path' => 'materiosearchapi/autocomplete/dbselect',
|
||||||
|
'#size' => 30,
|
||||||
|
'#maxlength' => 1024,
|
||||||
|
'#attributes' => array("default"=>$default_value),
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
$form['create'] = array(
|
$form['create'] = array(
|
||||||
'#type' => 'image_button',
|
'#type' => 'image_button',
|
||||||
@ -872,6 +884,7 @@ function template_preprocess_materio_search_api_advanced_search_block(&$vars){
|
|||||||
$vars['searchform'] = drupal_get_form("materio_search_api_advanced_search_form");
|
$vars['searchform'] = drupal_get_form("materio_search_api_advanced_search_form");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function template_preprocess_materio_search_api_select_viewmode_block(&$vars){
|
function template_preprocess_materio_search_api_select_viewmode_block(&$vars){
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
@ -1041,11 +1054,11 @@ function template_preprocess_materio_search_api_actuality(&$vars){
|
|||||||
// $vars['actualities_infos'] = t('Actualities by materiO\'');
|
// $vars['actualities_infos'] = t('Actualities by materiO\'');
|
||||||
$vars['actualities_infos'] = t('');
|
$vars['actualities_infos'] = t('');
|
||||||
}
|
}
|
||||||
|
//
|
||||||
function template_preprocess_materio_search_api_advanced_search_block(&$vars){
|
// function template_preprocess_materio_search_api_advanced_search_block(&$vars){
|
||||||
// dsm($vars, "vars");
|
// // dsm($vars, "vars");
|
||||||
$vars['searchform'] = drupal_get_form("materio_search_api_advanced_search_form");
|
// $vars['searchform'] = drupal_get_form("materio_search_api_advanced_search_form");
|
||||||
}
|
// }
|
||||||
|
|
||||||
function theme_materio_search_api_form_element($variables) {
|
function theme_materio_search_api_form_element($variables) {
|
||||||
// dsm($variables, 'variables');
|
// dsm($variables, 'variables');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user