6 $curuserprefs = $user->getPreferences();
7 $dbh = $request->getDbh();
8 $isAdmin = $user->isAdmin();
9 $pagename = $page->getName();
10 $isActionPage = $request->_isActionPage($pagename, false);
11 $isBrowse = $request->getArg('action') == 'browse';
14 <div id="actionbuttons">
15 <table cellpadding="0" cellspacing="0">
18 <?php if (!string_ends_with($pagename, _("/Discussion"))) { ?>
19 <?php $talk = new WikiPageName('Talk:'.$pagename); ?>
22 $isActionPage ? _("Action Page") : _("Page"),
23 $talk->getParent(), array('title' => "Page")) ?>
25 <td class="spacer"> </td>
26 <?php if (!$isActionPage) { ?>
27 <?php if ($dbh->isWikiPage($talk->getName())) { ?>
29 <?= Button(array('action'=>'browse'), _("Discussion"), $talk->getName()) ?>
33 <?= Button(array('action'=>'create',
34 'template'=>_("TemplateTalk")),
35 _("Discussion"), $talk->getName()) ?>
40 $talk = new WikiPageName($pagename); ?>
42 <?= Button(array(),$isActionPage ? _("Action Page") : _("Page"), $talk->getParent(), array('title' => "View the page")) ?>
44 <td class="spacer"> </td>
46 <?= Button(array(),_("Discussion"), $talk->getName()) ?>
50 <td class="spacer"> </td>
51 <td class="spacer"> </td>
53 <?php if ((mayAccessPage('edit', $page->getName())) and $revision) { ?>
54 <td class="bold"><?= Button("edit", $dbh->isWikiPage($page->getName()) ? ($revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) : _("Create Page")) ?></td>
55 <?php } else if ($dbh->isWikiPage($page->getName())) { ?>
56 <td><?= Button("viewsource", _("View Source")) ?></td>
59 <?php if ($dbh->isWikiPage($page->getName())) { ?>
61 <td class="spacer"> </td>
62 <td><?= Button("PageHistory", _("History")) ?></td>
64 <?php if ($curuserprefs->get('diffMenuItem')) { ?>
65 <td class="spacer"> </td>
66 <td><?= Button("diff", _("Last Difference")) ?> </td>
69 <?php if ($curuserprefs->get('revertMenuItem')) { ?>
70 <td class="spacer"> </td>
71 <td><?= Button('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?></td>
74 <td class="spacer"> </td>
75 <td><?= Button("PageInfo", _("Page Info")) ?></td>
77 <td class="spacer"> </td>
78 <td><?= Button(array('action'=>'BackLinks'), _("Back Links"),$page->getName()) ?></td>
80 <?php if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) { ?>
81 <?php if ($curuserprefs->get('pdfMenuItem')) { ?>
82 <td class="spacer"> </td>
83 <td><?= Button("pdf") ?></td>
87 <td class="spacer"> </td>
88 <td class="spacer"> </td>
90 <?php if ($user->isAdmin() or mayAccessPage('change', $page->getName())) { ?>
91 <?php if ($curuserprefs->get('lockMenuItem')) { ?>
92 <?php if ($page->get('locked')) { ?>
93 <td><?= Button('unlock', _("Unlock")) ?></td>
95 <td><?= Button('lock', _("Lock")) ?></td>
97 <td class="spacer"> </td>
100 <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $page->getName())) { ?>
101 <?php if ($curuserprefs->get('chownMenuItem')) { ?>
102 <td><?= Button('chown', _("Change Owner")) ?></td>
103 <td class="spacer"> </td>
106 <?php if ($curuserprefs->get('setaclMenuItem')) { ?>
107 <td><?= Button('setacl', _("Access Rights")) ?></td>
108 <td class="spacer"> </td>
113 <?php if (($user->isAdmin() or mayAccessPage('rename', $page->getName())) && $revision) { ?>
114 <td><?= Button('rename', _("Rename")) ?></td>
115 <td class="spacer"> </td>
118 <?php if (($user->isAdmin() or mayAccessPage('purge', $page->getName())) && $revision) { ?>
119 <td><?= Button('purge', _("Purge")) ?></td>
120 <td class="spacer"> </td>
123 <td class="spacer"> </td>
124 <td><?= Button("WatchPage", _("Watch Page")) ?></td>
126 <?php if ((DEBUG and $request->getArg('action') == 'browse') || $user->isAdmin()) { ?>
127 <!-- Buttons really only for debugging -->
129 if (DEBUG & _DEBUG_SQL and USECACHE) {
130 $PurgeCache = Button(array('nocache' => 'purge'),
131 _("PurgeHtmlCache"), $page->getName());
132 $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed."));
134 <td><?= $PurgeCache ?></td>
136 <!-- End debugging buttons -->