2 <!-- $Id: actionbar.tmpl,v 1.16 2008-03-10 20:13:52 vargenau Exp $ -->
4 //$p = $WikiTheme->tooltipAccessKeyPrefix();
5 $dbh = $request->getDbh();
6 $isAdmin = $user->isAdmin();
7 $pagename = $page->getName();
8 $isActionPage = $request->_isActionPage($pagename, false);
9 $isBrowse = $request->getArg('action') == 'browse';
11 <div class="portlet" id="p-cactions">
14 <?php if (!string_ends_with($pagename, _("/Discussion"))) { ?>
15 <?php $talk = new WikiPageName('Talk:'.$pagename); ?>
16 <?= ActionButton(array(),
17 $isActionPage ? _("ActionPage") : _("Article"),
18 $talk->getParent(), array('class'=>$isBrowse ? "selected" : "", 'title' => "View the page [alt-c]")) ?>
19 <?php if (!$isActionPage) { ?>
20 <?php if ($dbh->isWikiPage($talk->getName())) { ?>
21 <?= ActionButton(array('action'=>'browse'), _("Discussion"), $talk->getName()) ?>
23 <?= ActionButton(array('action'=>'create',
24 'template'=>_("TemplateTalk")),
25 _("Discussion"), $talk->getName()) ?>
29 $talk = new WikiPageName($pagename); ?>
30 <?= ActionButton(array(),$isActionPage ? _("ActionPage") : _("Article"), $talk->getParent(), array('title' => "View the page [alt-c]")) ?>
31 <?= ActionButton(array(),_("Discussion"), $talk->getParent(), array('class'=>$isBrowse ? "selected" : "")) ?>
33 <?php if (($isAdmin or mayAccessPage('edit', $pagename)) and $revision) { ?>
34 <?= ActionButton("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision"), false,
35 array('id' => 'btn-edit', 'title' => "You can edit this page. Please use the preview button before saving. [alt-e]")) ?>
37 <?= ActionButton("viewsource", _("View Source")) ?>
39 <?= ActionButton(_("PageHistory"),_("History"),false,array('title'=>"Past versions of this page. [alt-h]")) ?>
40 <?= ActionButton("diff") ?>
41 <? if ( $user->isSignedIn() ) { ?>
42 <?= ActionButton("WatchPage", _("Watch"), false,
43 array('title'=>"Add/Remove this to/from the list of pages you're monitoring for changes [alt-l]")) ?>
47 <div class="portlet" id="p-tbx">
48 <h5>Special Actions</h5>
51 <? if ( $user->isSignedIn() ) { ?>
52 <?php if ($isAdmin or mayAccessPage('change', $pagename)) { ?>
53 <?= ActionButton($page->get('locked') ? 'unlock' : 'lock') ?>
54 <?= ActionButton('rename') ?>
55 <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $pagename)) { ?>
56 <?= ActionButton('chown') ?>
57 <?= ActionButton('setacl') ?>
59 <?php if (!empty($revision) and ($isAdmin or mayAccessPage('remove', $pagename))) { ?>
60 <?= ActionButton('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?>
61 <?= ActionButton('remove') ?>
64 <?= ActionButton(array('action'=>_("PageInfo")),
65 _("Info"), $pagename) ?>
66 <?= ActionButton(_("PageHistory")) ?>
67 <?= ActionButton(_("AuthorHistory")) ?>
68 <?= ActionButton("diff") ?>
69 <?= ActionButton(_("PageDump")) ?>
70 <?php if (DEBUG and USECACHE) {
71 $PurgeCache = Button(array('nocache' => 'purge'),
72 _("PurgeHtmlCache"), $pagename);
73 $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed.")); ?>