function theme_tripal_pub_search_form

1.x pub_search.inc theme_tripal_pub_search_form($form)
1 theme call to theme_tripal_pub_search_form()

File

tripal_pub/includes/pub_search.inc, line 276

Code

function theme_tripal_pub_search_form($form) {
  $rows = array();
  foreach ($form['criteria'] as $i => $element) {
    if (is_numeric($i)) {
      $rows[] = array(
        drupal_render($element["operation-$i"]),
        drupal_render($element["scope-$i"]),
        //drupal_render($element["mode-$i"]) .
        drupal_render($element["search_terms-$i"]),
        drupal_render($element["add-$i"]) . drupal_render($element["remove-$i"]),
      );
    }
  }

  $rows[] = array(
    ' ',
    drupal_render($form['criteria']['date']),
    array(
      'data' =>
      "<div id=\"pub-search-form-dates-row\"> 
           <div id=\"pub-search-form-dates\"> " .
        drupal_render($form['criteria']['from_year']) .
        drupal_render($form['criteria']['to_year']) . "
          </div>
         </div>",
    ),
    ''
  );
  $table = theme('table', $headers, $rows, array('id' => 'tripal-pub-search-form-table', 'border' => '0'));
  $headers = array();
  $markup = drupal_render($form['instructions']) . "
     <div id=\"pub-search-form-row1\">$table</div>
     <div style=\"clear: both;\"></div>
  ";

  $form['criteria'] = array(
    '#type' => 'markup',
    '#value' => $markup,
    '#weight' => -10,
  );
  return drupal_render($form);
}