2 <!-- $Id: info.tmpl,v 1.3 2002-02-16 02:20:32 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 $hits = $page->get('hits');
11 $is_minor_edit = $revision->get('is_minor_edit') ? _("minor edit") : false;
12 if ($minor_flag = $is_minor_edit) {
13 $minor_flag = HTML(" ",
14 HTML::span(array('class' => 'pageinfo-minoredit'),
15 "(" . _("minor edit") . ")"));
18 /* better way to do this? */
19 $data = &$revision->_data;
20 $bytes = strlen(&$data['%content']);
22 $size = fmt("%s bytes", $bytes);
24 $kb = round($bytes / 1024, 1);
25 $size = fmt("%s Kb (%s bytes)", $kb, $bytes);
28 $markupVersion = ($markupVersion = $revision->get('markup'))
29 ? fmt("Version %s", $markupVersion)
30 : _("Original (1.2 or 1.0)");
32 $summary = HTML::textarea(array('name' => 'summary',
34 /* use fixed dimensions? */
35 'rows' => $request->getPref('editHeight')/4,
36 'cols' => $request->getPref('editWidth')/2,
37 'readonly' => 'readonly',
38 'wrap' => 'virtual'), /* for Netscape 4 */
39 $revision->get('summary'));
41 if ($is_current = $revision->isCurrent()) {
43 $LOCKED_CB = HTML::input(array('type' => 'checkbox',
44 'name' => 'edit[locked]',
45 'disabled' => !$user->isadmin(),
46 'checked' => $page->get('locked')));
48 $label['date'] = _("Last Modified:");
49 $label['author'] = _("Last Author:");
50 $label['summary'] = _("Last Summary:");
53 $label['date'] = _("Saved on:");
54 $label['author'] = _("Author:");
55 $label['summary'] = _("Summary:");
58 $tableSummary = fmt("Statistics about %s.", $page->getName());
62 <!-- FIXME: move table formatting to css -->
63 <table summary="<?= $tableSummary ?>" class="pageinfo"
64 border="0" cellspacing="0" cellpadding="3">
66 <?php if (!$is_current) { ?>
68 <td align="right" class="pageinfo"><?=_("Supplanted on:")?></td>
69 <td><?= $Theme->formatDateTime($revision->get('_supplanted')) ?></td>
74 <td align="right" nowrap="nowrap" class="pageinfo"><?= $label['date'] ?></td>
75 <td><?= $modifed ?><?= $minor_flag ?></td>
77 <td align="right" class="pageinfo"><?= $label['author'] ?></td>
78 <td><?= $author ?> <span class="pageinfo-authorid">(<?= $authorId ?>)</span></td>
80 <td align="right" class="pageinfo"><?=_("Page Version:")?></td>
81 <td><?= $version ?></td>
83 <td align="right" class="pageinfo"><?=_("Markup:")?></td>
84 <td><?= $markupVersion ?></td>
86 <td align="right" class="pageinfo"><?=_("Size:")?></td>
89 <?php if ($is_current) { ?>
91 <td align="right" class="pageinfo"><?= _("Hits:") ?></td>
96 <td align="right" valign="top" class="pageinfo"><?= $label['summary'] ?></td>
97 <td><?= $summary ?></td>
99 <?php if ($is_current) { ?>
101 <td align="right"><?= $LOCKED_CB ?></td>
102 <td class="pageinfo"><?=_("Locked")?></td>