Returns HTML for a list of recent content.
$variables: An associative array containing:
function theme_node_recent_block($variables) {
$rows = array();
$output = '';
$l_options = array(
'query' => drupal_get_destination(),
);
foreach ($variables['nodes'] as $node) {
$row = array();
$node_recent_content = array(
'#theme' => 'node_recent_content',
'#node' => $node,
);
$row[] = array(
'data' => drupal_render($node_recent_content),
'class' => 'title-author',
);
if (node_access('update', $node)) {
$row[] = array(
'data' => l(t('edit'), 'node/' . $node->nid . '/edit', $l_options),
'class' => 'edit',
);
}
if (node_access('delete', $node)) {
$row[] = array(
'data' => l(t('delete'), 'node/' . $node->nid . '/delete', $l_options),
'class' => 'delete',
);
}
$rows[] = $row;
}
if ($rows) {
$table = array(
'#theme' => 'table',
'#rows' => $rows,
);
$output = drupal_render($table);
if (user_access('access content overview')) {
$more_link = array(
'#theme' => 'more_link',
'#url' => 'admin/content',
'#title' => t('Show more content'),
);
$output .= drupal_render($more_link);
}
}
return $output;
}