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