function theme_activity_table in Activity 6
Same name and namespace in other branches
- 5.4 activity.module \theme_activity_table()
Theme function for displaying a table of activities.
3 theme calls to theme_activity_table()
- activity_page in ./
activity.module - Menu callback for displaying site or user activity as full page.
- ogactivity_page in contrib/
ogactivity/ ogactivity.module - Menu callback for displaying site or user activity as full page.
- user_relationshipsactivity_page in contrib/
user_relationshipsactivity/ user_relationshipsactivity.module - user_relationships activity page callback
File
- ./
activity.module, line 1273 - activity.module
Code
function theme_activity_table($activities) {
$display_headers = array(
'created' => array(
'field' => 'created',
'data' => t('Date'),
),
t('Message'),
);
$rows = array();
foreach ($activities as $activity) {
if ($activity_message = activity_token_replace($activity)) {
$activity['delete-link'] = activity_delete_link($activity);
$row = array(
array(
'data' => theme('activity_timestamp', $activity['created']),
'class' => 'activity-table-timestamp',
),
array(
'data' => theme('activity', $activity_message, $activity),
'class' => 'activity-table-message',
),
);
$rows[] = $row;
}
}
$output = theme('table', $display_headers, $rows, array(
'class' => 'activity-table',
));
$output .= theme('pager');
return $output;
}