6 $curuserprefs = $user->getPreferences();
7 $dbh = $request->getDbh();
8 $isAdmin = $user->isAdmin();
9 $pagename = $page->getName();
10 $isActionPage = isActionPage($pagename);
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); ?>
21 <?php echo Button(array(),
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 <?php echo Button(array('action'=>'browse'), _("Discussion"), $talk->getName()) ?>
33 <?php echo Button(array('action'=>'create',
34 'template'=>_("Template/Talk")),
35 _("Discussion"), $talk->getName()) ?>
40 $talk = new WikiPageName($pagename); ?>
42 <?php echo Button(array(),$isActionPage ? _("Action Page") : _("Page"), $talk->getParent(), array('title' => "View the page")) ?>
44 <td class="spacer"> </td>
46 <?php echo 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"><?php echo 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><?php echo Button("viewsource", _("View Source")) ?></td>
59 <?php if ($dbh->isWikiPage($page->getName())) { ?>
61 <td class="spacer"> </td>
62 <td><?php echo Button("PageHistory", _("History")) ?></td>
64 <?php if ($curuserprefs->get('diffMenuItem')) { ?>
65 <td class="spacer"> </td>
66 <td><?php echo Button("diff", _("Last Difference")) ?> </td>
69 <?php if ($curuserprefs->get('revertMenuItem')) { ?>
70 <td class="spacer"> </td>
71 <td><?php echo Button('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?></td>
74 <td class="spacer"> </td>
75 <td><?php echo Button("PageInfo", _("Page Info")) ?></td>
77 <td class="spacer"> </td>
78 <td><?php echo 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><?php echo 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><?php echo Button('unlock', _("Unlock")) ?></td>
95 <td><?php echo 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><?php echo Button('chown', _("Change Owner")) ?></td>
103 <td class="spacer"> </td>
106 <?php if ($curuserprefs->get('setaclMenuItem')) { ?>
107 <td><?php echo Button('setaclsimple', _("Access Rights")) ?></td>
108 <td class="spacer"> </td>
113 <?php if (($user->isAdmin() or mayAccessPage('rename', $page->getName())) && $revision) { ?>
114 <td><?php echo Button('rename', _("Rename")) ?></td>
115 <td class="spacer"> </td>
118 <?php if (($user->isAdmin() or mayAccessPage('purge', $page->getName())) && $revision) { ?>
119 <td><?php echo Button('purge', _("Purge")) ?></td>
120 <td class="spacer"> </td>
125 <td class="spacer"> </td>
126 <td><?php echo Button("WatchPage", _("Watch Page")) ?></td>