]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/MonoBook/templates/actionbar.tmpl
add ENABLE_DISCUSSION_LINK dependency (to turn it off for 1.3.11)
[SourceForge/phpwiki.git] / themes / MonoBook / templates / actionbar.tmpl
1 <?php // -*-php-*- ?>
2 <!-- $Id: actionbar.tmpl,v 1.4 2005-04-06 06:41:05 rurban Exp $ -->
3 <?php
4 if ((!$page->get('locked') || $user->isAdmin()) and isset($revision))
5       $EditB = Button("edit",
6                       $revision->isCurrent() ? _("Edit") : _("Edit Old Revision"));
7   else
8       $EditB = Button("viewsource", _("View Source"));
9 $Sep = HTML::raw('<li>');
10 $dbh = $request->getDbh();
11 ?>
12 <div id="p-cactions" class="portlet">
13     <h5>Views</h5>
14     <ul>
15     <?= $EditB ?>
16     <? if ( $user->isSignedIn() ) { ?>
17      <?php if ($user->isAdmin() or mayAccessPage('change',$page->getName())) { ?>
18       <?=$Sep?><?= Button($page->get('locked') ? 'unlock' : 'lock') ?>
19       <?php if (ENABLE_PAGEPERM) { ?>
20         <?=$Sep?><?= Button('chown') ?>
21         <?=$Sep?><?= Button('setacl') ?>
22      <?php }} ?>
23      <?php if ($user->isAdmin() or mayAccessPage('remove',$page->getName())) { ?>
24       <?=$Sep?><?= Button('remove') ?>
25      <?php } ?>
26     <?php } ?>
27     <?php if (!string_ends_with($page->getName(), _("Discussion"))) { ?>
28       <?=$Sep?><?= Button(array('action'=>$dbh->isWikiPage('Talk:'.$page->getName()) ? 'browse' : 'create', 
29                               'template'=>'TemplateTalk'),
30                         _("Discussion"),'Talk:'.$page->getName()) ?>
31       <?php } else { ?>
32       <?=$Sep?><?= Button(array(),_("Article"),$page->getName()) ?>
33     <?php } ?>
34     <?=$Sep?><?= Button(array('action'=>'PageInfo'),
35                         _("Info"),$page->getName()) ?>
36 <?php if (((defined('DEBUG') and DEBUG and $request->getArg('action') == 'browse')) || $user->isAdmin()) { ?> 
37       <!-- Buttons really only for debugging -->
38       <?=$Sep?><?= Button(_("PageHistory")) ?>
39       <?=$Sep?><?= Button("diff") ?> 
40       <?=$Sep?><?= Button(_("PageDump")) ?>
41 <?php
42      $PurgeCache = Button(array('nocache' => 'purge'),
43                      _("PurgeHtmlCache"), $page->getName());
44      $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed."));
45 ?>
46     <?=$Sep?><?= $PurgeCache ?>
47     <!-- End debugging buttons -->
48     <?php } ?>
49   </div>