<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="Ed McDonagh">
    <meta name="copyright" content="2013 The Royal Marsden NHS Foundation Trust">
    <meta name="licence" content="GPLv3">
    <link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico">

    <title>OpenREM Browser</title>

    <!-- Bootstrap core CSS -->
    <link href="{{ STATIC_URL }}css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="{{ STATIC_URL }}css/openrem.css" rel="stylesheet">
    <link href="{{ STATIC_URL }}css/openrem-extra.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="{{ STATIC_URL }}js/html5shiv.js"></script>
      <script src="{{ STATIC_URL }}js/respond.min.js"></script>
    <![endif]-->

    {% block headextras %}
    {% endblock %}

  </head>





  <body>
    <div class="navbar navbar-default navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/openrem/">OpenREM</a>
        </div>
        <div class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            {% block navbar %}
            <li><a href="/openrem/ct">CT</a></li>
            <li><a href="/openrem/rf">Fluoroscopy</a></li>
            <li><a href="/openrem/mg">Mammography</a></li>
            {% endblock %}
          </ul>
          {% block loginlink %}
          <ul class="nav navbar-nav navbar-right">
            {% if admin.exportperm or admin.adminperm %}
            {% block exportnav %}
            <li><a href="/openrem/export">Exports</a></li>
            {% endblock %}
            {% endif %}

            {% if admin.adminperm %}
            {% block adminnav %}
            <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-blank fa-fw"></i>Admin <b class="caret"></b></a>
            {% endblock %}
              <ul class="dropdown-menu">
                <li><a href="/openrem/admin/sizeupload"><i class="fa fa-external-link fa-fw"></i>Import patient size info</a></li>
                <li><a href="/openrem/admin/sizeimports"><i class="fa fa-envelope fa-fw"></i>Previous patient size imports</a></li>
              </ul>
            </li>
            {% endif %}

            <p class="navbar-text navbar-right">
              <span class="glyphicon glyphicon-user"></span>
              {% if user.is_authenticated %}
               Welcome {{ user.get_full_name }} -
               <a href="/logout/" class="navbar-link">logout</a>
              {% else %}
               Not signed in - 
              <a href="/login/?next={{ request.get_full_path|urlencode }}" class="navbar-link">login</a>
              {% endif %}
            </p>
          </ul>
          {% endblock %}
        </div><!--/.nav-collapse -->
      </div>
    </div>

    <div class="container-fluid">
      <div class="openrem-toprow">
        {% block toprow %}
        {% endblock %}
      </div>
      {% block mainblock %}
      {% endblock %}

      <hr>
      <footer>
{% if admin.openremversion %}
        <p>OpenREM version {{ admin.openremversion }} is &copy; 2014 The Royal Marsden NHS Foundation Trust</p>
{% else %}
        <p>OpenREM is &copy; 2014 The Royal Marsden NHS Foundation Trust</p>
{% endif %}
      </footer>

    </div><!-- /.container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="{{ STATIC_URL }}js/jquery-1.11.0.min.js"></script>
    <script src="{{ STATIC_URL }}js/bootstrap.min.js"></script>

    {% block jsblock %}
    {% endblock %}

  </body>
</html>
