2 <!-- $Id: info.tmpl,v 1.2 2002-02-16 01:46:06 carstenklapp Exp $ -->
5 $modifed = $Theme->formatDateTime($revision->get('mtime'));
6 $author = $revision->get('author');
7 $authorId = $revision->get('author_id');
8 $version = $revision->getVersion();
9 $is_minor = $revision->get('is_minor') ? _("(minor edit)") : "";
10 $hits = $page->get('hits');
12 /* better way to do this? */
13 $data = &$revision->_data;
14 $bytes = strlen(&$data['%content']);
16 $size = fmt("%s bytes", $bytes);
18 $kb = round($bytes / 1024, 1);
19 $size = fmt("%s Kb (%s bytes)", $kb, $bytes);
22 $markupVersion = ($markupVersion = $revision->get('markup'))
23 ? fmt("Version %s", $markupVersion)
24 : _("Original (1.2 or 1.0)");
26 $summary = HTML::textarea(array('name' => 'summary',
28 /* use fixed dimensions? */
29 'rows' => $request->getPref('editHeight')/4,
30 'cols' => $request->getPref('editWidth')/2,
31 'readonly' => 'readonly',
32 'wrap' => 'virtual'), /* for Netscape 4 */
33 $revision->get('summary'));
35 if ($is_current = $revision->isCurrent()) {
37 $LOCKED_CB = HTML::input(array('type' => 'checkbox',
38 'name' => 'edit[locked]',
39 'disabled' => !$user->isadmin(),
40 'checked' => $page->get('locked')));
42 $label['date'] = _("Last Modified:");
43 $label['author'] = _("Last Author:");
44 $label['summary'] = _("Last Summary:");
47 $label['date'] = _("Saved on:");
48 $label['author'] = _("Author:");
49 $label['summary'] = _("Summary:");
52 $tableSummary = fmt("Statistics about %s.", $page->getName());
56 <!-- FIXME: move table formatting to css -->
57 <table summary="<?= $tableSummary ?>" class="pageinfo"
58 border="0" cellspacing="0" cellpadding="3">
60 <?php if (!$is_current) { ?>
62 <td align="right" class="pageinfo"><?=_("Supplanted on:")?></td>
63 <td><?= $Theme->formatDateTime($revision->get('_supplanted')) ?></td>
68 <td align="right" nowrap="nowrap" class="pageinfo"><?= $label['date'] ?></td>
69 <td><?= $modifed ?> <span class="pageinfo-minoredit"><?= $is_minor ?></span></td>
71 <td align="right" class="pageinfo"><?= $label['author'] ?></td>
72 <td><?= $author ?> <span class="pageinfo-authorid">(<?= $authorId ?>)</span></td>
74 <td align="right" class="pageinfo"><?=_("Page Version:")?></td>
75 <td><?= $version ?></td>
77 <td align="right" class="pageinfo"><?=_("Markup:")?></td>
78 <td><?= $markupVersion ?></td>
80 <td align="right" class="pageinfo"><?=_("Size:")?></td>
83 <?php if ($is_current) { ?>
85 <td align="right" class="pageinfo"><?= _("Hits:") ?></td>
90 <td align="right" valign="top" class="pageinfo"><?= $label['summary'] ?></td>
91 <td><?= $summary ?></td>
93 <?php if ($is_current) { ?>
95 <td align="right"><?= $LOCKED_CB ?></td>
96 <td class="pageinfo"><?=_("Locked")?></td>