<?php // -*-php-*-
// $Id: navbar.tmpl 8166 2011-10-03 14:49:15Z vargenau $
?>
<?php
// With MonoBook it is similar to Sidebar, named boxes at the left.
// actionbuttons, navigation, search, toolbox
$p = $WikiTheme->tooltipAccessKeyPrefix();
?>
<!-- The left navigation/search bar -->
<!-- Here you should add favorite Links and Categories -->
<div class="portlet" id="p-navigation">
  <h5><?php echo _("Navigation") ?></h5>
  <div class="pBody">
    <ul>
      <li id="n-mainpage"><?php echo WikiLink(HOME_PAGE, "",_("Home Page")) ?></li>
      <li><? $link = WikiLink(_("RecentChanges"), "",_("Recent changes")); $link->setAttr("accesskey","r"); $link->addTooltip(_("The list of recent changes in the wiki.")." [$p-r]"); ?><?php echo $link ?></li>
      <li id="n-recentcomments"><?php echo WikiLink(_("RecentComments"), "",_("Recent comments")) ?></li>
      <li id="n-recentnewpages"><?php echo WikiLink(_("RecentNewPages"), "",_("Recent new pages")) ?></li>
      <li id="n-likepages"><?php echo Button(array('action'=>_("LikePages")),_("Like pages"), $page->getName()) ?></li>
      <li id="n-randompage"><?php echo WikiLink(_("RandomPage"), "",_("Random Page")) ?></li>
<li id="n-help"><?php echo WikiLink(_("PhpWikiDocumentation"),"",_("Help")) ?></li>
    </ul>
  </div>
</div>

<div class="portlet" id="p-search">
  <h5><?php echo _("Search") ?></h5>
  <div class="pBody">
<?php echo Template("search",
             array('SEARCH_BEFORE' => WikiLink(_("FindPage"), "",_("Find page")),
		   'SEARCH_AFTER' => HTML::input(array('id' => 'searchGoButton',
						       'type'=>'submit',
						       'value'=>_("Go"))))) ?>
<!-- <form action="<?php echo WikiURL(_("TitleSearch"))?>"
      method="get" accept-charset="<?php echo $charset?>">
      <?php echo WikiLink(_("FindPage"), "searchButton",_("Search:")) ?>
      <input type="hidden" name="auto_redirect" value="1" />
      <input type="text"  name="s" size="12" maxlength="256"
	      title='<?php echo _("Quick Search")?>'
	      onmouseover="window.status='<?php echo _("Quick Search")?>'; return true;"
	      onmouseout="window.status=''; return true;" />
    </form>
-->
  </div>
</div>

<div class="portlet" id="p-tb">
  <h5><?php echo _("Toolbox") ?></h5>
  <div class="pBody">
    <ul>
    <?php if ($revision) { ?>
      <li id="t-whatlinkshere"><?php echo Button(array('action'=>_("BackLinks")), _("What links here"), $page->getName()) ?></li>
    <?php } ?>
    <?php $links = $page->getPageLinks(); if ($links->count() > 1) { ?>
      <li id="t-recentchangeslinked"><?php echo $WikiTheme->makeLinkButton($revision,_("Related changes"),_("RelatedChanges")) ?></li>
    <?php } ?> 
    <?php if ($user->isAdmin()) { ?>
      <li><?php echo WikiLink(_("PhpWikiAdministration"), "", _("Administration")) ?></li>
    <?php } ?>
    <?php if ($user->isSignedIn()) { ?>
      <li><? $link = WikiLink(_("UpLoad"),"",_("Upload File")); $link->setAttr("accesskey","u"); $link->addTooltip(_("Upload images or media files")." [$p-u]"); ?><?php echo $link ?></li>
    <?php } ?>
    <li>
      <?php $PrintableLink = $WikiTheme->makeButton(_("Printable version"), "javascript:PrinterStylesheet();", 'wikiaction'); ?>
<script type="text/javascript"><!--
document.write('<?php echo $PrintableLink ?>'); // -->
</script>
<noscript>
  <?php echo $WikiTheme->makeButton(_("Printable version"), "?format=printable", 'wikiaction') ?>
</noscript>
</li>
    <?php if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) { 
      // Do not display the pdf icon
      $btn = new Button(_("Display as Pdf"), WikiURL($page->getName(), array('action' => 'pdf')), 'wikiaction');
      ?>
      <li><?php echo $btn ?></li>
    <?php } ?>
    <li><?php echo WikiLink(_("AllPages"), "",_("All pages")) ?></li>
  </ul>
  </div>
</div>
<!-- end of the left (by default at least) column -->

