<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{% load i18n %}
{% load telemeta_utils %}
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>

<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>{%block head_title %}{% organization %} - Telemeta{% endblock %}</title>

{% block stylesheets %}
<link rel="stylesheet" type="text/css" href="{% url telemeta-css "telemeta.css" %}" />
<link rel="alternate" href="/rss" title="RSS 2.0" type="application/rss+xml" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="{% url telemeta-css "telemeta_ie.css" %}" />
<![endif]-->
<!--[if lte IE 6]>
<link rel="stylesheet"type="text/css" href="{% url telemeta-css "telemeta_ie6.css" %}" />
<![endif]-->
{% endblock %}

{% block javascript %}
<script src="{% url django.views.i18n.javascript_catalog %}" type="text/javascript"></script>
<script src="{% url telemeta-js "jquery-1.6.min.js" %}" type="text/javascript"></script>
<script src="{% url telemeta-js "locale.js" %}" type="text/javascript"></script>
<script src="{% url telemeta-js "application.js" %}" type="text/javascript"></script>
{% if user.is_authenticated %}
<script type='text/javascript'>var CURRENT_USER_NAME="{{ user.username }}";</script>
{% else %}
<script type='text/javascript'>var CURRENT_USER_NAME=undefined;</script>
{% endif %}
{% endblock %}

{% block extra_javascript %}{% endblock %}
</head>

<body>
{% block layout %}
<div id="layout">
{% block header %}
<div id="header">
<div id="logo">
{% block logo %}
<a href="{% url telemeta-home %}"><img src="{% url telemeta-images "logo_telemeta_2.png" %}" alt="Telemeta" /></a>
{% endblock %}
</div>

<div id="auth_info">
{% if user.is_authenticated %}
<img src="images/user.png" alt="user" style="vertical-align:middle" />
{% trans "Welcome" %}, 
{% if user.first_name and user.last_name %}
{{ user.first_name }} {{ user.last_name }}.
{% else %}
{{ user.username }}.
{% endif %}
<a href="{% url telemeta-profile-detail user.username %}">{% trans "Account" %}</a> |
<a href="{% url telemeta-flatpage "help" %}">{% trans "Help" %}</a> | 
<a href="{% url telemeta-logout %}">{% trans "Sign out" %}
<img src="images/logout.png" alt="logout" style="vertical-align:middle" /></a>
{% else %}
<a href="{% url telemeta-flatpage "help" %}">{% trans "Help" %}</a> |
<a href="{% url telemeta-login %}?next={{ request.path|urlencode }}">{% trans "Sign in" %}</a>
{% endif %}
</div>

<div id="quick_search">
<form action="{% url telemeta-search %}" id="_quickSearchForm" method="get">
<input type="text" id="quick_search_pattern" name="pattern" />
<a href="#" class="component button"
                onclick="document.getElementById('_quickSearchForm').submit(); return false;">{% trans "Search" %}</a>
</form>
</div>

<div id="menu" class="nav">
{% block menu %}

{# spaces between li and a elements breaks layout #}
 <a href="/" class="darkblue">{% trans "Home" %}</a>
 <a href="{% url telemeta-collections %}" class="blue">{% trans "Collections" %}</a>
 <a href="{% url telemeta-items %}" class="green">{% trans "Items" %}</a>
 <a href="{% url telemeta-geo-continents %}" class="yellow">{% trans "Geo Navigator" %}</a>
 <a href="{% url telemeta-search-criteria %}" class="orange">{% trans "Advanced search" %}</a>
 {% if user.is_staff %}
 <a href="{% url telemeta-admin %}" class="red">{% trans "Admin" %}</a>
 {% endif %}

{% endblock %}
</div>
</div>
{% endblock header %}

<div id="content">
    <table id="content_header"><tr>
            <td class="leftcol"><h1>{% block title %}{% endblock %}</h1></td>
            <td class="rightcol">{% block title_buttons %}{% endblock %}</td>
    </tr></table>
{% block content %}{% endblock %}
<div class="nett"></div>
</div>

{% block footer %}
<div id="footer">
 <hr />
 <table width="100%">
  <tr>
   <td>
    <a id="telemeta_powered" href="{% telemeta_url %}"><img src="{% url telemeta-images "logo_mini_2.png" %}" height="30" width="93"
   alt="Telemeta Powered"/></a>
    <p class="left">
    {% trans "Powered by" %} <a href="{% telemeta_url %}"><strong>Telemeta {% telemeta_version %}</strong></a><br />
    {% trans "By" %} <a href="http://www.parisson.com/">Parisson SARL</a>
    </p>
   </td>
   <td>
    <p class="center">
    {% trans "Usage of the archives in the respect of cultural heritage of the original communities." %}
    </p>
   </td>
   <td>
    <p class="right">
    Copyright &copy; {% current_year %} {% organization %}<br />
    <a href="{% url telemeta-flatpage "legal_notices" %}">{% trans "Legal notices" %}</a>
    </p>
   </td>
  </tr>
 </table>
</div>
{% endblock %}
</div>
{% endblock layout %}
</body>
</html>
