2 <!-- $Id: info.tmpl,v 1.4 2002-02-16 23:38:13 carstenklapp Exp $ -->
5 $modifed = $Theme->formatDateTime($revision->get('mtime'));
7 $author = $revision->get('author');
8 global $WikiNameRegexp;
9 $dbi = $request->getDbh();
10 if (preg_match("/^$WikiNameRegexp\$/", $author) && $dbi->isWikiPage($author))
11 $author = WikiLink($author);
13 $authorId = $revision->get('author_id');
14 $version = $revision->getVersion();
15 $hits = $page->get('hits');
17 $is_minor_edit = $revision->get('is_minor_edit') ? _("minor edit") : false;
18 if ($minor_flag = $is_minor_edit) {
19 $minor_flag = HTML(" ",
20 HTML::span(array('class' => 'pageinfo-minoredit'),
21 "(" . _("minor edit") . ")"));
24 /* better way to do this? */
25 $data = &$revision->_data;
26 $bytes = strlen(&$data['%content']);
28 $size = fmt("%s bytes", $bytes);
30 $kb = round($bytes / 1024, 1);
31 $size = fmt("%s Kb (%s bytes)", $kb, $bytes);
34 $markupVersion = ($markupVersion = $revision->get('markup'))
35 ? fmt("Version %s", $markupVersion)
36 : _("Original (1.2 or 1.0)");
38 $summary = HTML::textarea(array('name' => 'summary',
40 /* use fixed dimensions? */
41 'rows' => $request->getPref('editHeight')/4,
42 'cols' => $request->getPref('editWidth')/2,
43 'readonly' => 'readonly',
44 'wrap' => 'virtual'), /* for Netscape 4 */
45 $revision->get('summary'));
47 if ($is_current = $revision->isCurrent()) {
49 $LOCKED_CB = HTML::input(array('type' => 'checkbox',
50 'name' => 'edit[locked]',
51 'disabled' => !$user->isadmin(),
52 'checked' => $page->get('locked')));
54 $label['date'] = _("Last Modified:");
55 $label['author'] = _("Last Author:");
56 $label['summary'] = _("Last Summary:");
59 $label['date'] = _("Saved on:");
60 $label['author'] = _("Author:");
61 $label['summary'] = _("Summary:");
64 $tableSummary = fmt("Statistics about %s.", $page->getName());
68 <!-- FIXME: move table formatting to css -->
69 <table summary="<?= $tableSummary ?>" class="pageinfo"
70 border="0" cellspacing="0" cellpadding="3">
72 <?php if (!$is_current) { ?>
74 <td align="right" class="pageinfo"><?=_("Supplanted on:")?></td>
75 <td><?= $Theme->formatDateTime($revision->get('_supplanted')) ?></td>
80 <td align="right" nowrap="nowrap" class="pageinfo"><?= $label['date'] ?></td>
81 <td><?= $modifed ?><?= $minor_flag ?></td>
83 <td align="right" class="pageinfo"><?= $label['author'] ?></td>
84 <td><?= $author ?> <span class="pageinfo-authorid">(<?= $authorId ?>)</span></td>
86 <td align="right" class="pageinfo"><?=_("Page Version:")?></td>
87 <td><?= $version ?></td>
89 <td align="right" class="pageinfo"><?=_("Markup:")?></td>
90 <td><?= $markupVersion ?></td>
92 <td align="right" class="pageinfo"><?=_("Size:")?></td>
95 <?php if ($is_current) { ?>
97 <td align="right" class="pageinfo"><?= _("Hits:") ?></td>
102 <td align="right" valign="top" class="pageinfo"><?= $label['summary'] ?></td>
103 <td><?= $summary ?></td>
105 <?php if ($is_current) { ?>
107 <td align="right"><?= $LOCKED_CB ?></td>
108 <td class="pageinfo"><?=_("Locked")?></td>