function theme_diff_inline_metadata in Diff 7.3
Same name and namespace in other branches
- 6.2 diff.theme.inc \theme_diff_inline_metadata()
- 7.2 diff.theme.inc \theme_diff_inline_metadata()
Display inline diff metadata.
1 theme call to theme_diff_inline_metadata()
- diff_inline_show in ./
diff.pages.inc - Show the inline diff for a given node, vid.
File
- ./
diff.theme.inc, line 115 - Themeable function callbacks for diff.module.
Code
function theme_diff_inline_metadata($vars) {
if ($theme = variable_get('diff_theme', 'default')) {
drupal_add_css(drupal_get_path('module', 'diff') . "/css/diff.{$theme}.css");
}
$node = $vars['node'];
$output = "<div class='diff-inline-metadata clear-block'>";
$output .= "<div class='diff-inline-byline'>";
$output .= t('Updated by !name on @date', array(
'!name' => theme('username', array(
'account' => user_load($node->revision_uid),
)),
'@date' => format_date($node->revision_timestamp, 'small'),
));
$output .= "</div>";
$output .= "<div class='diff-inline-legend clear-block'>";
$output .= "<label>" . t('Legend') . "</label>";
$output .= theme('diff_inline_chunk', array(
'text' => t('Added'),
'type' => 'add',
));
$output .= theme('diff_inline_chunk', array(
'text' => t('Changed'),
'type' => 'change',
));
$output .= theme('diff_inline_chunk', array(
'text' => t('Deleted'),
'type' => 'delete',
));
$output .= "</div>";
$output .= "</div>";
return $output;
}