<?php // -*- php -*-
// $Id: comment.tmpl 7956 2011-03-03 17:08:31Z vargenau $
$CDATE = $WikiTheme->formatDateTime($COMMENT_CTIME);
$buttons = $modified = '';

if ($user->isAdmin() or $user->getId() == $COMMENT_CREATOR) {
    $buttons = HTML::small(array('class' => 'floatleft'),
                           Button('edit', false, $page));
    if ($user->isAdmin())
	$buttons->pushContent($SEP, Button('remove', _("Remove Comment"), $page));
}

// This is a hack, but since we only have a fake PageRevision,
// we can't get the version.
if ($rev->get('mtime') != $COMMENT_CTIME) {
    $mtime = $WikiTheme->formatDateTime($rev->get('mtime'));
    $modified = HTML::small(array('class' => 'floatright'),
			    fmt("Modified on %s by %s",
				$mtime, $rev->get('author')));
}
?>

<!-- FIXME: move table formatting to css -->
<div title="<?php echo fmt("Comments on %s by %s.", $COMMENT_PARENT, $COMMENT_CREATOR)?>"
     class="wikicomment wikitext">
  <div class="wikicomment-footer">
    <span class="floatright">
      <?php echo fmt("%s by %s", WikiLink($page, 'known', $CDATE), WikiLink($COMMENT_CREATOR, 'if_known')) ?></span>
    <br class="clear-floats" />
  </div>
  <?php if ($buttons or $modified) { ?>
    <div class="floatright">
      <?php echo $buttons ?>
      <?php echo $modified ?>
      <br class="clear-floats" />
    </div>
  <?php } ?>
  <div class="wikicomment-body">
    <?php echo $CONTENT ?>
  </div>
</div>
<hr class="no-css" />
