]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/viewsource.tmpl
Enhancements to format dates as relative dates, such as "Today" or "Yesterday" when...
[SourceForge/phpwiki.git] / themes / default / templates / viewsource.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: viewsource.tmpl,v 1.12 2002-02-03 22:12:33 carstenklapp Exp $ -->
3 <?php
4   $mtime = $revision->get('mtime');
5   $fmtime = $Theme->formatDateTime($mtime);
6
7   if ($revision->isCurrent()) {
8     if (istoday($mtime) || isyesterday($mtime))
9       $LastModifiedMsg = fmt("Last edited %s.", $fmtime);
10     else
11       $LastModifiedMsg = fmt("Last edited on %s.", $fmtime);
12   } else {
13     if (istoday($mtime) || isyesterday($mtime))
14       $LastModifiedMsg = fmt("Version %s, saved %s.",
15                              $revision->getVersion(), $fmtime);
16     else
17       $LastModifiedMsg = fmt("Version %s, saved on %s.",
18                              $revision->getVersion(), $fmtime);
19   }
20 ?>
21
22 <?php if ($page->get('locked') && !$user->isAdmin()) { ?>
23   <p><strong><?=_("Note:")?></strong>
24     <?=_("This page has been locked by the administrator and cannot be edited.")?>
25   </p>
26 <?php } ?>
27 <?php if (! $revision->isCurrent()) { ?>
28   <p><?=_("You are viewing an old revision of this page.")?>
29     <?= Button('edit', _("View the current version"), $page) ?>.
30   </p>
31   <hr class="ignore" noshade="noshade" />
32 <?php } ?>
33 <!-- Dummy form else NS4 doesn't like the textarea -->
34 <form method="post" action="<?=BASE_URL?>" accept-charset="<?=CHARSET?>">
35 <!-- wrap=virtual is not HTML4, but without it NS4 doesn't wrap long lines -->
36 <textarea class="wikiedit"
37           name="content"
38           rows="<?=$request->getPref('editHeight')?>"
39           cols="<?=$request->getPref('editWidth')?>"
40           readonly="readonly"
41           wrap="virtual"><?= $PAGE_SOURCE ?></textarea>
42
43 <p class="editdate"><?= $LastModifiedMsg ?></p>
44 <div id="actionbar">
45 <hr class="toolbar" noshade="noshade" />
46 <?= Template('actionbar') ?>
47 <!-- RELATEDPAGES were here. -->
48 </div>
49 <?= HiddenInputs($request->getArgs()) ?>
50 </form>