function theme_heartbeat_list in Heartbeat 7
Same name and namespace in other branches
- 6.4 heartbeat.module \theme_heartbeat_list()
- 6.3 heartbeat.module \theme_heartbeat_list()
Theme function for a list of heartbeat activity messages.
File
- ./
heartbeat.module, line 1321 - Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.
Code
function theme_heartbeat_list($variables) {
$heartbeatStream = $variables['stream'];
if (!$heartbeatStream || !$heartbeatStream
->hasAccess()) {
return '';
}
global $user, $language;
$content = '';
$content .= $heartbeatStream->prefix;
if (!isset($heartbeatStream->config) || empty($heartbeatStream->config->class)) {
$content .= drupal_render($variables['content']);
}
else {
$content .= '<div id="heartbeat-stream-' . $heartbeatStream->config->class . '" class="heartbeat-' . ($heartbeatStream
->isPage() ? 'page' : 'block') . ' heartbeat-stream heartbeat-stream-' . $heartbeatStream->config->class . '">';
$content .= '<div class="heartbeat-messages-wrapper">';
if (empty($heartbeatStream->messages)) {
$content .= '<p class="heartbeat-empty"><em>' . t('No activity yet.') . '</em></p>';
}
else {
$content .= drupal_render($variables['content']);
}
$content .= '</div></div>';
}
$content .= $heartbeatStream->suffix;
return $content;
}