function theme_rotor_admin_list in Rotor Banner 5
Same name and namespace in other branches
- 5.7 rotor.module \theme_rotor_admin_list()
- 6 rotor.module \theme_rotor_admin_list()
Theme the admin list to include in the rotor administration page.
Parameters
array $list The list of rotor_item nodes to display in the list.:
1 theme call to theme_rotor_admin_list()
- rotor_admin_form in ./
rotor.module - Admin settings form page.
File
- ./
rotor.module, line 630 - A rotor banner consists in a set of images that will be changing. This module is made using jquery.
Code
function theme_rotor_admin_list($list = array()) {
$headers = array(
t('Tab'),
t('Content'),
t('Actions'),
);
$rows = array();
$count = 0;
foreach ($list as $node) {
if ($node->rotor_image) {
$output = $node->rotor_image->url ? l(theme('rotor_image', $node), $node->rotor_image->url, array(
'title' => $node->rotor_image->alt_text,
), NULL, NULL, FALSE, $html = TRUE) : theme('rotor_image', $node);
}
else {
$output = check_markup($node->body);
}
$rows[] = array(
l($node->title, 'node/' . $node->nid . '/edit'),
$output,
l(t('Edit'), 'node/' . $node->nid . '/edit') . ' | ' . l(t('Remove'), 'node/' . $node->nid . '/delete'),
);
}
$output = l(t('Add new item'), 'node/add/rotor-item');
$output .= theme('table', $headers, $rows, array(
'class' => 'rotor_admin_list',
));
return $output;
}