{% load i18n %}
{% load markup %}
<!doctype html>
<html lang="en" class="no-js">
<head>
  <meta charset="utf-8">

  <!-- www.phpied.com/conditional-comments-block-downloads/ -->
  <!--[if IE]><![endif]-->

  <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
       Remove this if you use the .htaccess -->
  <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->

  <title>
    {% if is_dev %}
      (DEV)
    {% endif %}
    {% block title %}{% endblock %} - Inhouse-Web
  </title>
  <meta name="description" content="">
  <meta name="author" content="">

  <!--  Mobile Viewport Fix
        j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
  device-width : Occupy full width of the screen in its current orientation
  initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
  maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width
  -->
  <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">

  <!-- Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references -->
  <link rel="shortcut icon" href="/static/img/favicon.png">
  <link rel="apple-touch-icon" href="/static/img/apple-touch-icon.png">

  <!-- CSS : implied media="all" -->
  <link rel="stylesheet" href="/static/css/style.css?v=1">

  <!-- For the less-enabled mobile browsers like Opera Mini -->
  <link rel="stylesheet" media="handheld" href="/static/css/handheld.css?v=1">


  <!-- Grab Google CDN's jQuery. fall back to local if necessary -->
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  <script>!window.jQuery && document.write('<script src="/static/js/jquery.js"><\/script>')</script>

  <!--[if IE]><script language="javascript" type="text/javascript" src="/static/js/excanvas.min.js"></script><![endif]-->
  <script language="javascript" type="text/javascript" src="/static/js/stopwatch.js"></script>



  <!--[if lt IE 7 ]>
    <script src="js/dd_belatedpng.js?v=1"></script>
  <![endif]-->




  <script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
  <!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
  <script src="js/modernizr-1.5.min.js"></script>

</head>

<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->

<!--[if lt IE 7 ]> <body class="ie6"> <![endif]-->
<!--[if IE 7 ]>    <body class="ie7"> <![endif]-->
<!--[if IE 8 ]>    <body class="ie8"> <![endif]-->
<!--[if IE 9 ]>    <body class="ie9"> <![endif]-->
<!--[if gt IE 9]>  <body>             <![endif]-->
<!--[if !IE]><!--> <body>         <!--<![endif]-->

<div id="help" style="display:none;">
  <table cellpadding="0">
    <tbody>
      <tr>
	<td>{% trans "Keyboard shortcuts" %}</td>
	<td>
	  <a href="">{% trans "Open in a new window" %}</a>
	  " | "
	  <a href="">{% trans "Close" %}</a>
	</td>
      </tr>
    </tbody>
  </table>
  <table cellpadding="0">
    <tbody>
      <tr>
	<td>
	  <table cellpadding="0">
	    <tbody>
	      <tr>
		<th></th>
		<th>{% trans "Navigation" %}</th>
	      </tr>
	      <tr>
		<td><span class="letter">g</span><span>{% trans "then" %}</span><span class="letter">d</span></td>
		<td>{% trans "Go to dashboard" %}</td>
	      </tr>
	      <tr>
		<td><span class="letter">g</span><span>{% trans "then" %}</span><span class="letter">c</span></td>
		<td>{% trans "Got to current day" %}</td>
	      </tr>
	    </tbody>
	  </table>
	</td>
	<td>
	  <table cellpadding="0">
	    <tbody>
	      <tr>
		<th></th>
		<th>{% trans "Timer" %}</th>
	      </tr>
	    </tbody>
	  </table>
	</td>
      </tr>
    </tbody>
  </table>
</div>

<!--

<div id="help" style="display: none;">
  <p><div style="text-align: center; margin-bottom: 20px;"><strong>{% trans "Keyboard Shortcuts" %}</strong></div></p>
  <table width="100%">
    <tr valign="top">
      <td>
        <table width="100%">
          <tr>
            <td></td><th>{% trans "Navigation"%}</th>
          </tr>
          <tr><td class="shortcut"><span class="letter">d</span> <b>:&nbsp;</b></td><td>{% trans "to the Dashboard" %}</td></tr>
          <tr><td class="shortcut"><span class="letter">v</span> <b>:&nbsp;</b></td><td>{% trans "next day" %}</td></tr>
		  <tr><td class="shortcut"><span class="letter">c</span> <b>:&nbsp;</b></td><td>{% trans "current day" %}</td></tr>
		  <tr><td class="shortcut"><span class="letter">x</span> <b>:&nbsp;</b></td><td>{% trans "previous day" %}</td></tr>
      </table>
      </td>
      <td>
        <table width="100%">
          <tr>
          <td></td><th>Timer</th>
        </tr>
        <tr><td class="shortcut"><span class="letter">+</span> <b>:&nbsp;</b></td><td>add timer</td></tr>
      </table>
      </td>
    </tr>
  </table>
  </div>
-->


  <div id="container">
	{% if messages %}
	  <div class="wrapper">
        <div class="message-box">
		<ul>
			{% for message in messages %}
				<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>
				  {{ message|markdown }}
				</li>
			{% endfor %}
		</ul>
		</div>
	  </div>
	{% endif %}

    <header>
      <div id="liner">
        <div id="logo">
          Inhouse-Web
        </div>
        <div style="width: 100%; text-align: right; float: top; border-bottom: 1px solid #C9D7F1;">
          {% if user.id %}
	    <div style="padding: 5px;">
	      {% if user.email and user.username %}
                <strong>{{ user.email }}</strong> ({{ user.username }})
	      {% else %}
		<strong>{{ user.username }}</strong>
              {% endif %}
            |
            <a href="/profile">{% trans "Profile" %}</a>
            |
            <a href="/settings">{% trans "Settings" %}</a>
            |
            <a href="{% url django.contrib.auth.views.logout %}">{% trans "Sign out" %}</a>
	    </div>
          {% endif %}
        </div>
      </div>
    </header>

    <div id="main">
	  <nav>
	  <ul>
		{% if user.id %}
		  <li><a href="{% url inhouse.views.dashboard %}">{% trans "Dashboard" %}</a></li>
		  <li><a href="{% url inhouse.views.time %}">{% trans "Time" %}</a></li>
		  <li><a href="/projects">{% trans "Projects" %}</a></li>
		  <li><a href="/company">{% trans "Company" %}</a></li>
		  {% if user.is_superuser %}
			<li><a href="/admin" target="_blank">{% trans "Administration" %}</a></li>
		  {% endif %}
		{% else %}
		  <li><a href="/">{% trans "Login" %}</a></li>
		{% endif %}
	  </ul>
	  <!--
	  <form id="searchform" method="get" action="/search/">
		<input class="search" id="s" type="text" onblur="if ($('#s').val().trim()==''){$('#s').val('{% trans 'Search' %}');}" onfocus="if ($('#s').val()=='{% trans 'Search' %}'){$('#s').val('');}" value="{% trans 'Search' %}" name="s"/>
	  </form>
	  -->
	</nav>

	<nav id="sub-navigation">
      {% block sub-navigation %}{% endblock %}
    </nav>

	<section id="actions">
	  {% block actions %}{% endblock %}
	</section>

	<section id="intro">
	  <h1 style="padding: 5px; margin-left: 10px;">
        {% block page-title %}{% endblock %}
      </h1>
	</section>

	<section id="content">
	  <aside id="left">
		<p>
		  {% if user.id %}
		    {% include "calendar.html" %}
			{% include "timer.html" %}
		  {% endif %}
		  {% block sidebar %}{% endblock %}
		</p>
	  </aside>
	  <section id="main-content">
		{% if form.errors %}
		  {{ form.errors }}
		{% endif %}
		{% block content %}{% endblock %}
	  </section>
	</section>
    </div>

    <footer>
	  {% include "footer.html" %}
    </footer>
  </div> <!--! end of #container -->

  <script src="/static/js/script.js?v=1"></script>
  <script src="/static/js/plugins.js?v=1"></script>

  <script type="text/javascript">
  <!--
  var helpDisplayed = false;
  document.onclick = JS_clickCommon;
  function keyPressIntermediary(evt) {
    return JS_shortcutHandler(evt);
  }
  document.onkeypress = keyPressIntermediary;
  -->
  </script>

</body>
</html>
