You are here

function theme_simple_access_page_overview in Simple Access 6.2

Same name and namespace in other branches
  1. 5.2 simple_access.module \theme_simple_access_page_overview()

File

./simple_access.theme.inc, line 60
Provide themes for simple access administration

Code

function theme_simple_access_page_overview($form) {
  drupal_add_tabledrag('sa-group-list', 'order', 'sibling', 'sa-group-weight');
  $header = array(
    t('Group'),
    t('Roles'),
    t('Weight'),
    t('Operations'),
  );
  foreach (element_children($form['groups']) as $gid) {
    $rows[] = array(
      'data' => array(
        drupal_render($form['groups'][$gid]['name']),
        array(
          'data' => drupal_render($form['groups'][$gid]['roles']),
          'class' => 'sa-group-roles',
        ),
        drupal_render($form['groups'][$gid]['weight']),
        drupal_render($form['groups'][$gid]['ops']),
      ),
      'class' => 'draggable',
    );
  }
  $output .= theme('table', $header, $rows, array(
    'id' => 'sa-group-list',
  ));
  $output .= drupal_render($form);
  return $output;
}