]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/MonoBook/templates/actionbar.tmpl
fix Article link, reorder Discussion before admin actions, use default SEP in info...
[SourceForge/phpwiki.git] / themes / MonoBook / templates / actionbar.tmpl
1 <?php // -*-php-*- ?>
2 <!-- $Id: actionbar.tmpl,v 1.5 2005-08-28 11:04:08 rurban Exp $ -->
3 <?php
4 $dbh = $request->getDbh();
5 $Sep = HTML::raw("<li>");
6 ?>
7 <div id="p-cactions" class="portlet">
8     <h5>Views</h5>
9     <ul>
10     <?php if ((!$page->get('locked') || $user->isAdmin()) and $revision) { ?>
11       <?= Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) ?>
12     <?php } else { ?>
13       <?= Button("viewsource", _("View Source")) ?>
14     <?php } ?>
15     <?php if (!string_ends_with($page->getName(), _("Discussion"))) { ?>
16     <?php $talk = new WikiPageName('Talk:'.$page->getName()); ?>
17       <?=$Sep?><?= Button(array('action'=>$dbh->isWikiPage($talk->getName()) ? 'browse' : 'create', 
18                               'template'=>'TemplateTalk'),
19                           _("Discussion"), $talk->getName()) ?>
20     <?php } else { ?>
21       <?php $talk = new WikiPageName($page->getName()); ?>
22       <?=$Sep?><?= Button(array(),_("Article"), $talk->getParent()) ?>
23     <?php } ?>
24     <? if ( $user->isSignedIn() ) { ?>
25      <?php if ($user->isAdmin() or mayAccessPage('change', $page->getName())) { ?>
26       <?=$Sep?><?= Button($page->get('locked') ? 'unlock' : 'lock') ?>
27      <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $page->getName())) { ?>
28       <?=$Sep?><?= Button('chown') ?>
29       <?=$Sep?><?= Button('setacl') ?>
30      <?php }} ?>
31      <?php if ($user->isAdmin() or mayAccessPage('remove', $page->getName())) { ?>
32       <?=$Sep?><?= Button('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?>
33       <?=$Sep?><?= Button('remove') ?>
34      <?php } ?>
35     <?php } ?>
36     <?=$Sep?><?= Button(array('action'=>'PageInfo'),
37                         _("Info"),$page->getName()) ?>
38 <?php 
39     if (((defined('DEBUG') and DEBUG and $request->getArg('action') == 'browse')) || $user->isAdmin()) { ?> 
40       <!-- Buttons really only for debugging -->
41       <?=$Sep?><?= Button(_("PageHistory")) ?>
42       <?=$Sep?><?= Button("diff") ?> 
43       <?=$Sep?><?= Button(_("PageDump")) ?>
44 <?php
45     if (DEBUG & _DEBUG_SQL and USECACHE) {
46       $PurgeCache = Button(array('nocache' => 'purge'),
47                      _("PurgeHtmlCache"), $page->getName());
48       $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed."));
49 ?>
50       <?=$Sep?><?= $PurgeCache ?>
51 <?php } ?>
52       <!-- End debugging buttons -->
53     <?php } ?>
54   <?php if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) { ?> 
55     <?=$Sep?><?= Button("pdf") ?>
56   <?php } ?>
57 </div>