{% block layout.base %}
{% block doctype %}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">{% endblock doctype %}
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
{% block head %}
<head>
	{% block meta %}
    <meta http-equiv="content-type" content="{% block meta['content-type'] %}text/html;charset=UTF-8{% endblock meta['content-type'] %}" />
	<meta name="description" content="{% block meta.description %}{% endblock meta.description %}" />
	<meta name="keywords" content="{% block meta.keywords %}{% endblock meta.keywords %}" />
	{% endblock meta %}
	
    <title>{% block title %}{% endblock title %}</title>
	
	{% block css %}
	{% block css.shared %}
	<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/reset-fonts-grids/reset-fonts-grids.css" />
	<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/base/base-min.css" />
	{% endblock css.shared %}
	{% block css.custom %}{% endblock css.custom %}
	{% endblock css%}
	
	{% block js %}
	{% block js.shared %}{% endblock js.shared %}
	{% block js.custom %}{% endblock js.custom %}
	{% endblock js%}
</head>
{% endblock head %}

<body{% block bodyonload %}{% endblock bodyonload %}>
    <div {% block yahooui %}{% endblock yahooui %}>
		{% block header %}
		<!-- BEGIN header -->
        <div id="hd">
            {% block header_content %}{% include 'shared/header.html' %}{% endblock header_content %}
        </div>
        <!-- END header -->
		{% endblock header %}
		
		{% block body %}
        <!-- BEGIN body -->
        <div id="bd">
            {% block body_content %}{% endblock body_content %}
        </div>
        <!-- END body -->
		{% endblock body %}
		
		{% block footer %}
		<!-- BEGIN footer -->
        <div id="ft">
            {% block footer_content %}{% include 'shared/footer.html' %}{% endblock footer_content %}
        </div>
        <!-- END footer -->
		{% endblock footer %}
		
		{% block sql_debug %}
		{% if debug %}
        <!--  BEGIN debug -->
        <div id="debug">
            <h2>Queries</h2>
            <p>{{ sql_queries|length }} Queries {% ifnotequal sql_queries|length 0 %} (<span style="cursor: pointer;" onclick="document.getElementById('debugQueryTable').style.display='';">Show</span>) {% endifnotequal %}</p>
            <table id="debugQueryTable" style="display: none;">
                <col width="1"></col>
                <col></col>
                <col width="1"></col>
                <thead>
                    <tr>
                        <th scope="col">#</th>
                        <th scope="col">SQL</th>
                        <th scope="col">Time</th>
                    </tr>
                </thead>
                <tbody>
                    {% for query in sql_queries %}<tr class="{% cycle "odd","even" %}">
                    <td>{{ forloop.counter }}</td>
                    <td>{{ query.sql|escape }}</td>
                    <td>{{ query.time }}</td>
                    </tr>{% endfor %}
                </tbody>
            </table>
        </div>
        <!--  END debug -->
		{% endif %}
		{% endblock sql_debug %}
    </div>
</body>
</html>
{% endblock layout.base %}
