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