]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/smaller/templates/actionbar.tmpl
simplify actionbar, add one-click Revert
[SourceForge/phpwiki.git] / themes / smaller / templates / actionbar.tmpl
1 <?php // -*-php-*-
2 rcs_id('$Id: actionbar.tmpl,v 1.6 2005-04-23 11:43:44 rurban Exp $');
3 // Only [Info] button when not signed in.
4 // The rest behind Info
5 ?>
6 <?php /* I would like not to have to use these tables, and managed to
7        * get this stuff to work more or less correctly using
8        * CSSs float:left; and float:right;.  However float:right; seems
9        * to cause MSIE4.01/NT to hang. 
10        * So, we use tables...  */ ?>
11 <table summary="Toolbar 1: Page actions and user login."
12        width="100%" cellpadding="0" cellspacing="0" border="0">
13 <tr valign="baseline">
14   <td>
15   <div id="actionbuttons">
16     <?php if ( $user->isSignedIn()) { ?>
17       <?php if ((!$page->get('locked') || $user->isAdmin()) and $revision) { ?>
18         <?= Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) ?>
19       <?php } else { ?>
20         <?= Button("viewsource", _("View Source")) ?>
21      <?php } ?>
22      <?php if ($user->isAdmin() or mayAccessPage('change', $page->getName())) { ?>
23       <?=$SEP?><?= Button($page->get('locked') ? 'unlock' : 'lock') ?>
24       <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $page->getName())) { ?>
25         <?=$SEP?><?= Button('chown') ?>
26         <?=$SEP?><?= Button('setacl') ?>
27      <?php }} ?>
28      <?php if ($user->isAdmin() or mayAccessPage('remove', $page->getName())) { ?>
29       <?=$SEP?><?= Button('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?>
30       <?=$SEP?><?= Button('remove') ?>
31      <?php } ?>
32      <?=$SEP?>
33     <?php } ?>
34    <?= Button(array('action'=>'PageInfo'),_("Info"), $page->getName()) ?>
35 <?php if (((defined('DEBUG') and DEBUG and $request->getArg('action') == 'browse')) || $user->isAdmin()) { ?>
36       <!-- Buttons really only for debugging -->
37       <?=$SEP?><?= Button(_("PageHistory")) ?>
38       <?=$SEP?><?= Button("diff") ?>
39       <?=$SEP?><?= Button(_("PageDump")) ?>
40     <!-- End debugging buttons -->
41     <?php } ?>
42 <?php if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) { ?> 
43     <?=$SEP?><?= Button("pdf") ?>
44 <?php } ?>
45   </div>
46   </td>
47 <?php if (empty($NOSIGNIN)) { ?>
48   <td align="right">
49     <div id="signin"><?= Template('signin') ?></div>
50   </td>
51 <?php } ?>
52 </tr>
53 </table>