2 $dbh = $request->getDbh();
3 $isAdmin = $user->isAdmin();
4 $pagename = $page->getName();
5 $isActionPage = isActionPage($pagename);
6 $isBrowse = $request->getArg('action') == 'browse';
8 <div class="portlet" id="p-cactions">
10 <?php if (!string_ends_with($pagename, '/'._("Discussion"))) { ?>
11 <?php $talk = new WikiPageName('Talk:'.$pagename); ?>
12 <?php echo ActionButton(array(),
13 $isActionPage ? _("Action Page") : _("Article"),
14 $talk->getParent(), array('class'=>$isBrowse ? "selected" : "", 'title' => "View the page [alt-c]")) ?>
15 <?php if (!$isActionPage) { ?>
16 <?php if ($dbh->isWikiPage($talk->getName())) { ?>
17 <?php echo ActionButton(array('action'=>'browse'), _("Discussion"), $talk->getName()) ?>
19 <?php echo ActionButton(array('action'=>'create',
20 'template'=>_("Template/Talk")),
21 _("Discussion"), $talk->getName()) ?>
25 $talk = new WikiPageName($pagename); ?>
26 <?php echo ActionButton(array(),$isActionPage ? _("Action Page") : _("Article"), $talk->getParent(), array('title' => "View the page [alt-c]")) ?>
27 <?php echo ActionButton(array(),_("Discussion"), $talk->getName(), array('class'=>$isBrowse ? "selected" : "")) ?>
29 <?php if (($isAdmin or mayAccessPage('edit', $pagename)) and $revision) { ?>
30 <?php echo ActionButton("edit", $dbh->isWikiPage($page->getName()) ? ($revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) : _("Create Page"), false,
31 array('id' => 'btn-edit', 'title' => "You can edit this page. Please use the preview button before saving. [alt-e]")) ?>
33 <?php echo ActionButton("viewsource", _("View Source")) ?>
36 <?php if ($dbh->isWikiPage($page->getName())) { ?>
38 <?php echo ActionButton(_("PageHistory"),_("History"),false,array('title'=>"Past versions of this page. [alt-h]")) ?>
40 <?php if (!empty($revision) and ($isAdmin or mayAccessPage('purge', $pagename))) { ?>
41 <?php echo ActionButton("purge") ?>
44 <?php if ($isAdmin or mayAccessPage('change', $pagename)) { ?>
45 <?php echo ActionButton('rename') ?>
46 <?php echo ActionButton($page->get('locked') ? 'unlock' : 'lock') ?>
51 <?php if ( $user->isSignedIn() ) { ?>
52 <?php echo ActionButton(_("WatchPage"), _("Watch"), false,
53 array('title'=>"Add/Remove this to/from the list of pages you're monitoring for changes [alt-l]")) ?>
57 <div class="portlet" id="p-tbx">
58 <h2><?php echo _("Special Actions") ?></h2>
61 <?php if ( $user->isSignedIn() ) { ?>
62 <?php if ($isAdmin or mayAccessPage('change', $pagename)) { ?>
63 <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $pagename)) { ?>
64 <?php echo ActionButton('chown') ?>
65 <?php echo ActionButton('setacl') ?>
67 <?php if (!empty($revision) and ($isAdmin or mayAccessPage('remove', $pagename))) { ?>
68 <?php echo ActionButton('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?>
69 <?php echo ActionButton('remove') ?>
72 <?php echo ActionButton(array('action'=>_("PageInfo")), _("Page info"), $pagename) ?>
73 <?php echo ActionButton(array('action'=>_("AuthorHistory")), _("Author history"), $pagename) ?>
74 <?php echo ActionButton("diff") ?>
75 <?php echo ActionButton(array('action'=>_("PageDump")), _("Page dump"), $pagename) ?>
76 <?php if (DEBUG and USECACHE) {
77 $PurgeCache = ActionButton(array('nocache' => 'purge'),
78 _("Purge HTML cache"), $pagename);
79 $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed.")); ?>
80 <?php echo $PurgeCache ?>