You are here

function theme_taxonomy_menu_term_set_table in Taxonomy menu 6.3

Theme function for the list of term sets

1 theme call to theme_taxonomy_menu_term_set_table()
taxonomy_menu_group_form in ./taxonomy_menu.admin.inc
Implementation of hook_form().

File

./taxonomy_menu.module, line 421
It Generates menu links for all selected taxonomy terms

Code

function theme_taxonomy_menu_term_set_table($form) {
  $rows = array();
  $output = '';
  $headers = array(
    t('Term Set Name'),
    t('Vocabulary Name'),
    t('Parent Term Set'),
  );
  if ($form['mgid']['#value'] && isset($form['list'])) {
    foreach (element_children($form['list']) as $key) {
      $row = array();
      $row[] = array(
        'data' => drupal_render($form['list'][$key]['name']),
      );
      $row[] = array(
        'data' => drupal_render($form['list'][$key]['vocab']),
      );
      $row[] = array(
        'data' => drupal_render($form['list'][$key]['parent']),
      );
      $row[] = array(
        'data' => drupal_render($form['list'][$key]['remove']),
      );

      //$row[] = array('data' => l(t('Remove'), 'admin/build/taxonomy_menu/group/'.

      //$form['mgid']['#value'] .'/remove/'. $key));
      $rows[] = $row;
    }
  }
  else {
    $rows[] = array(
      t('Please save the menu group before associating a term sets'),
    );
  }
  $output = theme('table', $headers, $rows);
  $output .= drupal_render($form['term_set_add']);
  return $output;
}