]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/browse.tmpl
Beginning of major template code clean-up and refactor.
[SourceForge/phpwiki.git] / themes / default / templates / browse.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: browse.tmpl,v 1.1 2002-01-17 20:41:13 dairiki Exp $ -->
3 <?php
4   $BF = &$ButtonFactory;
5
6   if (!$page->get('locked') || $user->is_admin())
7       $EditB = $BF->makeActionButton("edit",
8                                      $IS_CURRENT ? _("Edit") : _("Edit Old Revision"));
9   else
10       $EditB = $BF->makeActionButton("edit", _("View Source"));
11
12   $LockPageB = $BF->makeActionButton($page->get('locked') ? 'unlock' : 'lock');
13   $RemovePageB = $BF->makeActionButton('remove');
14
15   //<?plugin-link PageHistory page="[pagename]" ?>
16   $PageHistoryB = $BF->makeActionPageButton(_("PageHistory"));
17   $DiffB = $BF->makeActionButton(array('action' => 'diff', 'previous' => 'major'));
18
19   $DebugInfoB = $BF->makeActionPageButton(_("DebugInfo"));
20
21   $SignInB = $BF->makeActionButton($user->is_authenticated() ? 'logout' : 'login');
22
23   $mtime = $Theme->formatDateTime($revision->get('mtime'));
24   if ($IS_CURRENT)
25       $LastModifiedMsg = sprintf(_("Last edited on %s."), $mtime);
26   else
27       $LastModifiedMsg = __sprintf("Version %s, saved on %s.",
28                                    $VERSION, $mtime);
29 ?>
30
31 <div class="br"><br clear="all" class="ignore" /></div>
32
33 <?php if (! $IS_CURRENT) { ?>
34   <p><strong><?=_("Note:")?></strong>
35      <?=_("You are viewing an old revision of this page.")?>
36      <a href="<?= WikiURL($page->getName()) ?>"
37         ><?=_("View the current version")?></a>.</p>
38   <hr class="ignore" noshade="noshade" />
39 <?php } ?>
40
41 <div class="wikitext"><?=$CONTENT?></div>
42 <hr class="ignore" noshade="noshade" />
43
44 <p><?= $LastModifiedMsg ?></p>
45
46 <hr noshade="noshade" class="toolbar" />
47 <!-- I would like not to have to use these tables, and managed to
48      get this stuff to work more or less correctly using
49      CSSs float:left; and float:right;.  However float:right; seems
50      to cause MSIE4.01/NT to hang. 
51      So, we use tables...  -->
52 <table summary="Toolbar 1: Page actions and search for pages."
53        class="toolbar" width="100%"
54        cellpadding="0" cellspacing="0" border="0">
55 <tr valign="baseline">
56   <td>
57     <?= $EditB ?> 
58     <?php if ($user->is_admin()) { ?>
59       | <?= $LockPageB ?> | <?= $RemovePageB ?>
60     <?php } ?>
61     | <?= $PageHistoryB ?> | <?= $DiffB ?> 
62     | <?= $DebugInfoB ?> <!-- For debugging only, really -->
63   </td>
64   <td align="right">
65     <?php if ($user->is_authenticated()) { ?>
66         <?php printf(_("You are signed in as %s"), LinkWikiWord($USERID)); ?> |
67     <?php } ?>
68     <?= $SignInB ?>
69   </td>
70 </tr></table>
71
72 <div class="toolbar">
73 </div>
74
75 <!-- RELATEDPAGES were here. -->