You are here

function theme_diff_inline_metadata in Diff 7.2

Same name and namespace in other branches
  1. 6.2 diff.theme.inc \theme_diff_inline_metadata()
  2. 7.3 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. If vid = 0 or no previous vid exists for the given revision returns the normally rendered content of the specified revision.

File

./diff.theme.inc, line 292
Themeable function callbacks for diff.module.

Code

function theme_diff_inline_metadata($vars) {
  drupal_add_css(drupal_get_path('module', 'diff') . '/diff.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;
}