You are here

function theme_simple_access_page_overview in Simple Access 5.2

Same name and namespace in other branches
  1. 6.2 simple_access.theme.inc \theme_simple_access_page_overview()

File

./simple_access.module, line 552
This module allows administrators to make nodes viewable by specific 'access groups'. Each access group can contain any number of roles. If a node is not assigned to any access groups, it will remain viewable by all users.

Code

function theme_simple_access_page_overview($form) {
  $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;
}