]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/actionbar.tmpl
Split toolbars into their own subtemplates.
[SourceForge/phpwiki.git] / themes / default / templates / actionbar.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: actionbar.tmpl,v 1.1 2002-01-18 19:23:11 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   $Sep = $Theme->buttonSep;
24 ?>
25
26 <!-- I would like not to have to use these tables, and managed to
27      get this stuff to work more or less correctly using
28      CSSs float:left; and float:right;.  However float:right; seems
29      to cause MSIE4.01/NT to hang. 
30      So, we use tables...  -->
31
32 <table summary="Toolbar 1: Page actions and user login."
33        class="toolbar" width="100%"
34        cellpadding="0" cellspacing="0" border="0"
35        id="actionbar">
36 <tr valign="baseline">
37   <td>
38     <?= $EditB ?> 
39     <?php if ($user->is_admin()) { ?>
40      <?=$Sep?><?= $LockPageB ?><?=$Sep?><?= $RemovePageB ?>
41     <?php } ?>
42    <?=$Sep?><?= $PageHistoryB ?><?=$Sep?><?= $DiffB ?> 
43    <?=$Sep?><?= $DebugInfoB ?> <!-- For debugging only, really -->
44   </td>
45   <td align="right">
46     <?php if ($user->is_authenticated()) { ?>
47         <?php printf(_("You are signed in as %s"), LinkWikiWord($USERID)); ?>
48         <?=$Sep?>
49     <?php } ?>
50     <?= $SignInB ?>
51   </td>
52 </tr></table>