{% extends '_base.html' %}

{% block body %}

    {% block navigation %}{% include 'nav_utility.html' %}{% endblock navigation %}

    <div class="container">
        <div class="row">

            {% block sidebar %}
                <div class="col-md-3">
                    <div class="panel panel-default">
                        <div class="panel-heading"><a href="{% url 'projects_project_list' %}">Projects</a></div>
                        <div class="panel-body">
                            {% for project in sidebar_projects %}
                                <a href="{% url 'projects_project_view' project.pk %}">{{ project }}</a><br/>
                            {% empty %}
                                No Projects<br/>
                            {% endfor %}
                            <br/><a href="{% url 'projects_project_create' %}" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-plus-sign"></i> Add Project</a>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading"><a href="{% url 'hosts_host_list' %}">Hosts</a></div>
                        <div class="panel-body">
                            {% for host in sidebar_hosts %}
                                <a href="{% url 'hosts_host_detail' host.pk %}">{{ host }}</a><br/>
                            {% empty %}
                                No Hosts<br/>
                            {% endfor %}
                            <br/><a href="{% url 'hosts_host_create' %}" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-plus-sign"></i> Add Host</a>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading"><a href="{% url 'accounts_user_list' %}">Users</a></div>
                        <div class="panel-body">
                            {% for user in sidebar_users %}
                                <a href="{% url 'accounts_user_view' user.pk %}">{{ user }}</a><br/>
                            {% empty %}
                                No Users<br/>
                            {% endfor %}
                            <br/><a href="{% url 'accounts_user_add' %}" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-plus-sign"></i> Add User</a>
                        </div>
                    </div>
                </div>
            {% endblock sidebar %}

            {% block wrapper %}
                <div class="col-md-9">
                    {% block breadcrumb %}
                    {% endblock breadcrumb %}

                    {% block messages %}
                        {% for message in messages %}
                            <div class="alert alert-{% if message.tags == 'error' %}danger{% else %}{{ message.tags }}{% endif %} alert-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                {{ message }}
                            </div>
                        {% endfor %}
                    {% endblock messages %}

                    {% block content %}{% endblock content %}
                </div>
            {% endblock  %}

        </div>

    </div>

    <footer style="margin:100px 0;">
        <div class="container">
            Created by Dan Dietz, Nathanial Pardington, and Jared Proffitt for <a href="http://djangodash.com">Django Dash</a> 2013<br/>
            <span class="text-muted">Icons by <a href="http://glyphicons.com/">Glyphicons</a> | Themes by <a href="http://bootswatch.com/">Bootswatch</a> | Thanks for playing</span>
        </div>
    </footer>

{% endblock body %}