function theme_simple_access_profile_list in Simple Access 5.2
Same name and namespace in other branches
- 6.2 simple_access.theme.inc \theme_simple_access_profile_list()
- 7.2 simple_access.theme.inc \theme_simple_access_profile_list()
File
- ./
simple_access.module, line 606 - 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_profile_list($form) {
$head = array(
t('Name'),
t('Weight'),
t('Operations'),
);
$rows = array();
foreach (element_children($form['profiles']) as $id) {
$rows[] = array(
'data' => array(
array(
'data' => drupal_render($form['profiles'][$id]['name']),
),
array(
'data' => drupal_render($form['profiles'][$id]['weight']),
),
array(
'data' => drupal_render($form['profiles'][$id]['operations']),
),
),
'class' => 'draggable',
);
}
if (empty($rows)) {
$rows[] = array(
array(
'data' => t('No profiles defined'),
'colspan' => 3,
'align' => 'center',
),
);
}
$output .= theme('table', $head, $rows, array(
'id' => 'sa-profile-list',
));
$output .= drupal_render($form);
return $output;
}