]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/comment.tmpl
userpref: fixed default
[SourceForge/phpwiki.git] / themes / default / templates / comment.tmpl
1 <!-- $Id: comment.tmpl,v 1.2 2004-03-14 16:40:45 rurban Exp $ -->
2 <?php
3 $CDATE = $Theme->formatDateTime($COMMENT_CTIME);
4 $buttons = $modified = '';
5
6 if ($user->isAdmin() or $user->getId() == $COMMENT_CREATOR) {
7     $buttons = HTML::small(array('class' => 'floatleft'),
8                            Button('edit', false, $page));
9     if ($user->isAdmin())
10       $buttons->pushContent(Button('remove', false, $page));
11 }
12
13 // This is a hack, but since we only have a fake PageRevision,
14 // we can't get the version.
15 if ($rev->get('mtime') != $COMMENT_CTIME) {
16     $mtime = $Theme->formatDateTime($rev->get('mtime'));
17     $modified = HTML::small(array('class' => 'floatright'),
18                             fmt("Comment modified on %s by %s",
19                                 $mtime, $rev->get('author')));
20 }
21 ?>
22
23 <!-- FIXME: move table formatting to css -->
24 <div title="<?= fmt("Comments on %s by %s.", $COMMENT_PARENT, $COMMENT_CREATOR)?>"
25      class="wikicomment wikitext">
26   <div class="wikicomment-body">
27     <?= $CONTENT ?>
28   </div>
29   <div class="wikicomment-header">
30     <strong class="floatright"><?= WikiLink($COMMENT_CREATOR, 'if_known') ?>  <?= WikiLink($page, 'known', $CDATE) ?></strong>
31     <?php if (!$buttons and !$modified) { ?>
32       <br clear="all" class="clear-floats" />
33     <?php } ?>
34   </div>
35   <?php if ($buttons or $modified) { ?>
36     <div class="wikicomment-footer">
37       <?= $buttons ?>
38       <?= $modified ?>
39       <br clear="all" class="clear-floats" />
40     </div>
41   <?php } ?>
42
43 </div>
44 <hr class="no-css" />