]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Sidebar/templates/actionbar.tmpl
rcs_id no longer makes sense with Subversion global version number
[SourceForge/phpwiki.git] / themes / Sidebar / templates / actionbar.tmpl
1 <?php // -*-php-*-
2 // rcs_id('$Id$');
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);
10 ?>
11 <div class="portlet" id="p-cactions">
12   <h5><?= _("Views") ?></h5>
13   <ul>
14     <?php if ($request->getArg('action') != "") { ?>
15       <?= ActionButton("browse", _("View Page"), false, array('title' => _("View the page")." [alt-c]")) ?>
16     <?php } else { ?>
17       <li class="selected"><a class="named-wiki" name="browse"><?= _("View Page") ?></a></li>
18     <?php } ?>
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')) ?>
23       <?php } ?>
24     <?php } elseif ($page->exists()) { ?>
25       <?= ActionButton("viewsource", _("View Source")) ?>
26     <?php } ?>
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]")) ?>
32     <?php } ?>
33   </ul>
34 </div>
35
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;">
40   <ul>
41      <?php if ($isAdmin or $mayEdit) { ?>
42       <?= ActionButton('rename') ?>
43      <?php } ?>
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) ?>
48      <?php } ?>
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') ?>
54      <?php }} ?>
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."))) ?>
65      <?php }} ?>
66   </ul>
67   </div>
68 </div>
69 <?php } //isSignedIn ?>