]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/MonoBook/templates/actionbar.tmpl
fix MSIE edits with MonoBook.
[SourceForge/phpwiki.git] / themes / MonoBook / templates / actionbar.tmpl
1 <?php // -*-php-*- ?>
2 <!-- $Id: actionbar.tmpl,v 1.10 2006-12-06 22:05:38 rurban Exp $ -->
3 <?php $dbh = $request->getDbh(); ?>
4 <div id="p-cactions" class="portlet">
5     <h5>Views</h5>
6     <ul>
7     <?php if (!string_ends_with($page->getName(), _("Discussion"))) { ?>
8     <?php $talk = new WikiPageName('Talk:'.$page->getName()); ?>
9       <?= ActionButton(array(),
10                        $request->isActionPage($request->getArg("action")) ? _("ActionPage") : _("Article"), 
11                        $talk->getParent(), array('class'=>"selected")) ?>
12       <?php if (!$request->isActionPage($request->getArg("action"))) { ?>
13         <?php if ($dbh->isWikiPage($talk->getName())) { ?>
14           <?= ActionButton(array('action'=>'browse'), _("Discussion"), $talk->getName()) ?>
15         <?php } else { ?>
16           <?= ActionButton(array('action'=>'create',
17                               'template'=>'TemplateTalk'),
18                            _("Discussion"), $talk->getName()) ?>
19         <?php } ?>
20       <?php } ?>
21     <?php } else {
22       $talk = new WikiPageName($page->getName()); ?>
23       <?= ActionButton(array(),_("Article"), $talk->getParent()) ?>
24       <?= ActionButton(array(),_("Discussion"), $talk->getParent(), array('class'=>"selected")) ?>
25     <?php } ?>
26     <?php if ((!$page->get('locked') || $user->isAdmin()) and !(empty($revision))) { ?>
27       <?= ActionButton("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) ?>
28     <?php } else { ?>
29       <?= ActionButton("viewsource", _("View Source")) ?>
30     <?php } ?>
31     <?= ActionButton(_("PageHistory")) ?>
32     <?= ActionButton("diff") ?> 
33     <? if ( $user->isSignedIn() ) { ?>
34       <?= ActionButton("WatchPage", _("Watch")) ?>
35     <?php } ?>
36     </ul>
37 </div>
38 <div class="portlet" id="p-tbx">
39   <h5>Special Actions</h5>
40   <div class="pBody">
41   <ul>
42     <? if ( $user->isSignedIn() ) { ?>
43      <?php if ($user->isAdmin() or mayAccessPage('change', $page->getName())) { ?>
44       <?= ActionButton($page->get('locked') ? 'unlock' : 'lock') ?>
45      <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $page->getName())) { ?>
46       <?= ActionButton('chown') ?>
47       <?= ActionButton('setacl') ?>
48      <?php }} ?>
49      <?php if ($user->isAdmin() or mayAccessPage('remove', $page->getName())) { ?>
50       <?= ActionButton('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?>
51       <?= ActionButton('remove') ?>
52      <?php } ?>
53     <?php } ?>
54     <?= ActionButton(array('action'=>'PageInfo'),
55                         _("Info"),$page->getName()) ?>
56     <?= ActionButton(_("PageHistory")) ?>
57     <?= ActionButton("diff") ?> 
58     <?= ActionButton(_("PageDump")) ?>
59     <?php if (DEBUG & _DEBUG_SQL and USECACHE) {
60       $PurgeCache = Button(array('nocache' => 'purge'),
61                      _("PurgeHtmlCache"), $page->getName());
62       $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed.")); ?>
63       <?= $PurgeCache ?>
64     <?php } ?>
65   </div>
66   </ul>
67 </div>