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