{% extends "admin/base_site.html" %}

<!-- LOADING -->
{% load i18n grp_tags log %}

<!-- COLTYPE/BODYCLASS-- >
{% block bodyclass %}dashboard{% endblock %}
{% block content-class %}content-grid{% endblock %}

<!-- CONTENT -->
{% block content %}
{% if user.is_active and user.is_staff %}
<div class="gipsy_dashboard">
    <div class="row">
        <div class="col-md-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    DAILY VISITORS
                    <a href="#" class="pull-right">
                        <i class="fa fa-refresh"></i>
                    </a>
                </div>
                <div class="panel-body">
                    <h4>
                        <strong>585</strong> visitors today
                    </h4>
                    <div class="progress">
                        <div class="progress-bar" role="progressbar" aria-valuenow="65" aria-valuemin="0" aria-valuemax="100" style="width: 65%;">
                            <span class="sr-only">65% Complete</span>
                        </div>
                    </div>
                    <p>
                        <i class="fa fa-long-arrow-up"></i> &nbsp;658 &nbsp;&nbsp;
                        +20% Looks good! &nbsp;<i class="fa fa-smile-o"></i>
                    </p>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    SUBSCRIBERS
                    <a href="#" class="pull-right">
                        <i class="fa fa-refresh"></i>
                    </a>
                </div>
                <div class="panel-body">
                    <h4>
                        <strong>365</strong> subscribers
                    </h4>
                    <div class="progress">
                        <div class="progress-bar" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 50%;">
                            <span class="sr-only">50% Complete</span>
                        </div>
                    </div>
                    <p>
                        <i class="fa fa-long-arrow-up"></i> &nbsp;20 up from last month &nbsp;<i class="fa fa-smile-o"></i>
                    </p>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    CURRENTLY ACTIVE USERS
                    <a href="#" class="pull-right">
                        <i class="fa fa-refresh"></i>
                    </a>
                </div>
                <div class="panel-body">
                    <h1>
                        <strong>23</strong> current<br> users
                    </h1>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-8">
            <div class="panel traffic-overview">
                <div class="panel-heading">OUR TRAFFIC OVERVIEW</div>
                <div class="panel-body">

                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="panel panel-default glance-panel">
                <div class="panel-heading">
                    AT A GLANCE
                    <a href="#" class="pull-right">
                        <i class="fa fa-refresh"></i>
                    </a>
                </div>
                <div class="panel-body">
                    <ul class="list list-glance">
                        <li class="list-item"><a href="#"><i class="fa fa-file-image-o"></i><span><strong>75</strong> posts</span></a></li>
                        <li class="list-item"><a href="#"><i class="fa fa-comment-o"></i><span><strong>192</strong> comments</span></a></li>
                        <li class="list-item"><a href="#"><i class="fa fa-files-o"></i><span><strong>12</strong> pages</span></a></li>
                        <li class="list-item"><a href="#"><i class="fa fa-flag"></i><span><strong>4</strong> in moderation</span></a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6">
            <div class="panel panel-info">
                <div class="panel-heading">LAST UPDATED ITEMS <a href="#" class="panel-toggle"><i class="fa fa-caret-up pull-right"></i></a></div>
                <div class="panel-body">
                    <ul class="list list-lastupdate">
                        <li class="list-item">
                            <p class="item-author">08.14.2014 | by Sonja Prokopec</p>
                            <p class="item-title"><a href="#">Pouvez-vous résister à la tentation du sucré ?</a></p>
                            <p class="item-content">
                                Nous nous ruons tous sur une part de gâteau au chocolat quelques
                                jours à peine après avoir commencé un régime...
                            </p>
                        </li>
                        <li class="list-item">
                            <p class="item-author">08.14.2014 | by Sonja Prokopec</p>
                            <p class="item-title"><a href="#">Un festival en faveur du développement durable</a></p>
                            <p class="item-content">
                                Les professeurs de l'ESSEC participent aux Deauville Green Awards, le
                                premier festival international de films d'entreprise sur l'écologie et
                                le développement durable.
                            </p>
                        </li>
                        <li class="list-item">
                            <p class="item-author">08.14.2014 | by Sonja Prokopec</p>
                            <p class="item-title"><a href="#">Pouvez-vous résister à la tentation du sucré ?</a></p>
                            <p class="item-content">
                                Nous nous ruons tous sur une part de gâteau au chocolat quelques
                                jours à peine après avoir commencé un régime...
                            </p>
                        </li>
                        <li class="list-item">
                            <p class="item-author">08.14.2014 | by Sonja Prokopec</p>
                            <p class="item-title"><a href="#">Un festival en faveur du développement durable</a></p>
                            <p class="item-content">
                                Les professeurs de l'ESSEC participent aux Deauville Green Awards, le
                                premier festival international de films d'entreprise sur l'écologie et
                                le développement durable.
                            </p>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="panel panel-info">
                <div class="panel-heading">{% trans 'RECENT ADMIN ACTIONS' %} <a href="#" class="panel-toggle"><i class="fa fa-caret-up pull-right"></i></a></div>
                <div class="panel-body">
                    <ul class="list list-mostviewed">
                    {% get_admin_log 5 as admin_log %}
                    {% if not admin_log %}
                        <li class="list-item"><p>{% trans 'None available' %}</p></li>
                    {% else %}
                        {% for entry in admin_log %}
                            <li class="list-item">
                                <p class="item-author">{{ entry.action_time }} | {% trans 'By' %} {{ entry.user }}</p>
                                <p class="item-title">
                                {% if entry.is_deletion %}
                                    <span>{{ entry.object_repr }}</span>
                                {% else %}
                                    <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
                                {% endif %}
                                </p>
                                <p class="item-content">
                                    {% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %} 
                                    {% if entry.is_addition %}{% trans 'entry added' %}{% endif %}
                                    {% if entry.is_change %}{% trans 'entry updated' %}{% endif %}
                                    {% if entry.is_deletion %}{% trans 'entry deleted' %}{% endif %}
                                </p>
                            </li>
                        {% endfor %}
                    {% endif %}
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
{% endif %}
{% endblock %}


{% block footer %}

{% endblock %}
