]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/templates/viewsource.tmpl
Combine and refactor editpage.php and savepage.php.
[SourceForge/phpwiki.git] / themes / Portland / templates / viewsource.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: viewsource.tmpl,v 1.7 2002-01-30 01:33:20 dairiki Exp $ -->
3
4 <?php if ($page->get('locked') && !$user->isAdmin()) { ?>
5   <p><strong><?=_("Note:")?></strong>
6   <?=_("This page has been locked by the administrator and cannot be edited.")?></p>
7 <?php } ?>
8
9 <?php if (! $revision->isCurrent()) { ?>
10   <p><?=_("You are viewing an old revision of this page.")?>
11   <?= $Theme->makeActionButton('edit', _("View the current version"), $page->getName())?>.</p>
12 <?php } ?>
13
14 <!-- Dummy form else NS4 doesn't like the textarea -->
15 <form method="post" action="<?=BASE_URL?>" accept-charset="<?=CHARSET?>">
16 <!-- wrap=virtual is not HTML4, but without it NS4 doesn't wrap long lines -->
17 <textarea class="wikiedit"
18           name="content"
19           rows="<?=$request->getPref('editHeight')?>"
20           cols="<?=$request->getPref('editWidth')?>"
21           readonly="readonly"
22           wrap="virtual"><?= $PAGE_SOURCE ?></textarea>
23 <?php
24   $mtime = $Theme->formatDateTime($revision->get('mtime'));
25   $PageHistoryB = $Theme->makeActionButton(_("PageHistory"), $mtime);
26
27   if ($revision->isCurrent())
28       $LastModifiedMsg = fmt("(last edited %s)", $PageHistoryB);
29   else
30       $LastModifiedMsg = fmt("(version %s, saved on %s)",
31                              $revision->getVersion(), $PageHistoryB);
32
33 ?>
34 <?= HiddenInputs($request->getArgs()) ?>
35 </form>
36 <hr />
37 <?= $LastModifiedMsg ?><br />