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