]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/MonoBook/templates/navbar.tmpl
fix MSIE edits with MonoBook.
[SourceForge/phpwiki.git] / themes / MonoBook / templates / navbar.tmpl
1 <?php // -*-php-*- ?>
2 <!-- $Id: navbar.tmpl,v 1.5 2006-12-06 22:05:39 rurban Exp $ -->
3 <?php
4 // With MonoBook it is similar to Sidebar, named boxes at the left.
5 // actiobuttons, navigation, search, toolbox
6 ?>
7 <!-- The left navigation/search bar -->
8 <!-- Here you should add favorite Links and Categories -->
9 <div class="portlet" id="p-navigation">
10   <h5>Navigation</h5>
11   <div class="pBody">
12     <ul>
13       <li id="n-mainpage"><?= WikiLink(HOME_PAGE) ?></li>
14       <li id="t-recentchanges"><?= WikiLink(_("RecentChanges")) ?></li>
15       <li id="t-recentcomments"><?= WikiLink(_("RecentComments")) ?></li>
16       <li id="n-randompage"><?= WikiLink(_("RandomPage")) ?></li>
17       <li id="n-help"><a href="http://www.phpwiki.org/PhpWikiDocumentation">Help</a></li>
18     </ul>
19   </div>
20 </div>
21 <div class="portlet" id="p-search">
22   <h5>Search</h5>
23   <div class="pBody">
24     <form action="<?= WikiURL(_("TitleSearch"))?>"
25       method="get" accept-charset="<?=$charset?>">
26       <?= WikiLink(_("FindPage"), "searchButton",_("Search:")) ?>
27       <input type="hidden" name="auto_redirect" value="1" />
28       <input type="text"  name="s" size="12" maxlength="256"
29               title='<?=_("Quick Search")?>'
30               onmouseover="window.status='<?=_("Quick Search")?>'; return true;"
31               onmouseout="window.status=''; return true;" />
32     </form>
33   </div>
34 </div>
35 <div class="portlet" id="p-tb">
36   <h5>Toolbox</h5>
37   <div class="pBody">
38     <ul>
39     <?php if (!empty($revision)) { ?>
40       <li id="t-whatlinkshere"><?= Button(array('action'=>'BackLinks'), _("What links here"), $page->getName()) ?></li>
41       <li id="t-whatlinkshere"><?= Button(array('action'=>'LikePages'),_("Like Pages"), $page->getName()) ?></li>
42     <?php } ?>
43     <?php $links = $page->getPageLinks(); if ($links->count() > 1) { ?>
44       <li id="t-recentchangeslinked"><?= $WikiTheme->makeLinkButton($revision,_("RelatedChanges"),_("RelatedChanges")) ?></li>
45     <?php } ?> 
46     <li><?= Button(array('page' => $page->getName()),_("Upload file"),_("UpLoad"),'wikiunsafe') ?></li>
47     <?php if (!empty($user) && $user->isAdmin()) { ?>
48       <li><?= WikiLink(_("PhpWikiAdministration"), "","Administration") ?></li>
49     <?php } ?>
50     <?php if (!empty($user) && $user->isSignedIn()) { ?>
51       <li><?= WikiLink(_("UserPreferences"),"","Preferences") ?></li>
52     <?php } ?>
53     <li>
54       <?php $PrintableLink = $WikiTheme->makeButton(_("Printable version"), "javascript:PrinterStylesheet();", 'wikiaction'); ?>
55 <script type="text/javascript"><!--
56 // This script was provided for free by
57 // http://www.howtocreate.co.uk/tutorials/javascript/domcss
58 // See http://www.howtocreate.co.uk/jslibs/termsOfUse.html
59 function getAllSheets() {
60   if( !window.ScriptEngine && navigator.__ice_version ) { return document.styleSheets; }
61   if( document.getElementsByTagName ) { var Lt = document.getElementsByTagName('link'), St = document.getElementsByTagName('style');
62   } else if( document.styleSheets && document.all ) { var Lt = document.all.tags('LINK'), St = document.all.tags('STYLE');
63   } else { return []; } for( var x = 0, os = []; Lt[x]; x++ ) {
64     var rel = Lt[x].rel ? Lt[x].rel : Lt[x].getAttribute ? Lt[x].getAttribute('rel') : '';
65     if( typeof( rel ) == 'string' && rel.toLowerCase().indexOf('style') + 1 ) { os[os.length] = Lt[x]; }
66   } for( var x = 0; St[x]; x++ ) { os[os.length] = St[x]; } return os;
67 }
68 function changeStyle() {
69   for( var x = 0, ss = getAllSheets(); ss[x]; x++ ) {
70     if( ss[x].title ) { ss[x].disabled = true; }
71     for( var y = 0; y < arguments.length; y++ ) {
72      if( ss[x].title == arguments[y] ) { ss[x].disabled = false; }
73 } } }
74 function PrinterStylesheet() {
75   changeStyle('Printer');
76 }
77 document.write('<?= $PrintableLink ?>'); // -->
78 </script>
79 <noscript>
80   <?= $WikiTheme->makeButton(_("Printable version"), "?format=printable", 'wikiaction') ?>
81 </noscript>
82 </li>
83     <?php if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) { 
84       // Do not display the pdf icon
85       $btn = new Button(_("Display as Pdf"), WikiURL($page->getName(), array('action' => 'pdf')), 'wikiaction');
86       ?>
87       <li><?= $btn ?></li>
88     <?php } ?>
89   </ul>
90   </div>
91 </div>
92 <!-- end of the left (by default at least) column -->
93