<?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">
  <div class="_pBody">
    <ul>
      <li id="n-mainpage"><?php echo WikiLink(HOME_PAGE) ?></li>
      <li><?php echo WikiLink("Help:HowToUseWiki","auto","How to use this Wiki") ?></li>
      <li><?php echo WikiLink("Help:AddingPages","auto","Adding Pages") ?></li>
      <li><?php echo WikiLink("CategoryCategory","auto","List all Categories") ?></li>
    </ul>
  </div>
</div>

<div class="portlet" id="p-nav1">
  <h2><?php echo _("Main Categories")?></h2>
  <div class="pBody">
    <ul>
      <li><?php echo WikiLink("CategoryWikiPlugin") ?></li>
      <li><?php echo WikiLink("CategoryActionPage") ?></li>
    </ul>
  </div>
</div>

<div class="portlet" id="p-search">
  <h2><?php echo _("Search")?></h2>
  <div class="pBody">
<?php echo Template("search",
             array('SEARCH_BEFORE' => ''/*HTML::h2(WikiLink(_("FindPage")))*/,
		   'SEARCH_AFTER'  => HTML::Raw('<br /><input type="submit" name="searchtype" value="title" class="searchButton" title="Press to perform a wiki title search" />&nbsp;<input type="submit" name="searchtype" value="fulltext" class="searchButton" title="Wiki fulltext search" />'))) ?>
  </div>
</div>

<div class="portlet" id="p-tb">
      <h2><?php echo _("Toolbox") ?><?php echo $WikiTheme->folderArrow('p-tb', 'Open') ?></h2>
  <div class="pBody" id="p-tb-body">
    <ul>
    <li><?php $link = WikiLink(_("RecentChanges"), "",_("RecentChanges")); $link->setAttr("accesskey","r"); $link->addTooltip(_("The list of recent changes in the wiki.")." [$p-r]"); ?><?php echo $link ?> </li>
    <li><?php echo WikiLink(_("RecentNewPages"), "",_("RecentNewPages")) ?></li>
    <?php if (!empty($revision)) { ?>
      <li id="t-whatlinkshere"><?php echo Button(array('action'=>_("BackLinks")), _("What links here"), $page->getName()) ?></li>
    <?php } ?>
    <?php if (!empty($user) && $user->isSignedIn()) { ?>
      <li><?php $link = WikiLink(_("UpLoad"),"",_("Upload File")); $link->setAttr("accesskey","u"); $link->addTooltip(_("Upload images or media files")." [$p-u]"); ?><?php echo $link ?></li>
      <li><?php echo WikiLink(_("UserPreferences"), "",_("Preferences")) ?></li>
    <?php } ?>
      <?php $PrintableLink = $WikiTheme->makeButton(_("Printable version"), "javascript:PrinterStylesheet();", 'wikiaction'); ?>
<script type="text/javascript"><!--
document.write('<li><?php echo $PrintableLink ?></li>'); // -->
</script>
    <?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 ?> &nbsp;&nbsp; <?php echo WikiLink("Help/Display as Pdf","",HTML::img(array('src'=>$WikiTheme->_findData('images/mini_help.png'),'border'=>0,'width'=>12,'height'=>13,'alt'=>'pdf-help','title'=>"How to generate multi-page PDFs"))) ?></li>
    <?php } ?>
    <li><?php echo WikiLink(_("AllPages")) ?></li>
    <?php if (!empty($user) && $user->isAdmin()) { ?>
      <li><?php echo WikiLink(_("PhpWikiAdministration"), "", _("Administration")) ?></li>
    <?php } ?>
  </ul>
  </div>
</div>
<?php echo Template('rc') ?>
<?php echo Template('tags') ?>
<!-- end of the left (by default at least) column -->
