function theme_drupagram_account_list_form in Drupagram 7
Same name and namespace in other branches
- 6 drupagram.pages.inc \theme_drupagram_account_list_form()
@todo Please document this function.
See also
File
- ./
drupagram.pages.inc, line 143 - Drupagram admin page callaback functions.
Code
function theme_drupagram_account_list_form($variables) {
$form = $variables['form'];
if (variable_get('drupagram_import', TRUE) && user_access('import own media')) {
$header = array(
'',
t('Name'),
t('Description'),
t('Import'),
t('Delete'),
);
}
else {
$header = array(
'',
t('Name'),
t('Description'),
t('Delete'),
);
}
$rows = array();
foreach (element_children($form['accounts']) as $key) {
$element =& $form['accounts'][$key];
if (variable_get('drupagram_import', TRUE) && user_access('import own media')) {
$row = array(
drupal_render($element['image']),
drupal_render($element['id']) . drupal_render($element['username']) . drupal_render($element['visible_name']),
drupal_render($element['description']),
drupal_render($element['import']),
drupal_render($element['delete']),
);
}
else {
$row = array(
drupal_render($element['image']),
drupal_render($element['id']) . drupal_render($element['username']) . drupal_render($element['visible_name']),
drupal_render($element['description']),
drupal_render($element['delete']),
);
}
$rows[] = $row;
}
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
));
$output .= drupal_render_children($form);
return $output;
}