<!DOCTYPE html>
{% import 'macros.html' as macros %}
<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">
    <!-- The above 3 meta tags *must* come first -->
    {% block head %}
    <title>{%block title%}{%endblock%} — {{config['displayed_site_name']}} HERA Librarian</title>

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

    <style>
      .navbar { margin-bottom: 1px; }
      .footer { margin-top: 20px; }
      .librarian-time-bar {
        padding-right: 15px;
        font-size: 0.7em;
        text-align: right;
      }
    </style>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    {% endblock %}
  </head>
  <body>
    <nav class="navbar navbar-default">
      <div class="container-fluid">
	<div class="navbar-header">
	  <a class="navbar-brand" href="/">{{config['displayed_site_name']}} HERA Librarian</a>
	</div>
	<div>
	  <ul class="nav navbar-nav">
	    <li class="dropdown">
	      <a href="#" class="dropdown-toggle" data-toggle="dropdown">Observing Sessions
		<b class="caret"></b></a>
	      <ul class="dropdown-menu">
		<li><a href="/sessions/all">All, basic information</a></li>
		<li><a href="/sessions/recent">Recent, detailed information</a></li>
	      </ul>
	    </li>
	    <li><a href="/observations">Observations</a></li>
	    <li class="dropdown">
	      <a href="#" class="dropdown-toggle" data-toggle="dropdown">Search
		<b class="caret"></b></a>
	      <ul class="dropdown-menu">
		<li><a href="/search-files">Files</a></li>
		<li><a href="/search-obs">Observations</a></li>
		<li><a href="/search-sessions">Sessions</a></li>
	      </ul>
	    </li>
	    <li class="dropdown">
	      <a href="#" class="dropdown-toggle" data-toggle="dropdown">Help
		<b class="caret"></b></a>
	      <ul class="dropdown-menu">
                <!-- TODO: have this link point to the specific version of the running Librarian -->
		<li><a href="https://github.com/HERA-Team/librarian/blob/master/docs/Index.md">Main help</a></li>
                <li><a href="http://hera.pbworks.com/w/page/117934572/Librarian">HERA-specific topics</a></li>
	      </ul>
	    </li>
          </ul>
	  <ul class="nav navbar-nav navbar-right">
	    <li class="dropdown">
	      <a href="#" class="dropdown-toggle" data-toggle="dropdown">Server Admin
		<b class="caret"></b></a>
	      <ul class="dropdown-menu">
		<li><a href="/stores">Stores</a></li>
		<li><a href="/tasks">Tasks</a></li>
		<li><a href="/standing-orders">Standing Orders</a></li>
	      </ul>
	    </li>
	    <li><a href="/logout">Logout</a></li>
	  </ul>
        </div>
      </div>
    </nav>

    <div class="librarian-time-bar">Current time: {{current_time_info}}</div>

    <div class="container-fluid">
      {% block flashes %}
        {% with messages = get_flashed_messages() %}
          {% if messages %}
          {% for message in messages %}
            <div class="alert alert-warning">{{message}}</div>
	  {% endfor %}
          {% endif %}
        {% endwith %}
      {% endblock %}
      {% block content %}
      {% endblock %}
    </div>

    <footer class="footer navbar-default">
      <p class="text-muted text-center"><small><small>{{version_info}}</small></small></p>
    </footer>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  </body>
</html>
