theme_filter_admin_overview

Definition

theme_filter_admin_overview($form)
drupal/modules/filter/filter.admin.inc, line 63

Description

Theme the admin overview form.

Related topics

Namesort iconDescription
Default theme implementationsFunctions and templates that present output to the user, and can be implemented by themes.

Code

function theme_filter_admin_overview($form) {
  $rows = array();
  foreach ($form as $id => $element) {
    if (isset($element['roles']) && is_array($element['roles'])) {
      $element['weight']['#attributes']['class'] = 'input-format-order-weight';
      $rows[] = array(
        'data' => array(
          check_plain($element['name']['#markup']),
          drupal_render($element['roles']),
          drupal_render($form['default'][$id]),
          drupal_render($element['weight']),
          drupal_render($element['configure']),
          drupal_render($element['delete']),
        ),
        'class' => 'draggable',
      );
      unset($form[$id]);
    }
  }
  $header = array(t('Name'), t('Roles'), t('Default'), t('Weight'), array('data' => t('Operations'), 'colspan' => 2));
  $output = theme('table', $header, $rows, array('id' => 'input-format-order'));
  $output .= drupal_render($form);

  drupal_add_tabledrag('input-format-order', 'order', 'sibling', 'input-format-order-weight');

  return $output;
}