<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <title>{{systemServiceName}} - {% block title %}Home{% endblock %}</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  {% block mastercss %}
  <link rel="stylesheet" href="{{ mediaPrefix }}/style/master.css" type="text/css" media="screen, print" title="Master stylesheet" charset="utf-8" />
  {% endblock %}
  <link rel="shortcut icon" href="{{ mediaPrefix }}/images/favicon.ico" type="image/x-icon" />
  {% block dojoHead %} {% endblock %}
  {% block mootools %}
   <script type="text/javascript" src="{{ mediaPrefix }}/behaviour/vendor/mootools-beta-1.2b2.js"></script>
   <script type="text/javascript" src="{{ mediaPrefix }}/behaviour/extensions.js"></script>
  {% endblock %}
  {% block masterjs %}
  <script type="text/javascript" src="{{ mediaPrefix }}/behaviour/master.js"></script>
  {% endblock %}
  {% block pagehead %} {% endblock %}
</head>
<body{% block bodyparams %}{% endblock %}>

{% comment %}
If the body doesn't have a class attribute set, don't leave empty class attributes hanging around, please; it's invalid XHTML
{% endcomment %}

<div id="airlock">
  <!--[if IE]>
    <hr class="holder" />
  <![endif]-->
  <div id="top">
    <div id="top-inner">
      {% block topbar %}
      <div id="top-bar">
        
        {% if session %}
        <p>
          Logged in as 
          <a href="{{ uriPrefix }}/persons/{{ session.person.name }}/">{% firstof session.person.fullname session.person.name %}</a>
          {% comment %}| <a href="{{ uriPrefix }}/logout{% firstof redirect path %}"><strong>Logout</strong></a>{% endcomment %}
          | <a href="{{ uriPrefix }}/logout/">Logout</a>
          {% if view.canApprovePersons %}
            {% if view.registry.persons.getPending.count %}
          |
            <a href="{{ uriPrefix }}/persons/pending/">
            Pending Registrations ({{ view.registry.persons.getPending.count }})
            </a>
        </p>
            {% endif %}
          {% endif %}
        {% else %}
        <form action="{{ uriPrefix }}/login/" method="post" id="top-login-form">
          <p>
            {% if view.canCreatePerson %}<a href="{{ uriPrefix }}/persons/create/">Register</a> or {% endif %}log in:
            <label for="loginform-name" class="hidden">Name:</label>
            <input type="text" id="loginform-name" name="name" title="Name" />
            <label for="loginform-password" class="hidden">Password:</label>
            <input type="password" id="loginform-password" name="password" title="Password" />
            <input type="submit" id="loginform-submit" name="submit" value="Log in &raquo;" />
            <input type="hidden" name="returnPath" value="{{ returnPath }}" />
          </p>
          
        </form>
        {% endif %}
      </div><!-- /top-bar -->
      {% endblock %}
      
    {% block heading %}
    <h2><a href="{{uriPrefix}}/" title="{{ systemServiceName }} Home">{{ systemServiceName }}</a></h2>
    {% endblock %}
    
    </div><!-- /top-inner -->
     
    {% block navigation %} 
    <h3 class="hidden">Sections:</h3>
    <ul id="navigation">
      {% block majornavigation %}
    
        {% for item in majorNavigation %}
        <li>
          <a{% if item.isCurrentItem %} id="current"{% endif %} href="{{uriPrefix }}{{ item.url }}" title="{{ item.title }}">{{ item.title }}</a>
        </li>
        {% endfor %}
    
      {% endblock %}     
    </ul>
    
    <h3 class="hidden">In this section:</h3>
    <ul id="subnav">
      {% block minornavigation %}
    
      {% for item in minorNavigation %}
      <li>
        <a{% if item.isCurrentItem %} id="sub-current"{% endif %} href="{{ uriPrefix }}{{ item.url }}" title="{{ item.title }}">{{ item.title }}</a>
      </li>
      {% endfor %}
    
      {% endblock %}
    </ul>
    {% endblock %}
       
    <!--[if IE]>
    <hr class="holder" />
    <![endif]-->
    
  </div><!-- /top -->
  
  <p class="hidden"><a href="#main" title="Skip to page content">[ Skip to main content ]</a></p> 
  
  <div id="primary" class="sidebar">
    {% block primarysidebar %}
    {% endblock %}
    
    <!--[if IE]>
    <hr class="primary" />
    <![endif]-->
    
  </div><!-- /primary -->

  <div id="secondary" class="sidebar">
    {% block secondarysidebar %}
    {% endblock %}
    
    <!--[if IE]>
    <hr class="secondary" />
    <![endif]-->
    
  </div><!-- /secondary -->
  
  <div id="main">
    {% block content %}
      <p>Master content template placeholder &hellip; please replace me.</p>
    {% endblock %}
    
    <div id="footer">
      {% block footer %}
      <p>
      <a href="http://validator.w3.org/check/referer" title="Valid XHTML 1.1">XHTML</a>
      | <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>
      | Powered by <a href="http://appropriatesoftware.net/scanbooker">ScanBooker {{systemVersion}}</a>
        {% if view.isDebug %}
      | Page created {{ pageCreated }}
        {% endif %}
      </p>
      {% endblock %}
    </div><!-- /footer -->
    
    <!--[if IE]>
    <hr class="main" />
    <![endif]-->
    
  </div><!-- /main -->

</div><!-- /airlock -->


</body>
</html>
