]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/viewsource.tmpl
Two new convenience functions in lib/Theme.php: WikiLink() and Button().
[SourceForge/phpwiki.git] / themes / default / templates / viewsource.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: viewsource.tmpl,v 1.9 2002-01-30 23:41:55 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     <?= Button('edit', _("View the current version"), $page) ?>.
20   </p>
21   <hr class="ignore" noshade="noshade" />
22 <?php } ?>
23 <!-- Dummy form else NS4 doesn't like the textarea -->
24 <form method="post" action="<?=BASE_URL?>" accept-charset="<?=CHARSET?>">
25 <!-- wrap=virtual is not HTML4, but without it NS4 doesn't wrap long lines -->
26 <textarea class="wikiedit"
27           name="content"
28           rows="<?=$request->getPref('editHeight')?>"
29           cols="<?=$request->getPref('editWidth')?>"
30           readonly="readonly"
31           wrap="virtual"><?= $PAGE_SOURCE ?></textarea>
32 <p><?= $LastModifiedMsg ?></p>
33 <?= HiddenInputs($request->getArgs()) ?>
34 </form>
35 <hr class="toolbar" noshade="noshade" />
36 <?= Template('actionbar') ?>
37 <!-- RELATEDPAGES were here. -->