You are here

function theme_location_map_link_options in Location 6.3

Same name and namespace in other branches
  1. 5.3 location.admin.inc \theme_location_map_link_options()
  2. 5 location.theme \theme_location_map_link_options()
  3. 7.5 location.admin.inc \theme_location_map_link_options()
  4. 7.3 location.admin.inc \theme_location_map_link_options()
  5. 7.4 location.admin.inc \theme_location_map_link_options()

File

./location.admin.inc, line 298
Admin forms for Location.

Code

function theme_location_map_link_options($form) {
  $header = array(
    array(
      'align' => 'center',
      'data' => '<center>' . t('Country') . '</center>',
    ),
    array(
      'align' => 'center',
      'data' => '<center>' . t('Options') . '</center>',
    ),
  );
  $rows = array();
  foreach (element_children($form['countries']) as $country_iso) {
    $row = array();
    $row[] = array(
      'data' => drupal_render($form['countries'][$country_iso]['label_' . $country_iso]),
    );
    $row[] = array(
      'data' => drupal_render($form['countries'][$country_iso]['location_map_link_' . $country_iso]),
    );
    $rows[] = $row;
  }
  $output = theme('table', $header, $rows);
  foreach (element_children($form) as $key) {
    $output .= drupal_render($form[$key]);
  }
  $output .= drupal_render($form);
  return $output;
}