<script>
Mousetrap.bind(['e'], function( e ) {
  e.preventDefault();
  window.location = "/edit" + window.location.pathname;
  return false;
});
</script>
<div id="wiki-wrapper" class="page">
<div id="head">
  <h1>{{page_header}}</h1>
  <ul class="actions">
    <li class="minibutton">
      {{>searchbar}}
    </li>
    <li class="minibutton"><a href="{{base_url}}/"
       class="action-home-page">Home</a></li>
    <li class="minibutton"><a href="{{base_url}}/pages"
      class="action-all-pages">All</a></li>
    <li class="minibutton"><a href="{{base_url}}/fileview"
    class="action-fileview">Files</a></li>
    <li class="minibutton jaws">
      <a href="#" id="minibutton-new-page">New</a></li>
    {{#allow_uploads}}
    <li class="minibutton jaws">
      <a href="#" id="minibutton-upload-page">Upload</a></li>
    {{/allow_uploads}}
    {{#editable}}
    <li class="minibutton jaws">
      <a href="#" id="minibutton-rename-page">Rename</a></li>
    <li class="minibutton"><a href="{{base_url}}/edit/{{escaped_url_path}}"
       class="action-edit-page">Edit</a></li>
    {{/editable}}
    {{#page_exists}}
    <li class="minibutton jaws">
    <li class="minibutton"><a href="{{base_url}}/history/{{escaped_url_path}}"
       class="action-page-history">History</a></li>
    {{/page_exists}}
  </ul>
</div>
<div id="wiki-content">
<div class="{{#has_header}}has-header{{/has_header}}{{#has_footer}} has-footer{{/has_footer}}{{#has_sidebar}} has-sidebar has-{{bar_side}}bar{{/has_sidebar}}{{#has_toc}} has-toc{{/has_toc}}">
  {{#has_toc}}
  <div id="wiki-toc-main">
    {{{toc_content}}}
  </div>
  {{/has_toc}}
  {{#has_sidebar}}
  <div id="wiki-sidebar" class="gollum-{{sidebar_format}}-content">
    <div id="sidebar-content" class="markdown-body">
      {{{sidebar_content}}}
    </div>
  </div>
  {{/has_sidebar}}
  <div id="wiki-body" class="gollum-{{format}}-content">
    {{#has_header}}
    <div id="wiki-header" class="gollum-{{header_format}}-content">
      <div id="header-content" class="markdown-body">
        {{{header_content}}}
      </div>
    </div>
    {{/has_header}}
    <div class="markdown-body">
      {{{content}}}
    </div>
  </div>
  {{#has_footer}}
  <div id="wiki-footer" class="gollum-{{footer_format}}-content">
    <div id="footer-content" class="markdown-body">
      {{{footer_content}}}
    </div>
  </div>
  {{/has_footer}}
  </div>

</div>
<div id="footer">
  <p id="last-edit">Last edited by <b>{{author}}</b>, {{date}}</p>
  <p>
    <a id="delete-link" href="{{base_url}}/{{escaped_url_path}}" data-confirm="Are you sure you want to delete this page?"><span>Delete this Page</span></a>
  </p>
</div>
</div>

<form name="rename" method="POST" action="{{base_url}}/rename/{{escaped_url_path}}">
  <input type="hidden" name="rename"/>
  <input type="hidden" name="message"/>
</form>
