]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/templates/actionbar.tmpl
More updates for compatibility with relative date formatting (Today, Yesterday).
[SourceForge/phpwiki.git] / themes / Portland / templates / actionbar.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: actionbar.tmpl,v 1.12 2002-02-03 23:55:59 carstenklapp Exp $ -->
3 <?php
4   if (!$page->get('locked') || $user->isAdmin())
5       $EditB = Button("edit",
6                       $revision->isCurrent() ? _("EditText") : _("Edit Old Revision"));
7   else
8       $EditB = Button("viewsource", _("View Source"));
9   $EditB = fmt("%s of this page", $EditB);
10
11   $mtime = $revision->get('mtime');
12   $fmtime = $Theme->formatDateTime($mtime);
13   // Suppress object to string conversion error.
14   // Once the temporary asterisk denoting timezone conversion is removed, the @ can be removed.
15   $PageHistoryB = @Button(_("Diff"), $fmtime);
16
17   if ($revision->isCurrent())
18       $LastModifiedMsg = fmt("(last edited %s)", $PageHistoryB);
19   else {
20     if (istoday($mtime) || isyesterday($mtime))
21       $LastModifiedMsg = fmt("version %s, saved %s.",
22                              $revision->getVersion(), $PageHistoryB);
23     else
24       $LastModifiedMsg = fmt("version %s, saved on %s.",
25                              $revision->getVersion(), $PageHistoryB);
26 }
27 ?>
28    <?= $EditB ?> <?= $LastModifiedMsg ?><br />