2 <!-- $Id: actionbar.tmpl,v 1.11 2007-01-02 13:29:59 rurban Exp $ -->
4 $dbh = $request->getDbh();
5 $isActionPage = $request->isActionPage($request->getArg("action"));
6 $isAdmin = $user->isAdmin();
7 $pagename = $page->getName();
8 /*if (empty($revision))
9 $revision = $page->getCurrentRevision(false);*/
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'=>"selected")) ?>
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()) ?>
31 <?= ActionButton(array(),_("Discussion"), $talk->getParent(), array('class'=>"selected")) ?>
33 <?php if ((!$page->get('locked') || $isAdmin) and !$revision) { ?>
34 <?= ActionButton("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) ?>
36 <?= ActionButton("viewsource", _("View Source")) ?>
38 <?= ActionButton(_("PageHistory")) ?>
39 <?= ActionButton("diff") ?>
40 <? if ( $user->isSignedIn() ) { ?>
41 <?= ActionButton("WatchPage", _("Watch")) ?>
45 <div class="portlet" id="p-tbx">
46 <h5>Special Actions</h5>
49 <? if ( $user->isSignedIn() ) { ?>
50 <?php if ($isAdmin or mayAccessPage('change', $pagename)) { ?>
51 <?= ActionButton($page->get('locked') ? 'unlock' : 'lock') ?>
52 <?= ActionButton('rename') ?>
53 <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $pagename)) { ?>
54 <?= ActionButton('chown') ?>
55 <?= ActionButton('setacl') ?>
57 <?php if (!empty($revision) and ($isAdmin or mayAccessPage('remove', $pagename))) { ?>
58 <?= ActionButton('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?>
59 <?= ActionButton('remove') ?>
62 <?= ActionButton(array('action'=>_("PageInfo")),
63 _("Info"), $pagename) ?>
64 <?= ActionButton(_("PageHistory")) ?>
65 <?= ActionButton(_("AuthorHistory")) ?>
66 <?= ActionButton("diff") ?>
67 <?= ActionButton(_("PageDump")) ?>
68 <?php if (DEBUG & _DEBUG_SQL and USECACHE) {
69 $PurgeCache = Button(array('nocache' => 'purge'),
70 _("PurgeHtmlCache"), $pagename);
71 $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed.")); ?>