function theme_simple_access_page_overview_list in Simple Access 7.2
Theme simple access overview page as a draggable table.
1 theme call to theme_simple_access_page_overview_list()
- simple_access_page_overview in ./
simple_access.admin.inc - Simple Access Overview form.
File
- ./
simple_access.theme.inc, line 65 - Provide themes for simple access administration.
Code
function theme_simple_access_page_overview_list(&$form) {
drupal_add_tabledrag('sa-group-list', 'order', 'sibling', 'sa-group-weight');
$output = '';
$options = array(
'header' => array(
t('Group'),
t('Roles'),
t('Weight'),
t('Operations'),
),
'rows' => array(),
'attributes' => array(
'id' => 'sa-group-list',
),
);
foreach (element_children($form['form'], TRUE) as $gid) {
$options['rows'][] = array(
'data' => array(
drupal_render($form['form'][$gid]['name']),
array(
'data' => drupal_render($form['form'][$gid]['roles']),
'class' => 'sa-group-roles',
),
drupal_render($form['form'][$gid]['weight']),
drupal_render($form['form'][$gid]['ops']),
),
'class' => array(
'draggable',
),
);
}
if (empty($options['rows'])) {
$options['rows'][] = array(
array(
'data' => t('No profiles defined'),
'colspan' => 4,
'align' => 'center',
),
);
}
$output .= theme('table', $options);
return $output;
}