{% load i18n %}
{% load saved_queries %}
{% with request|saved_queries as user_saved_queries_ %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>{% block helpdesk_title %}Helpdesk{% endblock %} :: {% trans "Powered by django-helpdesk" %}</title>
        <script src='{{ STATIC_URL }}helpdesk/jquery-1.5.min.js' type='text/javascript' language='javascript'></script>
        <script src='{{ STATIC_URL }}helpdesk/jquery-ui-1.8.9.custom.min.js' type='text/javascript' language='javascript'></script>
        <link rel='stylesheet' href='{{ STATIC_URL }}helpdesk/helpdesk.css' type='text/css' />
        <link rel='stylesheet' href='{{ STATIC_URL }}helpdesk/jquery-smoothness-theme/jquery-ui-1.8.9.custom.css' type='text/css' />
        <link rel='alternate' href='{% url helpdesk_rss "user" %}{{ user.username }}/' type='application/rss+xml' title='{% trans "My Open Tickets" %}' />
        <link rel='alternate' href='{% url helpdesk_rss "recent_activity" %}' type='application/rss+xml' title='{% trans "All Recent Activity" %}' />
        <link rel='alternate' href='{% url helpdesk_rss "unassigned" %}' type='application/rss+xml' title='{% trans "Unassigned Tickets" %}' />

        <script type="text/javascript">
        $(document).ready(function(){
            // replace display while hovering over menu item
            $('li.headerlink').hover(
	            function() { $('ul', this).css('display', 'block'); },
	            function() { $('ul', this).css('display', 'none'); });
        });
        </script>

        <style type="text/css">
        /* header */
        #dropdown li.headerlink { width: auto; float: left; text-align: center; }

        /* query list */
        #dropdown li.headerlink ul {    display: none;
                                        text-align: left;
                                        position: absolute;
                                        padding: 5px;
                                        z-index: 2; }
        /* query entries */
        #dropdown li.headerlink:hover ul { display: block; width: auto; }
        #dropdown li.headerlink:hover ul li { padding: 5px; margin: 1px; float: none; display: block; }
        </style>

        {% block helpdesk_head %}{% endblock %}
    </head>
    <body>
        <div id='container'>
            <div id='header'>
                <h1>{% trans "Helpdesk" %}</h1>
                {% include "helpdesk/navigation.html" %}
            </div>

            <div id='body'>
                {% block helpdesk_body %}{% endblock %}
            </div>

            <div id='footer'>
                <p>{% include "helpdesk/attribution.html" %}<a href='{% url helpdesk_rss_index %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "RSS Feeds" %}' border='0' />{% trans "RSS Feeds" %}</a> <a href='{% url helpdesk_api_help %}'>{% trans "API" %}</a> <a href='{% url helpdesk_user_settings %}'>{% trans "User Settings" %}</a> {% if user.is_superuser %}<a href='{% url helpdesk_system_settings %}'>{% trans "System Settings" %}</a>{% endif %}</p>
            </div>
        </div>
        {% include "helpdesk/debug.html" %}
    </body>
</html>
{% endwith %}
