function theme_botcha_recipebooks_form in BOTCHA Spam Prevention 6.2
Same name and namespace in other branches
- 6.3 botcha.module \theme_botcha_recipebooks_form()
- 7.2 botcha.admin.inc \theme_botcha_recipebooks_form()
- 7.3 botcha.module \theme_botcha_recipebooks_form()
Theme botcha_recipebooks_form().
File
- ./
botcha.admin.inc, line 378 - Implementation of botcha administration forms.
Code
function theme_botcha_recipebooks_form($form) {
// @todo Abstract it.
// "Add recipebook" link.
$output = l(t('Add recipe book'), Botcha::BOTCHA_ADMIN_PATH . '/recipebook/add');
// Prepare header before pass to theme.
$header = $form['#header'];
// Iterate through all recipebooks and build a table.
$rows = array();
foreach (element_children($form['recipebooks']) as $id) {
$row = array();
foreach (element_children($form['recipebooks'][$id]) as $col) {
$row[$col] = drupal_render($form['recipebooks'][$id][$col]);
}
$rows[$id] = $row;
}
$output .= theme('table', $header, $rows);
return $output;
}