<!DOCTYPE html>
<html lang="en" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>{% block title %}OpenSubmit - Assignment Submission System{% endblock %}</title>

    {% block scripts %}
    <script type="text/javascript" src="{{ STATIC_URL }}jquery/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}multiselect/js/bootstrap-multiselect.js"></script>
    {% endblock %}

    <style type="text/css">
    {% block style %}
    @import url("{{ STATIC_URL }}bootstrap/css/bootstrap.css");
    @import url("{{ STATIC_URL }}bootstrap/css/bootstrap-theme.css");
    @import url("{{ STATIC_URL }}multiselect/css/bootstrap-multiselect.css");
    @import url("{{ STATIC_URL }}css/screen.css");
    {% endblock %}
    </style>

    <script type="text/javascript">
    jQuery(document).ready(function() {
        {% block docready %}
        {% endblock %}
    });
    </script>
</head>

<body>
    <nav class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">OpenSubmit</a>
            </div>

            <div class="collapse navbar-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li  class="{% block navigation_home %}{% endblock %}">
                        <a href="{% url 'index' %}"><span class="glyphicon glyphicon-home"></span> Dashboard</a>
                    </li>
                    <li  class="{% block navigation_courses %}{% endblock %}">
                        <a href="{% url 'courses' %}"><span class="glyphicon glyphicon-filter"></span> Courses</a>
                    </li>
                    <li  class="{% block navigation_settings %}{% endblock %}">
                        <a href="{% url 'settings' %}"><span class="glyphicon glyphicon-wrench"></span> Settings</a>
                    </li>
                    {% if not request.session.ui_disable_logout %}
                    <li class="{% block navigation_logout %}{% endblock %}">
                        <a href="{% url 'logout' %}"><span class="glyphicon glyphicon-off"></span> Logout</a>
                    </li>
                    {% endif %}
                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>

    <div class="container">
        {% for message in messages %}
            {% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}
                <div class="alert alert-danger alert-dismissible" role="alert">
            {% elif message.level == DEFAULT_MESSAGE_LEVELS.WARNING %}
                <div class="alert alert-warning alert-dismissible" role="alert">
            {% else %}
                <div class="alert alert-success alert-dismissible" role="alert">
            {% endif %}
                    <button type="button" class="close" data-dismiss="alert">
                        <span aria-hidden="true">&times;</span>
                        <span class="sr-only">Close</span>
                    </button>{{ message }}
                </div>
        {% endfor %}
    </div>

    <div class="container">
        {% block content %}{% endblock %} 
    </div>

    <div class="container">
        {% block footer %}{% include "footer.html" %}{% endblock %}
    </div>

</body>

</html>