]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/MonoBook/templates/actionbar.tmpl
add accesskeys
[SourceForge/phpwiki.git] / themes / MonoBook / templates / actionbar.tmpl
1 <?php // -*-php-*- ?>
2 <!-- $Id: actionbar.tmpl,v 1.13 2007-06-02 18:39:30 rurban Exp $ -->
3 <?php
4 //$p = $WikiTheme->tooltipAccessKeyPrefix();
5 $dbh = $request->getDbh();
6 $isActionPage = $request->isActionPage($request->getArg("action"));
7 $isAdmin = $user->isAdmin();
8 $pagename = $page->getName();
9 ?>
10 <div class="portlet" id="p-cactions">
11   <h5>Views</h5>
12   <ul>
13     <?php if (!string_ends_with($pagename, _("Discussion"))) { ?>
14     <?php $talk = new WikiPageName('Talk:'.$pagename); ?>
15       <?= ActionButton(array(),
16                        $isActionPage ? _("ActionPage") : _("Article"), 
17                        $talk->getParent(), array('class'=>"selected", 'title' => "View the page [alt-c]")) ?>
18       <?php if (!$isActionPage) { ?>
19         <?php if ($dbh->isWikiPage($talk->getName())) { ?>
20           <?= ActionButton(array('action'=>'browse'), _("Discussion"), $talk->getName()) ?>
21         <?php } else { ?>
22           <?= ActionButton(array('action'=>'create',
23                                  'template'=>_("TemplateTalk")),
24                            _("Discussion"), $talk->getName()) ?>
25         <?php } ?>
26       <?php } ?>
27     <?php } else {
28       $talk = new WikiPageName($pagename); ?>
29       <?= ActionButton(array(),$isActionPage ? _("ActionPage") : _("Article"), $talk->getParent(), array('title' => "View the page [alt-c]")) ?>
30       <?= ActionButton(array(),_("Discussion"), $talk->getParent(), array('class'=>"selected")) ?>
31     <?php } ?>
32     <?php if (($isAdmin or mayAccessPage('edit', $pagename)) and $revision) { ?>
33     <?= ActionButton("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision"), false, 
34                      array('title' => "You can edit this page. Please use the preview button before saving. [alt-e]")) ?>
35     <?php } else { ?>
36       <?= ActionButton("viewsource", _("View Source")) ?>
37     <?php } ?>
38     <?= ActionButton(_("PageHistory"),_("History"),false,array('title'=>"Past versions of this page. [alt-h]")) ?>
39     <?= ActionButton("diff") ?> 
40     <? if ( $user->isSignedIn() ) { ?>
41       <?= ActionButton("WatchPage", _("Watch"), false, 
42                        array('title'=>"Add/Remove this to/from the list of pages you're monitoring for changes [alt-l]")) ?>
43     <?php } ?>
44   </ul>
45 </div>
46 <div class="portlet" id="p-tbx">
47   <h5>Special Actions</h5>
48   <div class="pBody">
49   <ul>
50     <? if ( $user->isSignedIn() ) { ?>
51      <?php if ($isAdmin or mayAccessPage('change', $pagename)) { ?>
52       <?= ActionButton($page->get('locked') ? 'unlock' : 'lock') ?>
53       <?= ActionButton('rename') ?>
54       <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $pagename)) { ?>
55        <?= ActionButton('chown') ?>
56        <?= ActionButton('setacl') ?>
57      <?php }} ?>
58      <?php if (!empty($revision) and ($isAdmin or mayAccessPage('remove', $pagename))) { ?>
59       <?= ActionButton('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?>
60       <?= ActionButton('remove') ?>
61      <?php } ?>
62     <?php } ?>
63     <?= ActionButton(array('action'=>_("PageInfo")),
64                         _("Info"), $pagename) ?>
65     <?= ActionButton(_("PageHistory")) ?>
66     <?= ActionButton(_("AuthorHistory")) ?>
67     <?= ActionButton("diff") ?> 
68     <?= ActionButton(_("PageDump")) ?>
69     <?php if (DEBUG & _DEBUG_SQL and USECACHE) {
70       $PurgeCache = Button(array('nocache' => 'purge'),
71                      _("PurgeHtmlCache"), $pagename);
72       $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed.")); ?>
73       <?= $PurgeCache ?>
74     <?php } ?>
75   </div>
76   </ul>
77 </div>