3 $dbh = $request->getDbh();
4 $isAdmin = $user->isAdmin();
5 $pagename = $page->getName();
6 $isActionPage = isActionPage($pagename);
7 $isBrowse = $request->getArg('action') == 'browse';
8 $mayEdit = mayAccessPage('edit', $pagename);
9 $mayChange = mayAccessPage('change', $pagename);
11 <div class="portlet" id="p-cactions">
12 <h5><?= _("Views") ?></h5>
14 <?php if ($request->getArg('action') != "") { ?>
15 <?= ActionButton("browse", _("View Page"), false, array('title' => _("View the page")." [alt-c]")) ?>
17 <li class="selected"><a class="named-wiki" name="browse"><?= _("View Page") ?></a></li>
19 <?php if (($isAdmin or $mayEdit) and $revision) { ?>
20 <?= ActionButton("edit", $dbh->isWikiPage($page->getName()) ? ($revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) : _("Create Page"), false, array('id' => 'btn-edit', 'title' => _("You can edit this page. Please use the preview button before saving.")." [alt-e]")) ?>
21 <?php if (ENABLE_WYSIWYG) { ?>
22 <?= Button(array("action" => "edit", "mode"=> "wysiwyg"), _("Wysiwyg Editor"), false, array('id' => 'btn-wysiwyg-edit')) ?>
24 <?php } elseif ($page->exists()) { ?>
25 <?= ActionButton("viewsource", _("View Source")) ?>
27 <?= ActionButton(_("PageHistory"),_("History"),false,array('title'=>_("Past versions of this page.")." [alt-h]")) ?>
28 <?= ActionButton("diff") ?>
29 <?php if ($user->isSignedIn()) { ?>
30 <?= ActionButton("WatchPage", _("Watch"), false,
31 array('title'=>_("Add/Remove this to/from the list of pages you're monitoring for changes")." [alt-l]")) ?>
36 <?php if ($user->isSignedIn()) { ?>
37 <div class="portlet" id="p-tbx">
38 <h5><?= _("Special Actions") ?> <?= $WikiTheme->folderArrow('p-tbx', 'Closed') ?></h5>
39 <div class="pBody" id="p-tbx-body" style="display:none;">
41 <?php if ($isAdmin or $mayEdit) { ?>
42 <?= ActionButton('rename') ?>
44 <?php if (!empty($revision) and ($isAdmin or mayAccessPage('remove', $pagename))) { ?>
45 <?= ActionButton('remove') ?>
46 <?= ActionButton('purge') ?>
47 <?= ActionButton('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?>
49 <?php if ($isAdmin or $mayChange) { ?>
50 <?= ActionButton($page->get('locked') ? 'unlock' : 'lock') ?>
51 <?php if (ENABLE_PAGEPERM and $mayChange) { ?>
52 <?= ActionButton('chown') ?>
53 <?= ActionButton('setacl') ?>
55 <?= ActionButton("viewsource", _("View Source")) ?>
56 <?= ActionButton(array('action'=>'PageInfo'), _("PageInfo"), $pagename) ?>
57 <?= ActionButton(_("AuthorHistory")) ?>
58 <?= ActionButton(_("PageHistory")) ?>
59 <?= ActionButton("diff") ?>
60 <?php if ($isAdmin) { ?>
61 <?= ActionButton(_("PageDump")) ?>
62 <?php if (USECACHE) { ?>
63 <?= ActionButton(array('nocache' => 'purge'), _("PurgeHtmlCache"), $pagename,
64 array('title'=>_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed."))) ?>
69 <?php } //isSignedIn ?>