<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{% load bibmate_extras %}
{% load url from future %}
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<link rel="stylesheet" href="{{ STATIC_URL }}css/style.css" />
		<title>{% block title %}{{ TITLE }}{% endblock %}</title>
	</head>
	<body>
		{% block top %}
		<div id="header">
			<div id="logo">
				<a href="{% url 'index' %}">
					<img src="{{ LOGO_URL }}"/>
				</a>
			</div>
			<div id="headerText">
				<h1>{{ TITLE }}</h1>
			</div>
		</div>
		<div id="menu">
			<a class="menuLink" href="{% url 'index' %}">Home</a>
			{% if user.is_authenticated %}
			&nbsp;|&nbsp;
			<a class="menuLink" href="{% url 'import' %}">Import</a>
			{% endif %}
			&nbsp;|&nbsp;
			<a class="menuLink" href="{% url 'advancedSearch' %}">Advanced search</a>
			&nbsp;|&nbsp;
			<a class="menuLink" href="{% url 'about' %}">About</a>
			&nbsp;|&nbsp;&nbsp;
			{% if user.is_authenticated %}
			Welcome <strong>{{ user.username }}</strong>
			&nbsp;
			<a class="menuLink" href="{% url 'logout' %}">Logout</a>
			{% else %}
			<a class="menuLink" href="{% url 'login' %}">Login</a>
			{% endif %}
		</div>
		{% endblock %}
		
		<div id="content">
			{% block content %}
			<div id="search">
				{{ search_form.non_field_errors }}
				<form action="{% url 'index' %}" method="get">
					{{ search_form.searchBy }}
					{{ search_form.argument }}
					<input type="submit" value="Search" />
				</form>
			</div>
			{% include "_searchInfo.html" %}
			<div id="aggregate">
				<a href="{% url 'bibtex_aggregate' %}?{{ bibtex_query }}">Download BibTex file</a>
			</div>
			{% include "publicationsList.html" %}
			{% endblock %}
		</div>
	</body>
</html>
