]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/actionbar.tmpl
Combine and refactor editpage.php and savepage.php.
[SourceForge/phpwiki.git] / themes / default / templates / actionbar.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: actionbar.tmpl,v 1.8 2002-01-30 01:33:20 dairiki Exp $ -->
3 <?php
4   if (!$page->get('locked') || $user->isAdmin())
5       $EditB = $Theme->makeActionButton("edit",
6                                      $revision->isCurrent() ? _("Edit") : _("Edit Old Revision"));
7   else
8       $EditB = $Theme->makeActionButton("viewsource", _("View Source"));
9
10   $LockPageB = $Theme->makeActionButton($page->get('locked') ? 'unlock' : 'lock');
11   $RemovePageB = $Theme->makeActionButton('remove');
12
13   $PageHistoryB = $Theme->makeActionButton(_("PageHistory"));
14   $DiffB = $Theme->makeActionButton(array('action' => 'diff', 'previous' => 'major'));
15
16   $DebugInfoB = $Theme->makeActionButton(_("DebugInfo"));
17
18   $Sep = $Theme->getButtonSeparator();
19 ?>
20
21 <!-- I would like not to have to use these tables, and managed to
22      get this stuff to work more or less correctly using
23      CSSs float:left; and float:right;.  However float:right; seems
24      to cause MSIE4.01/NT to hang. 
25      So, we use tables...  -->
26
27
28 <table summary="Toolbar 1: Page actions and user login."
29        class="toolbar" width="100%"
30        cellpadding="0" cellspacing="0" border="0"
31        id="actionbar">
32 <tr valign="baseline">
33   <td>
34     <?= $EditB ?> 
35     <?php if ($user->isAdmin()) { ?>
36      <?=$Sep?><?= $LockPageB ?><?=$Sep?><?= $RemovePageB ?>
37     <?php } ?>
38    <?=$Sep?><?= $PageHistoryB ?>
39    <?=$Sep?><?= $DiffB ?> 
40    <?=$Sep?><?= $DebugInfoB ?> <!-- For debugging only, really -->
41   </td>
42   <td align="right">
43     <?= Template('signin') ?>
44   </td>
45 </tr></table>
46