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