File: comment.tmpl

package info (click to toggle)
phpwiki 1.3.12p3-5etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 16,956 kB
  • ctags: 21,608
  • sloc: php: 82,335; xml: 3,840; sh: 1,522; sql: 1,198; perl: 625; makefile: 562; awk: 28
file content (42 lines) | stat: -rw-r--r-- 1,407 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!-- $Id: comment.tmpl,v 1.5 2004/06/14 11:26:52 rurban Exp $ -->
<?php
$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(Button('remove', false, $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("Comment modified on %s by %s",
				$mtime, $rev->get('author')));
}
?>

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