function theme_domain_nodes_form in Domain Access 7.3
FormsAPI theming.
File
- ./
domain.admin.inc, line 1045 - Administration functions for the domain module.
Code
function theme_domain_nodes_form($variables) {
$form = $variables['form'];
$output = '<p>' . t('You may set default domain publishing options to the content types when new content will be created. When you publish to <em>All domains</em>, you can additionally define domain memberships.') . '</p>';
$num_columns = 15;
$node_types = node_type_get_names();
$num_node_types = count($node_types);
for ($i = 0; $i < $num_node_types; $i += $num_columns) {
$header = array(
t('Domains'),
);
$rows = array();
$count = 0;
$used_node_types = array();
foreach ($node_types as $type => $name) {
if ($count == $num_columns) {
break;
}
$header[] = $name;
$used_node_types[$type] = $name;
array_shift($node_types);
$count++;
}
foreach ($form['#domain_node'] as $key => $sitename) {
$row = array();
$row[] = filter_xss_admin($sitename);
foreach ($used_node_types as $type => $name) {
$form['domain_node']['domain_node_' . $type][$key]['#title'] = '';
$row[] = drupal_render($form['domain_node']['domain_node_' . $type][$key]);
}
$rows[] = $row;
}
$output .= theme('table', array(
'header' => $header,
'rows' => $rows,
));
}
$output .= drupal_render_children($form);
return $output;
}