{% load i18n lfc_tags compress %}
<!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" xml:lang="en" lang="en">
    <head>
        <title>{% block title %}{% endblock %}</title>
        <link rel="shortcut icon" href="{{ STATIC_URL }}lfc/img/favicon.ico" type="image/ico" />

        {% compress css %}
            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}lfc/yui/reset-min.css" />
            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}lfc/jquery-ui-1.11.0/jquery-ui.css" />
            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}lfc/jGrowl-1.3.0/jquery.jgrowl.css" />
            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}lfc/superfish/src/css/superfish.css" />
            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}lfc/jquery-timepicker-1.3.9/jquery.timepicker.css" />
            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}lfc/css/lfc_manage.css" />
        {% endcompress %}

        {% block css %}{% endblock %}

        {% compress js %}
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/jquery/jquery-1.11.1.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/jquery-ui-1.11.0/jquery-ui.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/jquery/jquery.form.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/jGrowl-1.3.0/jquery.jgrowl.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/jquery-cookie-1.4.1/jquery.cookie.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/superfish/src/js/superfish.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/tiny_mce/jquery.tinymce.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/js/lfc_editor.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/js/lfc_tinymce.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/jquery-file-upload/js/jquery.iframe-transport.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/jquery-file-upload/js/jquery.fileupload.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/jquery-timepicker-1.3.9/jquery.timepicker.js"></script>
            <script type="text/javascript" src="{{ STATIC_URL }}lfc/js/lfc_manage.js"></script>
        {% endcompress %}

    </head>

    <body class="{% block body_class %}{% endblock %}">
        <div class="lfc-header">
            <div class="logo">
                <a href="">
                    <img src="{{ STATIC_URL }}lfc/img/logo.jpg"
                         alt="LFC"
                         title="LFC - Lightning Fast CMS"/>
                </a>
            </div>
            <div class="username">
                {% if user.is_authenticated %}
                    {% if user.last_name %}
                        <span id="user_fullname">{{user.first_name}} {{user.last_name}}</span>
                    {% else %}
                        <span id="username">{{ user.username }}</span>
                    {% endif %}
                    | <a class="logout"
                         href="{% url 'lfc_logout' %}">{% trans 'Logout' %}</a>
                {% endif %}
            </div>

            <table class="top-menu"
                   width="100%">
                <tr>
                    <td>
                        <ul class="sf-menu"
                            width="100%">
                            <li>
                                <a href="{% url 'lfc_manage_portal' %}">{% trans 'Content' %}</a>
                            </li>
                            {% if LFC_MANAGE_USERS %}
                                {% ifportalhasperm manage_portal  %}
                                    <li>
                                        <a>{% trans "User" %}</a>
                                        <ul>
                                            <li>
                                                <a href="{% url 'lfc_manage_user' %}">{% trans 'Users' %}</a>
                                            </li>
                                            <li>
                                                <a href="{% url 'lfc_manage_role' %}">{% trans 'Roles' %}</a>
                                            </li>
                                            <li>
                                                <a href="{% url 'lfc_manage_group' %}">{% trans 'Groups' %}</a>
                                            </li>
                                        </ul>
                                    </li>
                                {% endifportalhasperm %}
                            {% endif %}
                            {% if LFC_MANAGE_WORKFLOWS %}
                                {% ifportalhasperm review %}
                                    <li>
                                        <a href="{% url 'lfc_manage_review' %}">{% trans 'Review' %}</a>
                                    </li>
                                {% endifportalhasperm %}
                                {% ifportalhasperm manage_portal %}
                                    <li>
                                        <a href="{% url 'lfc_manage_workflow' %}">{% trans 'Workflows' %}</a>
                                    </li>
                                {% endifportalhasperm %}
                            {% endif %}
                            {% if LFC_MANAGE_APPLICATIONS %}
                                {% ifportalhasperm manage_portal  %}
                                    <li>
                                        <a>{% trans "Applications" %}</a>
                                        <ul>
                                            <li>
                                                <a href="{% url 'lfc_content_types' %}">{% trans 'Content Types' %}</a>
                                            </li>
                                            <li>
                                                <a href="{% url 'lfc_applications' %}">{% trans 'Installation' %}</a>
                                            </li>
                                        </ul>
                                    </li>
                                {% endifportalhasperm %}
                            {% endif %}
                            {% if LFC_MANAGE_UTILS %}
                                <li>
                                    <a href="{% url 'lfc_manage_utils' %}">{% trans 'Utils' %}</a>
                                </li>
                            {% endif %}
                            {% if LFC_MULTILANGUAGE %}
                                <li>
                                    <a>{% trans "Languages" %}</a>
                                    <ul>
                                        {% for language in LANGUAGES_DICT %}
                                            <li>
                                                <a href="{% url 'lfc_manage_set_language' language.code %}">{% trans language.name %}</a>
                                            </li>
                                        {% endfor %}
                                    </ul>
                                </li>
                            {% endif %}
                        </ul>
                    </td>
                </tr>
            </table>
        </div>

        <table class="main">
            <tr>
                {% block left-slot-wrapper %}
                    <td class="left-slot">
                        <div style="height:20px"></div>
                        {% block left_slot %}{% endblock %}
                    </td>
                {% endblock %}
                <td class="middle-slot">
                    {% block content %}{% endblock %}
                </td>
            </tr>
        </table>

        {% block footer %}
            <div class="footer">
                <p>{% trans 'Powered by' %} <a target="_blank" href="http://www.getlfs.com">LFC</a> &mdash; Lightning Fast CMS</p>
                <p>
                    &copy; 2009 - {% now "Y" %} {% trans "by" %} Kai Diefenbach {% trans "and contributors" %} &mdash; {% trans 'All rights reserved' %}
                </p>
                <p>{% trans 'Distributed under the' %} <a target="_blank" href="http://www.opensource.org/licenses/bsd-license.php">{% trans 'BSD-License' %}</a></p>
            </div>
        {% endblock %}

        <div class="overlay" id="overlay" style="display:none">
            <div class="content"></div>
        </div>

        <div class="delete-dialog" id="yesno" style="display:none">
            <p>
                {% trans "Do you really want to delete this object?" %}
            </p>
            <div style="display:none" id="delete-url"></div>
            <div style="display:none" id="delete-is-ajax"></div>
        </div>

        <span id="obj-id" data="{{ obj.id }}"></span>

    </body>
</html>
