]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/actionbar.tmpl
support UniversalWikiEditButton
[SourceForge/phpwiki.git] / themes / default / templates / actionbar.tmpl
1 <?php // -*-php-*-
2 rcs_id('$Id: actionbar.tmpl,v 1.40 2007-07-15 17:38:58 rurban Exp $');
3 ?>
4 <?php if (!$WikiTheme->DUMP_MODE) { ?>
5 <?php /* I would like not to have to use these tables, and managed to
6        * get this stuff to work more or less correctly using
7        * CSSs float:left; and float:right;.  However float:right; seems
8        * to cause MSIE4.01/NT to hang. 
9        * So, we use tables...  */ ?>
10 <table summary="Toolbar 1: Page actions and user login."
11        width="100%" cellpadding="0" cellspacing="0" border="0">
12 <tr valign="baseline">
13   <td>
14   <div id="actionbuttons">
15     <?php if ((!$page->get('locked') || $user->isAdmin()) and $revision) { ?>
16       <?= Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision"), false, array('id'=>'btn-edit')) ?>
17     <?php } else { ?>
18       <?= Button("viewsource", _("View Source")) ?>
19     <?php } ?>
20     <?php if ($user->isAdmin() or mayAccessPage('change', $page->getName())) { ?>
21       <?=$SEP?><?= Button($page->get('locked') ? 'unlock' : 'lock') ?>
22     <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $page->getName())) { ?>
23       <?=$SEP?><?= Button('chown') ?>
24       <?=$SEP?><?= Button('setacl') ?>
25       <?=$SEP?><?= Button('rename') ?>
26     <?php }} ?>
27     <?php if ($revision and ($user->isAdmin() or mayAccessPage('remove', $page->getName()))) { ?>
28       <?=$SEP?><?= Button('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?>
29       <?=$SEP?><?= Button('remove') ?>
30     <?php } ?>
31     <?=$SEP?><?= Button("PageHistory", _("PageHistory")) ?>
32     <?=$SEP?><?= Button("diff") ?> 
33     <?=$SEP?><?= Button("PageInfo", _("PageInfo")) ?>
34 <?php if ((DEBUG and $request->getArg('action') == 'browse') || $user->isAdmin()) { ?> 
35     <!-- Buttons really only for debugging -->
36     <?=$SEP?><?= Button("DebugInfo", _("DebugInfo")) ?>
37     <?=$SEP?><?= Button("PageDump", _("PageDump")) ?>
38 <?php
39     if (DEBUG & _DEBUG_SQL and USECACHE) {
40       $PurgeCache = Button(array('nocache' => 'purge'),
41                      _("PurgeHtmlCache"), $page->getName());
42       $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed."));
43 ?>
44       <?=$SEP?><?= $PurgeCache ?>
45 <?php } ?>
46     <!-- End debugging buttons -->
47 <?php } ?>
48 <?php if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) { ?> 
49       <?=$SEP?><?= Button("pdf","Pdf",'wikiclear',array('id'=>'btn-pdf')) ?>
50 <?php } ?>
51   </div>
52   </td>
53 <?php if (empty($NOSIGNIN)) { ?>
54 <?php
55 /* valign="top" is not ideal here but required to get reasonable alignment
56    with the other action buttons in some browsers, like OmniWeb and Safari
57    (therefore probably Konquorer too) */ ?>
58   <td align="right" valign="top">
59     <div id="signin"><?= Template('signin') ?></div>
60   </td>
61 <?php } ?>
62 </tr>
63 </table>
64 <?php } ?>