4 $curuserprefs = $user->getPreferences();
5 $dbh = $request->getDbh();
6 $isAdmin = $user->isAdmin();
7 $pagename = $page->getName();
8 $isActionPage = isActionPage($pagename);
9 $isBrowse = $request->getArg('action') == 'browse';
12 <div id="actionbuttons">
13 <table cellpadding="0" cellspacing="0">
16 <?php if (!string_ends_with($pagename, SUBPAGE_SEPARATOR._("Discussion"))) { ?>
17 <?php $talk = new WikiPageName('Talk:'.$pagename); ?>
19 <?php echo Button(array(),
20 $isActionPage ? _("Action Page") : _("Page"),
21 $talk->getParent(), array('title' => "Page")) ?>
23 <td class="spacer"> </td>
24 <?php if (!$isActionPage) { ?>
25 <?php if ($dbh->isWikiPage($talk->getName())) { ?>
27 <?php echo Button(array('action'=>'browse'), _("Discussion"), $talk->getName()) ?>
31 <?php echo Button(array('action'=>'create',
32 'template'=>_("Template/Talk")),
33 _("Discussion"), $talk->getName()) ?>
38 $talk = new WikiPageName($pagename); ?>
40 <?php echo Button(array(),$isActionPage ? _("Action Page") : _("Page"), $talk->getParent(), array('title' => "View the page")) ?>
42 <td class="spacer"> </td>
44 <?php echo Button(array(),_("Discussion"), $talk->getName()) ?>
48 <td class="spacer"> </td>
49 <td class="spacer"> </td>
51 <?php if (!($page->get('locked')) and (mayAccessPage('edit', $page->getName()))) { ?>
53 <?php if (! $dbh->isWikiPage($page->getName())) { ?>
54 <?php echo Button("edit", _("Create Page")) ?>
55 <?php } else if ($revision && (($revision->isCurrent()) || ($revision->hasDefaultContents()))) { ?>
56 <?php echo Button("edit", _("Edit")) ?>
58 <?php echo Button("edit", _("Edit Old Revision")) ?>
61 <?php } else if ($dbh->isWikiPage($page->getName())) { ?>
62 <td><?php echo Button("viewsource", _("View Source")) ?></td>
65 <?php if ($dbh->isWikiPage($page->getName())) { ?>
67 <td class="spacer"> </td>
68 <td><?php echo Button("PageHistory", _("History")) ?></td>
70 <?php if ($curuserprefs->get('diffMenuItem')) { ?>
71 <td class="spacer"> </td>
72 <td><?php echo Button("diff", _("Last Difference")) ?> </td>
75 <?php if ($curuserprefs->get('revertMenuItem')) { ?>
76 <td class="spacer"> </td>
77 <td><?php echo Button('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?></td>
80 <td class="spacer"> </td>
81 <td><?php echo Button("PageInfo", _("Page Info")) ?></td>
83 <td class="spacer"> </td>
84 <td><?php echo Button(array('action'=>'BackLinks'), _("Back Links"),$page->getName()) ?></td>
86 <?php if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) { ?>
87 <?php if ($curuserprefs->get('pdfMenuItem')) { ?>
88 <td class="spacer"> </td>
89 <td><?php echo Button("pdf") ?></td>
93 <td class="spacer"> </td>
94 <td class="spacer"> </td>
96 <?php if ($user->isAdmin() or mayAccessPage('change', $page->getName())) { ?>
97 <?php if ($curuserprefs->get('lockMenuItem')) { ?>
98 <?php if ($page->get('locked')) { ?>
99 <td><?php echo Button('unlock', _("Unlock")) ?></td>
101 <td><?php echo Button('lock', _("Lock")) ?></td>
103 <td class="spacer"> </td>
106 <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $page->getName())) { ?>
107 <?php if ($curuserprefs->get('chownMenuItem')) { ?>
108 <td><?php echo Button('chown', _("Change Owner")) ?></td>
109 <td class="spacer"> </td>
112 <?php if ($curuserprefs->get('setaclMenuItem')) { ?>
113 <td><?php echo Button('setaclsimple', _("Access Rights")) ?></td>
114 <td class="spacer"> </td>
119 <?php if (($user->isAdmin() or mayAccessPage('rename', $page->getName())) && $revision) { ?>
120 <td><?php echo Button('rename', _("Rename")) ?></td>
121 <td class="spacer"> </td>
124 <?php if (($user->isAdmin() or mayAccessPage('purge', $page->getName())) && $revision) { ?>
125 <td><?php echo Button('purge', _("Purge")) ?></td>
126 <td class="spacer"> </td>
131 <td class="spacer"> </td>
132 <td><?php echo Button("WatchPage", _("Watch Page")) ?></td>